Page 1 of 1

is there any way to control each child's material ?

Posted: Thu Jan 15, 2009 1:56 pm
by go
Hi, I want to control each child's material like under sourcecode

Code: Select all

	scene::ISceneNode* haL =  Node2->getXJointNode("child");
	haL->setMaterialFlag(video::EMF_POINTCLOUD, true);
But it can't do well. so I ask is there any way to control each child's material and is it possible?


Thanks!![/code]

Posted: Thu Jan 15, 2009 3:51 pm
by JP
Well you're not getting the actual mesh, just a bone, which doesn't actually get rendered in any way so you're not actually affecting the mesh.

I don't think you can do what you want as the mesh is rendered once, all together so you'd need to load the mesh as individual models i think...

Posted: Fri Jan 16, 2009 3:21 am
by go
OK, thanks.

I can control each material's setting before we load the mesh. but can't do it after rending it.


and I think there is some way to control, mayabe. hmm I'll tryi it thanks. if i can't do it. I'll load the mesh individual.

Posted: Fri Jan 16, 2009 3:28 am
by nathanf534
Well you're not getting the actual mesh, just a bone
so, does this mean, i could make a model in blender, attach some bones, then modify the model, using the bones, inside of irrlicht? such as moving the gun on a tank?

Posted: Fri Jan 16, 2009 6:39 am
by go
Thanks for your reply.

I mean I want to change child's material like α value or make material pointcloud not to mean change bone's rotation or position,I've already done it.

Thanks

Posted: Fri Jan 16, 2009 8:04 am
by hybrid
nathanf534 wrote:
Well you're not getting the actual mesh, just a bone
so, does this mean, i could make a model in blender, attach some bones, then modify the model, using the bones, inside of irrlicht? such as moving the gun on a tank?
Yes, that's what the bones are for. Read the Wiki documentation about the proper settings.