Entity Troubles
Blitz3D Forums/Blitz3D Beginners Area/Entity Troubles
| ||
I am having trouble with my entities. i input Graphics3D 800,500 camera=CreateCamera() ;Draw to top left corner of the screen CameraViewport camera,0,0,GraphicsWidth()/2,GraphicsHeight()/2 plane=CreatePlane() RotateEntity clouds,0,0,180 ;and position it up in the sky! PositionEntity clouds,0,100,0 Light=CreateLight() I don't know alot about Blitz so please be through in descriptions. I am told an entity does not exist. how do i make it exist. |
| ||
at first glance, your calling an entity you havnt made or loaded try changing plane=createplane() to clouds=createplane() |
| ||
excelent. now it works but nothing happens. what do i do to texture my plane because all i now see is black. i'm trying to create a type of environment to place a character in |
| ||
If you have a texture you want, then : planetexture = LoadTexture("planetex.bmp") and then EntityTexture plane,planetexture. |
| ||
that is more or less my question. where do i get a texture? |
| ||
A texture is just a picture file on your computer. Place it in the same folder as your .bb source code file and pass the name to LoadTexture. |
| ||
Thanks James, but could u give me an example. |
| ||
You can make a texture in the paint program that comes with windows. Or you could use another program, that you most likely would have to buy. See the Blitz Content Creation Tools forum, under Miscellaneous. |
| ||
if you download deled 3d designer(see the tools) theres some great textures with that. but always be carefull that you have permision to use other peaples textures |
| ||
Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() CameraViewport camera 0,0,800,600 light=CreateLight() plane=CreatePlane() texture=LoadTexture(bluesky) EntityTexture plane,texture this is my code. (sad isn't it) In the CameraViewport line i am told i need an end of file. also my line EntityTexture plane,texture is highlighted when the message, entity does not exist. What do i do. |
| ||
In the CameraViewport line i am told i need an end of file You need a comma after each argument... after "camera" as well as the numerical values. lso my line EntityTexture plane,texture is highlighted when the message, entity does not exist The loading syntax is incorrect... the file name must be in quotes (and should probably have an extension suffix like .png, .jpg or whatever. I think Windows hides the extensions by default... as a developer you really want them to be visible (in order to check what a file's proper, full name is) so check your folder options). |
| ||
Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() CameraViewport camera, 0, 0, 800, 600 light=CreateLight() plane=CreatePlane() texture=LoadTexture(sky) EntityTexture plane,texture ran this (renamed file sky) and i am told texture does not exist and it highlights the last line. |
| ||
added (sky.bmp) in place of (sky). tells me type "bmp" not found |
| ||
are you forgetting "" texture=loadtexture("sky.bmp") |
| ||
Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() CameraViewport camera, 0, 0, 800, 600 light=CreateLight() plane=CreatePlane() texture=LoadTexture("sky.bmp") EntityTexture plane,texture still non existent |
| ||
then its your file your trying to load either its called something else like sky.jpg or its not in the same folder |
| ||
the same folder as in... in the blitz program folders |
| ||
the same folder as the code your writing and saving out |
| ||
I put it in the same folder as my program (My Stuff) and my program completes but i don't get anything but a black screen. i created it in paint and it is blue |
| ||
is that your full code you posted if so you need a main loop and you will have to read up on updateworld and renderworld in the blitz reference |
| ||
You should look through some blitz examples of existing code, offline and online tutorials, code archives and previous posts in the begginners section of this forum. You need to input some minimum effort, say 30 minutes trying to solve the problem by yourself, before you post here. Finding stuff out on your own is fun. Also, welcome to the community :) |
| ||
there ya go try this, copy n paste this into blitz then save it out in the folder your code is in, so it picks up the sky.bmp to learn more just load in some samples from the blitz3d/samples folder and play about, its fun when you understand a few things ;) have fun Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() CameraClsColor camera,200,200,200 CameraViewport camera, 0, 0, 800, 600 PositionEntity camera,0,0,-2 light=CreateLight(1) texture=LoadTexture("sky.bmp") cube=CreateCube() EntityTexture cube,texture ScaleEntity cube,.5,.5,.5 While Not KeyHit(1) ; escape key to quit UpdateWorld RenderWorld Flip Wend End |
| ||
Thanks Guys |