Colors

Started by
3 comments, last by duke 20 years, 11 months ago
This is more of a "poll" more than a question, but I was curious how many people actually use per vertex coloring. Some modeling programs don''t even have an interface for it (MilkShape for instance) and this leads me to believe that noone uses per vertex colors. Is there any real use for the per vertex coloring these days? I realize I could do things like pre-compute vertex colors for static lighting. Other thoughts I''ve had for uses are: When rendering terrains, disable the texture for far away vertices and instead set their color to a sample from the texture. But I haven''t tested how this works... Essentially, I''m just curious if most of "you folks" just don''t even bother with the vertex color or if u just leave it white like I do. Has anyone tested to see if it impacts performance any? I guess my main point is to me it seems like specifying vertex colors is something that just doesn''t make any sense given the perfomance of todays GPU''s.... it''s just easier to forget about it and use textures... BTW: I mean PER VERTEX COLOR, not diffuse color in the material properties... or essentially doing something like enabling GL_COLOR_MATERIAL (or equiv in DX, if there is one) Jeff
super genius
Advertisement
Vertex colors don''t like textures... if you hav 1,0,0 (red in opengl) the blue and green in a texture won''t show up. Most people just use textures.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Actually, it depends on what your texture environment mode is set to. If you set it to something like GL_MODULATE it won''t necessarily overwrite the texture color.

I just did a test, and I got rid of my 4 component color per vertex when rendering the terrain... it didn''t make any difference in frame rate... on lower end cards it might I suppose.. if nothing else it saved some ram.
super genius
We use it for a variety of things. Pre-baked in lighting is one example. For some objects it''s useful to get part of it colored differently, while not chewing up texture space.

There''s no problem using it with textures. Yes, if you set it to 1,0,0, you won''t get blue and green, just the same as if you had a pure red light in your scene. It''s like saying textures don''t work on polygons because if you make a pure black texture, everything comes out black. Everything can be used incorrectly.

When using MODULATE2X, you can have most vertices at .5,.5,.5, and then boost certain vertices brighter, such as .7,.5,.5 to brighter reds in parts of the mesh.

There''s tons of uses, you just have to be creative.
I am going to use vertex colors for pre-calculated lightning. I am working on a small terrain renderer for low-end cards (TNT2) using GeoMipMaps. If the terrain gets really big I cannot stretch a lightmap across the terrain because of the size the texture would have to be. Vertex colors can save me VRAM here. Also, it saves up a texture unit in the multitexture pass so I can add an extra detail texture.

Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

This topic is closed to new replies.

Advertisement