Patching 3d figures?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Magus_Stragus
Posts: 86
Joined: Wed Aug 29, 2007 10:45 pm

Patching 3d figures?

Post by Magus_Stragus »

Hey there. I was wondering if there was a way to create patches of 3d figures (solid 3d figures) based on the vertexes and the faces of the figure.

Thanks in advance.

Edit: I also have another non-related question. How can I put the camera So the viewpoint (the point where the camera is located) is in (2,2,20)? I really suck at handling the camera, and it's a bit urgent. Also, in perspective. Thanks.
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

what is a 3D figure? Do you mean a person? Or something else entirely?

Your camera question sounds painfully obvious:

camera->setPosition(core::vector3df(2,2,20));

But it can't be that simple as you should be waaay beyond questions like that now!
Image Image Image
Magus_Stragus
Posts: 86
Joined: Wed Aug 29, 2007 10:45 pm

Post by Magus_Stragus »

A 3d figure. like the ones you find in tetris, but now solid (3d).

Ah, the camera question was easy, though I've always have troubles to do manage it. Thanks for the help. ^_^
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

So do you want to concatenate the tetris-blocks together into one large shape?

Maybe if you explain exactly what you're trying to do we can suggest something.
Image Image Image
Magus_Stragus
Posts: 86
Joined: Wed Aug 29, 2007 10:45 pm

Post by Magus_Stragus »

I'm doing the game Block Out, the 3d version of Tetris. I need to create the blocks, but I don't know how. Right now I'm using only lines, but a solid block would be better.
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Well you could model them in something like blender/milkshape etc. or you could construct them from cube scene nodes as that's basically how they're constructed. or you could make a custom scene node which could draw itself based on which block you want or just make a custom scene node for each of the block types.

if you went down the cube scene node route you could just create the 4 necessary cubes and then arrange them so they form the right shape and parent them to maybe an empty scene node or something so they stick together as a solid shape and then move the empty scene node to move them around. that would probably be the easiest one to setup but it would be the least efficient in terms of rendering due to the fact for every block you'd be doing 4 draw calls for the individual cubes so that's 4 times more rendering than is really required. But having said that you'd not gonna have a huge number of these tetris-blocks on the screen at any one time so it shouldn't really matter much!
Image Image Image
Magus_Stragus
Posts: 86
Joined: Wed Aug 29, 2007 10:45 pm

Post by Magus_Stragus »

Hmm... You're right, using the cube scenes nodes would be the less efficient way. But hell, I have everything but time. Thanks for the help, JP!
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
Post Reply