Vert Lighting in T3D. Torques or Max's responsibility?
by Rob Bednarek · in Artist Corner · 09/07/2010 (3:45 pm) · 10 replies
Not sure if this is the best place for this question, but it kinda ties in.
What's the scoop with vert lighting in T3D? for the life of me I havent been able to find out how to do it. Here comes the tie in. In Max you can "Vert Paint" lighting onto an object, can you export the data with the model in a way that T3d can read? or is the solution entirely Torque based? I'd find it hard to believe that it just CAN'T do it, as 95% of all pro games still use vert lighting, even if only to provide a deep AO feeling.
Thanks
What's the scoop with vert lighting in T3D? for the life of me I havent been able to find out how to do it. Here comes the tie in. In Max you can "Vert Paint" lighting onto an object, can you export the data with the model in a way that T3d can read? or is the solution entirely Torque based? I'd find it hard to believe that it just CAN'T do it, as 95% of all pro games still use vert lighting, even if only to provide a deep AO feeling.
Thanks
#2
09/07/2010 (6:20 pm)
ok, thanks for the heads up about the terminology, the latter is definitely what I was asking about. so, enabling it sounds simple enough, but how then do you go in and tell each vert what its color should be? My torque knowledge is very limited; Im one of the artists on our team, but I want to be able to light my stuff in the engine correctly.
#3
Yep, for vertColor to work, the model needs to have vertex color information. How that gets in the model unfortunately depends on the exporter. AFAIK Collada in T3D does not support vertex coloring ATM. I haven't used the Max DTS exporter myself, but it probably supports exporting vertex coloring info from models.
09/07/2010 (7:31 pm)
Yep, for vertColor to work, the model needs to have vertex color information. How that gets in the model unfortunately depends on the exporter. AFAIK Collada in T3D does not support vertex coloring ATM. I haven't used the Max DTS exporter myself, but it probably supports exporting vertex coloring info from models.
#4
Vertex colors are used with the T3D forest editor to create tree limb movements by the use of a wind emitter HOWEVER>> there are many of us that desire "vertex color texture blending" and no one has publicly noted/released anything on it. - Is this what you want to achieve?:( Link to VCTB info )
//I actually have a bounty out on this and I am speaking to someone about an implementation.
Rene, is the vertcolor flag new ?
09/07/2010 (7:53 pm)
Vertex colors are supported by collada imports (which are then compiled, by the engine, to cached.dts version 26). The Max2Dts exporters do not support this directly to DTS as they export version 24 and/or 25.Vertex colors are used with the T3D forest editor to create tree limb movements by the use of a wind emitter HOWEVER>> there are many of us that desire "vertex color texture blending" and no one has publicly noted/released anything on it. - Is this what you want to achieve?:( Link to VCTB info )
//I actually have a bounty out on this and I am speaking to someone about an implementation.
Rene, is the vertcolor flag new ?
#5
09/07/2010 (7:57 pm)
interesting, interesting. The texture blending would be useful as well, but Im looking for it mainly for, on an environment piece, when each polu cant afford to have its own unique UV space, i can still add shadows in where i want them (since I cant paint them onto the map)
#6
09/07/2010 (8:03 pm)
oh! ..you'll need to write your own shaders or engine functions to get that to work. Unless Rene can shed some light on it for the both of us if he replies about the 'newness' of the vertflag.
#7
Yes, actually it is new for b2. (I'm hopping to and fro between so much stuff, it took me a couple of mins to realize this is even my own code :) I added diffuse vertex coloring for decal rendering.)
//Edit
If the mesh has vertex colors and the material is rendered with vertColor=true, everything *should* work.
09/07/2010 (8:06 pm)
@ebYes, actually it is new for b2. (I'm hopping to and fro between so much stuff, it took me a couple of mins to realize this is even my own code :) I added diffuse vertex coloring for decal rendering.)
//Edit
If the mesh has vertex colors and the material is rendered with vertColor=true, everything *should* work.
#8
Hey Rene, how would one use it for decals when the vertex color data is in a mesh ? Are mesh decals implemented in 1.1B2 ? thx
(I haven't used 1.1B2 yet, waiting on newer EULA)
09/10/2010 (6:38 am)
oh, "diffuse vertex coloring"...I read more out of that than I should have. That is great to have too!Hey Rene, how would one use it for decals when the vertex color data is in a mesh ? Are mesh decals implemented in 1.1B2 ? thx
(I haven't used 1.1B2 yet, waiting on newer EULA)
#9
The decals are all planar. The decal manager uses the vertex coloring for decal fading, i.e. just the alpha.
09/10/2010 (11:10 pm)
@ebThe decals are all planar. The decal manager uses the vertex coloring for decal fading, i.e. just the alpha.
#10
09/11/2010 (3:05 pm)
thx
Associate Rene Damm
I think what you're really going for is vertex coloring here not vertex lighting. Vertex lighting is what games used to do when true dynamic lighting was still out of reach and games would simply compute the light color received from one or more lights at a single vertex and then interpolate that across triangles.
Vertex coloring on the other hand just uses a pre-assigned vertex color (rather than computing it from nearby lights) and then interpolates that across the triangle. This is probably what you are going for. You can enable that by setting the "vertColor" flag on the respective materials.