[Mesh] How to hide invisible polies ??

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
lor
Posts: 22
Joined: Sat Aug 27, 2005 2:07 pm

[Mesh] How to hide invisible polies ??

Post by lor »

How can I hide invisible poligons, so that the program runs faster ?? I'm not asking about the algorithm of searching invisible polies, but for example if I already know that I can't see some poly, how to hide it, what function to use to select, hide and unhide concrete polies if I have a complete mesh (made in 3ds max) ??
luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

Invisible as in they are behind something else so cannot be seen?
You'll prolly have to export those items seperately, load them seperately, then just do
node->setVisible(false);
But I wouldn't worry about it much, it's still going to be sitting there in memory, and if I am not mistaken, objects that are unseen (Visible(true) but not within the viewing area) are not taxing your resources.
Besides, if you want that node to show up when you walk around the corner or whatever and it becomes visible, you are going to waste more power to detect if it should be seen or not?

did that describe what you're asking?
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

Study the OctTree scenenode (COctTreeSceneNode in Irrlicht source). It does pretty much what you describe, hide polys from mesh that are not visible.
Basicly you make a custom scenenode and only draw the triangles that should be visible.
lor
Posts: 22
Joined: Sat Aug 27, 2005 2:07 pm

Post by lor »

Thanks for answers. It helped me a bit. I've got another question similar, so I'll not make a new thread: How to make my program (game) work faster if it uses irrlicht. On my athl. 2400+ it runs perfectly but on my duron 800 it jumps heavily. There aren't many polies and so on but the game seems to be very slow :?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Using smgr->addOctTreeSceneNode() should help with that, as said before it will not render unnecessary vertices.
Image Image Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

it's impossible to say what's slow if we don't know what the code is doing!
you should profile your code to find out where the slow bits are, then concentrate your efforts there.
for example in dev-cpp, go to the 'execute' menu and choose 'profile analysis' to find out which parts are eating the most processor time
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

Irrlicht also has rather poor culling methods.There are many techniques to reduce triangle count
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Post Reply