Hi,
I’m trying to take a poly model, and duplicate it.
I then want to offset the duped model’s vertices along their normals by some offset value.
Right now I’m storing the original meshes’ vertex world positions xyz to the rgb values of a vertex color map on the dupe. I’m also painting a second rgb vertex color map on the duped object for offset values (0=leave it be, 1=move it the max).
Everything should be live connections for the next part so it updates in real time.
I could keep this approach if theres a way for me to direct connect the vertex’s color to its world position. I’d also need to be able to move the vertex along its normal tho and honestly i can’t remember the vector math needed to do that. I can obviously get the unit vector of the normal but I’m not sure what to do from there? Do I multiply the unit vector’s components each by the magnitude and then do a cross product or do i add them… that seems odd?
I can make all this happen right now as a scripted process that executes and updates the values, but i want it to be live and i can’t figure out a way to connect the vertex color map values to the vertex positions. I was originally doing it with cmds (polyColorPerVertex() and moveVertexAlongDirection()) but its very slow processing out the values per vertex on even medium meshes, so i switched it over to openmaya and it sped up like crazy but that still doesnt address how to direct connect them.
Any help would be greatly appreciated!