[Closed] vertex color animation dynamic/bake?
I’m attempting to apply a vertex color animation per frame using registerTimeCallback fn, but I’m now realising that it will not work with render. I’m not sure where to go from here :banghead:
Any tips on what approach would be a better one?
My end goal is to use the vertex color with volume select and likely a push… there may well be a shortcut there that I’m completely oblivious about.
fn updatevertcolor =
(
now = currentTime.frame as integer + 1
if now < buffedframes.count do
for i = 1 to buffedframes[now].count do
(
c = buffedframes[now][i]*3+128
vcolor = color c c c
meshop.setVertColor $GeoSphere01 5 i vcolor
)
)
registerTimeCallback updatevertcolor
Vertex colors can be animated with the unwrap UVW modifier. Set it’s mode to vertex color and move some textureverts around (while show vertex colors is on). This can be animated and scripted. UVW space acts like RGB for vertex colors.
Hope this helps!
-Johan
Thanks Johan! This I completely forgot about, I weakly recall being stoked about it when this first came to my attention/was announced at some point, must have been out of the loop for too long …however I can’t seem to find all that much documentation of this in the 2010 maxscript reference…
How will I find the uvw-controller for a given vertex? say I needed to clean up a mess…
I have tried to bake vertex color animation before by piping the XYZ coordinates of a second mesh into the UVW channels of the first mesh, but for anything but the most simplistic geometry this was extremely slow and buggy.
Please let me know if you found a useful way!
Good luck
– MartinB
Martin, did you use the UVWunwrap modifier? Or do you use channels? (skip that, it won’t cary over animation…)
If I animate verts in the UVWunwrap dialog, I get fast update times in my viewport.
-Johan
I skipped the vertex color because I also found it too slow and just went ahead to make a simpleMod to push my data instead… which can be baked with a point cache and my troubles are over…
While still curious on the vertex color I found that adding keys to the subAnim controller directly was about 7-8x times faster then using setvertexposition..
animate on
at time t1
if (uvw[v1]) != undefined then
uvw[v1].controller.value = vpoint3
else
uvw.SetVertexPosition t1 v1 vpoint3