Jump to content

Saving Vertex / Point Colours into UV Texture


sb526

Recommended Posts

Hi everyone!

 

I am struggling with something which I think is really simple but just can't make it work. Which is, I need to bake the Cd attribute from the geometry into a UV map. I have a mesh that has a Cd attribute which seems to be successfully picked up in the UV space through a series of manipulations.

That said, I cannot find a way to write this coloured UV texture into a file. Even if I try to troubleshoot with manually saving via "Texture UV to Image" I get the wireframe result on the right hand side.

I suspect I might need to use COPs but I'm not familiar with how they work.

Any suggestions?

help.PNG

Link to comment
Share on other sites

One way would be to first transform the points into uv space.  You can achieve this by adding a VertexSplit node to the end, and then using a PointWrangle with this:

@P = @uv;

The vertexsplit makes any shared vertex in unique points.

You could then create a square-format orthographic camera and render the mesh using the Cd value for the constant color, and align it as close as you can to the original uv layout position.

Screenshot below of Flip.

points_to_uv.jpg

p_to_uv.hipnc

  • Like 1
Link to comment
Share on other sites

4 hours ago, Howitzer99 said:

One way would be to first transform the points into uv space.  You can achieve this by adding a VertexSplit node to the end, and then using a PointWrangle with this:

@P = @uv;

The vertexsplit makes any shared vertex in unique points.

You could then create a square-format orthographic camera and render the mesh using the Cd value for the constant color, and align it as close as you can to the original uv layout position.

Screenshot below of Flip.

 

Thanks Howitzer. That's a nice solution - I thought about something like this but did not know about the Vertex Split node.

I still feel like there there should be a way to simply bake the colour attribute into UV map through a Mantra Bake Texture node (https://www.sidefx.com/docs/houdini/nodes/out/baketexture.html) or a COP node (https://vimeo.com/203939469). I am yet to understand the process though. So far my Bake Texture attempts return a white texture and I haven't worked with COPs before.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...