Beginner UV question: Adding a second UV channel in Houdini 16+ [Solved]

   9486   7   1
User Avatar
Member
22 posts
Joined: Nov. 2016
Offline
I've searched around for a way of generating a second UV for lightmapping but can't seem to figure it out. There are a couple of videos, one specifically about UVing for lightmapping:

https://www.youtube.com/watch?v=U90eHb8OLr4 [www.youtube.com]

But he mentions a Layers SOP which seems to no longer exist. Is there a simple way of assigning secondary UVs in Houdini 16.5?

thanks in advance!
Edited by traden1976 - March 2, 2018 13:49:47
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
The uv nodes in 16.5 should all have uv attribute parameter that lets you enter any name for the uv set. For example, you can simply put ‘uv2’ for the second set of uvs. You can be more descriptive with something like “UVSet_LightMap”, etc.
User Avatar
Member
1743 posts
Joined: March 2012
Offline
As of 16.5, you can now name a texture mapping attribute anything. If you create an attribute with Attribute Create, you can set the type info to “Texture Coordinate” in the second drop-down next to “Type”, and (as long as it's a 3-float attribute), it'll show up as an option in the UV viewport. If you create a 3-float attribute whose name starts with “uv” and optionally contains just a number after that, it'll be an option in the UV viewport, too, even if it doesn't have the type info set. Almost all of the UV-related SOPs now have an Attribute Name parameter, so that they can operate on any UV-like attribute, instead of relying on layer attributes to indicate what to operate on. Any of them that created a uv attribute before, now create an attribute with the specified name with the type info set to Texture Coordinate. These options made the Layer SOP workflow, (which would inevitably become quite confusing quite quickly), no longer necessary.

I don't know specifically what you're trying to do with UVs, but hopefully that at least helps clear up the confusion a bit.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
22 posts
Joined: Nov. 2016
Offline
Thanks guys! That helped a lot.

Cheers
User Avatar
Member
10 posts
Joined: June 2018
Offline
How do you control which uvset is displayed in the viewport?
User Avatar
Member
1743 posts
Joined: March 2012
Offline
raparicio0
How do you control which uvset is displayed in the viewport?
When you're in the UV viewport, the dropdown that would have (in the perspective viewport) controlled which camera is being viewed through, instead controls which texture coordinate attribute is displayed. The menu is automatically populated based on the currently displayed geometry's attributes. Hopefully that's what you were looking for.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
10 posts
Joined: June 2018
Offline
ndickson
raparicio0
How do you control which uvset is displayed in the viewport?
When you're in the UV viewport, the dropdown that would have (in the perspective viewport) controlled which camera is being viewed through, instead controls which texture coordinate attribute is displayed. The menu is automatically populated based on the currently displayed geometry's attributes. Hopefully that's what you were looking for.

Thank you for the prompt answer! What i meant to ask is how do we view the current uv set on the main perpective viewport?
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Either the shader needs to be changed to use the attribute you'd like it to use in the way you'd like it to use that attribute, or you'll need to rename the attribute to uv. If you just want to visualize it, you can use Attribute Swap or Attribute Rename and then UV Quick Shade.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
  • Quick Links