Gormio
30-10-2007 14:20:04
Is it possible to make such an object in Max that it would export some data as a specular colour vertex buffer? I am able to export vertex colours to the diffuse colour buffer but not specular. What are the rules for the vertex colour exporting in general (meaning what change in Max affects to the exporting and how)?
Lioric
30-10-2007 17:42:38
Any modifier or manual change that works on the object's map channel 0 will affect the vertex color buffer
The RGB values of the vertex (vertex color) are stored in the map channel 0
See your max documentation on what modifiers or methods you have to modify the vertex color channel
Internally max do not store specular color, it has diffuse, illumination color and alpha values (wrt vertices data)
You can create a vertex data buffer with the specular color by using the VertexPaint modifier to add specular data to the object, working on a specific map channel (3 or 4, if you are using multiple sets of texture UVs), this will produce a mesh with the specular vertex data in the TEXCOORDn (where n is is the channel number as defined in the vertex paint mod - 1) channel, you can access this data in a vertex shader
Do you need to access this data in fixed function or via shaders?
Gormio
31-10-2007 09:49:20
Any modifier or manual change that works on the object's map channel 0 will affect the vertex color buffer
The RGB values of the vertex (vertex color) are stored in the map channel 0
See your max documentation on what modifiers or methods you have to modify the vertex color channel
Internally max do not store specular color, it has diffuse, illumination color and alpha values (wrt vertices data)
Yep, I have found appropriate ways to create diffuse vertex colors.
You can create a vertex data buffer with the specular color by using the VertexPaint modifier to add specular data to the object, working on a specific map channel (3 or 4, if you are using multiple sets of texture UVs), this will produce a mesh with the specular vertex data in the TEXCOORDn (where n is is the channel number as defined in the vertex paint mod - 1) channel, you can access this data in a vertex shader
However this I can't seem to get to work. Does this work on the CE exporter? I do have access to Pro version also but have been testing with the CE version so far.
I made a test scene where there are a bunch of planes set up differently. Those export diffuse vertex colors as I would expect but none of them export specular vertex colors.
Test scene.
I would expect at least some object from the set:
- modifier_map_channel_3_with_uv
modifier_map_channel_4_with_uv
modifier_map_channel_3_and_4_with_uv[/list:u]
to export specular vertex colors.
Do you need to access this data in fixed function or via shaders?
I would think that both.