Coloring a Vertex why?

Started by
15 comments, last by deadimp 18 years, 10 months ago
Specifying an individual colour per vertex is probably most obvious when using gouraud shading. Instead of having the whole polygon the same colour (flat shading), you can specify an individual colour for each vertex.

This may or may not help:



Basically, you don't specify a colour for each pixel, just for each vertex. In order to get the colour at any given pixel, it has to be calculated- this is done by interpolating between the colours at the vertices.

If sombody wants to expand on that... (I'm not much good at explaining stuff)
the rug - funpowered.com
Advertisement
"Pictures are the best teachers." - Me

Thanks, the Rug. That helped visualize what was going on.
Thanks everyone, very helpful.

Beginner in Game Development?  Read here. And read here.

 

Another use for coloring, but on top of textures being used. Did you play any 16-bit RPGs, or I think even final fantasy 7 did this. You see an enemy at the beginning of the game, then you see the same thing later, more powerful, and with a red tint. Sometimes they use the same texture and color it like that, other times it actually is a different texture, but that is another use of color vertices. But if you have smooth shading on(not sure what is called in DX), then you have to color all vertices.


Hey, it just accrued to me how DXSprites go about doing color modulation! Learn something new every day. [smile]
Quote:Original post by CyberFox
Hey, it just accrued to me how DXSprites go about doing color modulation! Learn something new every day. [smile]


Accrued? Someone has been taking too many economics courses! [grin]
Or to few spelling ones...
Quote:Or to few spelling ones...

> "Or too few spelling ones..."
Sorry, I couldn't pass this up [smile]

Also, if I tell DirectX not to modulate (or is it diffuse?) texture colors, then will it simply mask the color over the texture (ex. Make it solid white)?
Projects:> Thacmus - CMS (PHP 5, MySQL)Paused:> dgi> MegaMan X Crossfire

This topic is closed to new replies.

Advertisement