Jump to content
  • Advertisement
Sign in to follow this  
Anoop Chauhan

Mesh Vertex Color in Direct3D 9

This topic is 2217 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 want to extract mesh vertex color from X file. I can't figur out how to do that..may be we need to write a custom mesh loader? Actually I want my mesh painted by vertex colors alongside texture

Share this post


Link to post
Share on other sites
Advertisement
Your first post was at 2:30am (my time), your second at 9:22am. During that time most people in my time zone, or one not too far off it, would be asleep. Aside from that, 7 hours is an awfully short time before a second post like this.

And aside from all of that - what have you tried?

Share this post


Link to post
Share on other sites
I have a model exported from 3ds Max. Suppose a simple mesh like plane with a simple texture, painted half of it's vertices with vertex paint modifier. The X file template "MeshVertexColor" contains color for each vertx .How to display them on screen with d3d?

vcolor.JPG Edited by Anoop Chauhan

Share this post


Link to post
Share on other sites
Are you using the fixed function pipeline (FFP) or vertex/pixel shaders?

Btw, are you sure that your x-file exporter DOES export also vertex colors set by the vertex paint modifier? (Just to be sure because the exporter I was using didn't do this.)

Share this post


Link to post
Share on other sites
It is okay to combine color of texture with color of specified vertex(diffuse) using a blending operation. But D3DXLoadMeshFromX doesnt load vertex color, then what should I do? Edited by Anoop Chauhan

Share this post


Link to post
Share on other sites
If you switch to using the D3DXLoadMeshHierachy APIs, you can control the vertex declaration used to create your mesh in the allocation hierarchy's CreateMeshContainer() method. Then you can be sure you have the vertex colors.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!