Multiple vertex color sets in OpenGL

Started by
31 comments, last by convert 1 year, 4 months ago

Also I am wondering if more then 1 vertex color set is used in any game model format? I personally have never seen formats using more then 1 vertex color set, but I am not a big expert game developing.

Advertisement

Well,instead of having one specular Colour per model, you can have specular colour per vertex. The limit is our imagination.

@taby Are you tallking about separat vertex color values for difuse, ambient and specular?

@convert Yes sir, I am.

@taby And is something like this used in any game?

Why not? you can also have a specularity map, so that some parts of your mesh are shiny, and some not. Of course, this has been used for decades in graphics, e.g. Softimage|3D

taby said:

Why not? you can also have a specularity map, so that some parts of your mesh are shiny, and some not. Of course, this has been used for decades in graphics, e.g. Softimage|3D

But if it has been used for decades in graphics, why old OpenGL has no suport for it?

Because back then, OpenGL was a poor man’s way of drawing a simplified scene. The magic kicked in when the real rendering takes place on the CPU.

Softimage had shaders, just like we do now… except now they run on a GPU with a programmable pipeline. Only took them 30 years!

taby said:

Because back then, OpenGL was a poor man’s way of drawing a simplified scene. The magic kicked in when the real rendering takes place on the CPU.

Softimage had shaders, just like we do now… except now they run on a GPU with a programmable pipeline. Only took them 30 years!

You saied for decades, but a decade ago old OpenGL was stil actual. OpenGL has defenetly used the GPU specially for transformation, while for this new stuf you have to calculate the transformations yourself.

@convert What does “game model format” mean?

Modern geometry formats support arbitrary numbers of vertex attribute channels. Modern engines support binding arbitrary vertex attribute channels to arbitrary material properties. You can easily wire this up in the Unreal Engine material editor, and import the data from a FBX or USD or similar rich data format.

I think I've even seen models on the Unreal Marketplace which use one set of vertex colors for actual color/tinting, and another set of vertex colors for distress map blend – Unreal supports “vertex color paint,” where you can make the red channel blend in grime, the blue channel blend in wetness, and so on. It will then store the vertex channel data you modified separately from the imported asset data, and merge them at build time.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement