Entity Troubles

Blitz3D Forums/Blitz3D Beginners Area/Entity Troubles

Glink(Posted 2005) [#1]
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.


scribbla(Posted 2005) [#2]
at first glance, your calling an entity you havnt made or loaded

try changing plane=createplane()
to clouds=createplane()


Glink(Posted 2005) [#3]
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


Crazy4Code(Posted 2005) [#4]
If you have a texture you want, then : planetexture = LoadTexture("planetex.bmp") and then EntityTexture plane,planetexture.


Glink(Posted 2005) [#5]
that is more or less my question. where do i get a texture?


BlitzSupport(Posted 2005) [#6]
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.


Glink(Posted 2005) [#7]
Thanks James, but could u give me an example.


Augen(Posted 2005) [#8]
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.


grindalf(Posted 2005) [#9]
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


Glink(Posted 2005) [#10]
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.


Sledge(Posted 2005) [#11]

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).


Glink(Posted 2005) [#12]
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.


Glink(Posted 2005) [#13]
added (sky.bmp) in place of (sky). tells me type "bmp" not found


scribbla(Posted 2005) [#14]
are you forgetting ""

texture=loadtexture("sky.bmp")


Glink(Posted 2005) [#15]
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


scribbla(Posted 2005) [#16]
then its your file your trying to load
either its called something else like sky.jpg
or
its not in the same folder


Glink(Posted 2005) [#17]
the same folder as in... in the blitz program folders


scribbla(Posted 2005) [#18]
the same folder as the code your writing and saving out


Glink(Posted 2005) [#19]
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


scribbla(Posted 2005) [#20]
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


Braincell(Posted 2005) [#21]
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 :)


scribbla(Posted 2005) [#22]
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



Glink(Posted 2005) [#23]
Thanks Guys