Sign in to follow this  

Shading two different parts. Same model.

This topic is 3293 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using Maya to export my current set of models out to the .x format. What I want to know is if it's possible using DirectX coding to use two different shader effects on the same model. For example. I have a ball with a large pair of eyes. If I want only the eyes to have a pure white cel-shading effect on them and the ball to use another effect. Is it possible to achieve this through coding and using the same .x model file. Comments or links to tutorials would help greatly. (If this can be done) THANKS!

Share this post


Link to post
Share on other sites
Yes, its absolutely possible to handle this case.

What you'll find is that the Maya exporter will (or at least should!) group geometry according to the material it uses. In the simple ID3DXMesh case you'll get a single mesh but multiple subsets.

From the PoV of the hardware you can only have one shader configuration active at a time so you'll have to render each subset seperately and reconfigure the pipeline in between draw calls.

hth
Jack

Share this post


Link to post
Share on other sites

This topic is 3293 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this