How control model subsets of rendering

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
jinwei
Posts: 10
Joined: Fri Nov 06, 2009 3:54 am

How control model subsets of rendering

Post by jinwei »

for example: one mesh has two subsets,I want to render first subset and hidden the second subset.How can I do?
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hiding via setVisible() is only supported for whole meshes/scene nodes. So unless you split your mesh into two parts and load them separately, this is not an option. But you can change the SMaterial setting to disable writing to the framebuffer and/or to the depth buffer. This would avoid any rendering being done, though will have a slightly higher performance impact than using the setVisible method.
jinwei
Posts: 10
Joined: Fri Nov 06, 2009 3:54 am

Post by jinwei »

hybrid wrote:Hiding via setVisible() is only supported for whole meshes/scene nodes. So unless you split your mesh into two parts and load them separately, this is not an option. But you can change the SMaterial setting to disable writing to the framebuffer and/or to the depth buffer. This would avoid any rendering being done, though will have a slightly higher performance impact than using the setVisible method.
thanks.
How can I change the Material setting to disable writing to the framebuffer and/or to the depth buffer.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Just use the SMaterial properties. ColorMask and ZWrite should be what you're looking for.
jinwei
Posts: 10
Joined: Fri Nov 06, 2009 3:54 am

Post by jinwei »

hybrid wrote:Just use the SMaterial properties. ColorMask and ZWrite should be what you're looking for.

thank you!Problem is solved.

I have some things in the weekend, so just a reply you so late
Post Reply