Sign in to follow this  
Etherstar

Vertex Format that contsains P C N and T data?

Recommended Posts

I'm using c# and I was wondering why there's no vertex format that includes position, color, normal and texture data. I've run into a situation where I need all of these aspects but apparently there is no customer vertex format that contains all of this data. Any ideas?

Share this post


Link to post
Share on other sites
For most common cases the presence of Normals will override the Diffuse by virtue of using the colour created by lighting.

I suppose this isn't strictly going to be the case for programmable work, but you'd probably be defining your own format manually if you were doing things that way [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by Etherstar
I'm using c# and I was wondering why there's no vertex format that includes position, color, normal and texture data. I've run into a situation where I need all of these aspects but apparently there is no customer vertex format that contains all of this data. Any ideas?

VertexFormats FVF = VertexFormats.Position | VertexFormats.Diffuse | VertexFormats.Normal | VertexFormats.Texture1;

The documentation page is atrociously hidden:
DirectX SDK->Namespaces->Microsoft.DirectX.Direct3D->Enumerations->VertexFormats

Share this post


Link to post
Share on other sites
Ahh I see. Well here is the situation. I have a layer of 3 layers textured of tiles. I need in some cases to manually change the alpha of each of these layers so that they become semi transparent. The result is that the layer or layers below show through creating some neat blending effects (think of a cloud layer over a skybox). Now I want to give these layers realistic lighting but I'm afraid that if I removed the color information from the vertex, then I can't acheive the same blending effect through lighting. I could manually adjust the the alpha of the textures outside of the program I guess but it's kind of a hack and doesn't offer me the same flexability.

Could I acheive this same effect through lighting and materials alone?

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder
Quote:
Original post by Etherstar
I'm using c# and I was wondering why there's no vertex format that includes position, color, normal and texture data. I've run into a situation where I need all of these aspects but apparently there is no customer vertex format that contains all of this data. Any ideas?

VertexFormats FVF = VertexFormats.Position | VertexFormats.Diffuse | VertexFormats.Normal | VertexFormats.Texture1;

The documentation page is atrociously hidden:
DirectX SDK->Namespaces->Microsoft.DirectX.Direct3D->Enumerations->VertexFormats


edit: nevermind.

Thanks all!

[Edited by - Etherstar on June 28, 2005 5:00:54 PM]

Share this post


Link to post
Share on other sites

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