You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I have a model that I created in milkshape that has 3 groups. I export the model as a DirectX .x file format and load it using irrlicht.
All of the groups are loaded as Joints which is great. I applied a shader to the entire mesh just to test and it worked great. Now what I want to do is get one of the joint nodes and apply a shader only to that joint. So I tried the following:
The tank node is retrieved successfully, but when I try to apply my shader to the tank joint node it fails because it says my tank scenenode has a material count of 0. I used separate textures for each group in my model so I am not sure why it is saying that the material count is 0 for my joint nodes.
Is it possible to apply a shader to a joint node? Or should I be trying a different approach to highlight only portions of a model?
Well, the animation and joint system in Irrlicht works differently. The animated mesh has several mesh buffers, at least for each material and each animated segment one. The joint node that you get in return from the method is a dummy node. It lets you attach other scene nodes as childs. The meshbuffers of the mesh are also moved along with the joints, but there's no direct relation between the joints and the materials of the meshbuffers. You need to find those on your own, maybe the joint sytem can also give hints for this.
Thank you so much! You were 100% correct! I managed to use the joint system in conjunction with the meshbuffer collection to use shaders on separate groups of the model!! Here is my code in case anyone else ever has this same problem. I basically just added the below code to the shaders example to get my desired effect.