transform color map from one uv map to another

   5076   4   1
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Is there a way to transform a color map from one uv map space to another?

For instance, if I have a color map applied to an object the way I like it, but I want to create a new uv map for the object and transform the color map to fit the new uv map the same way, how would I go about it? I would like to be able to bake out a image sequence of these color maps from one uv space to another. Would I do this in cops?

Thanks in advance!
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
You can do this easily with a mantra ROP node. go under properties, render. At the bottom, set your UV render object to your object with the two UV layers, and the UV attribute to the UV layer you are baking to (ie uv2)

Hope it helps!
-G
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Thanks G! That works great!

I got stuck for a sec because the mantra rop doesn't seem to work unless there is a camera in the scene (even if it isn't being used). Also, it appears to only work with uv maps assigned to vertices (which I'm sure theres a computational reason for).

Out of curiosity, do you happen to know if there is a way to do this in cops and/or vops as well?

Thanks again!
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Hey, yeah good catch about the camera I forgot to mention that Mantra does require you to specify a camera regardless

I actually did not realize that the attribute had to be vertex base, but I guess is fine since promoting down to vertices (or demoting?) should not change your visual results.

Another way I have done this before (In SOPs) is by:

- Use a vertexSplit to split your geometry based on where UV shells are 9set UV as your parameter)
- Use a point SOP to convert your geometry from 3D to UV space (set your position to be $MAPU, $MAPV, $MAPW
-Set a camera to aim at the UV geometry (set it to be ortographic, and use expressions to get it to always frame your UV mesh)
-Render with either OpenGL ROP or Mantra ROP


I am not sure if you can do it with COPs as they mainly deal with compositing operations (i.e. pixels). There is the geometry COP but I do not thing it will import a shaded mesh. However, you can feed the output of your mantra or OpenGL ROPs into either a Render COP or a File COP

You could also do what I mentioned above with VOPs by swizzling your UV attribute with your position, but the setup using SOPs is quite simple
-G
User Avatar
Member
63 posts
Joined: Sept. 2009
Offline
Very helpful, Thanks! I think I'll be sticking to your first suggested workflow but its great to comprehend other ways of doing it to better understand what's happening behind the curtain.

Best,
Nick
  • Quick Links