Page 1 of 1

image in 3D

Posted: Sat Jul 15, 2006 3:14 pm
by juliusctw
Hello

I have no problem with displaying 2d image on the screen, but how in the world do you display images in the 3D world. I tried to use the billboard, but it always turns to face the camera. :? I just want a simple 3D image and place them on 4 vertices in space, how is that normally done?

Posted: Sat Jul 15, 2006 3:18 pm
by cadue
Look the example "custom scene node", there is a very simple custom scene node that draw a polygon. in the code there is the position of the vertexes. You can modify them like you want

Posted: Sat Jul 15, 2006 3:20 pm
by cadue
you also can create a simple piane in a graphics software, export, import it in irrlicht and add a texture.

thanx

Posted: Sat Jul 15, 2006 4:43 pm
by juliusctw
thanx

that sounds good, i guess i can write my own plane sceneNode and set the material to the image, how do you adjust the size and shift the image on the plane once you have applied the image?

didn't somebody already write a class for all basic shapes such as plane, square, sphere?

Posted: Sat Jul 15, 2006 6:35 pm
by hybrid
plane and square is the same. Cube and Sphere are available.

i don't see it anywhere

Posted: Sat Jul 15, 2006 7:46 pm
by juliusctw
I read through the class list, I don't see any squareSceneNodes, or SphereSceneNodes ? :roll:

where is it?

Posted: Sat Jul 15, 2006 8:58 pm
by cadue
you haven't understand irrlicht. All graphics engine work by the nodes. A node is a polygon, a camera, a light, every object you need.
For draw a very simple poligon you have to set the cordinates of the vertexes or, if what you want draw is a complex object, you must create the object whit a graphics software like 3ds max, maya,blender and next export.
A ISceneNode can "store" each object, but there are another nodes, like IAnimatedMeshSceneNode, ISceneNodeAnimator ect..that derive from ISceneNode but have some new functions

Posted: Sat Jul 15, 2006 9:17 pm
by hybrid
Sphere scene node will be part of Irrlicht 1.1 and is available via SVN right now. Plane and square are just the same (as long as you have finite planes), I did not say that they are available already. But you can use the cube scene node (formerly known as test scene node) and scale it in one dimension to a very thin box.