Search - User list
Full Version: multiple UVSets as input?
Root » Houdini Engine for Maya » multiple UVSets as input?
grayOlorin
I seem to recall this is supported right? just like we support multiple vertex colors sets on inputs?
awong
Multiple UVs input isn't supported yet. Once I'm done my current task, I can probably look into adding it though.
grayOlorin
Ah! thank you Andrew! hopefully is not too bad now that you have color sets working
awong
It shouldn't be too bad. I actually submitted this as an issue on GitHub [github.com] a while back. I guess no takers.
grayOlorin
Ah I never have worked through github before. I gotta give that a try at some point. Since adding this is not too hard , how do you go about submitting a code change in there? Would it eventually roll with a Houdini build?
awong
Yup, once we accepted your changes, it'll be part of the Houdini build.

Contributions on GitHub are done through “pull requests”. Since you can't modify our GitHub repo directly, the idea is that you “fork” our repo on GitHub. Then, you can “push” your changes there, and submit a “pull request” to us. And when we accept your changes, we'll “merge” your changes into our GitHub repo.

Feel free to take a look, and see if you have the time to work on it. If not, no worries. But this is the chance to have your name engraved in our code history forever!
grayOlorin
just saw this in in 14.0.304! thank you very much sir!!
awong
Forgot to post a reply yesterday… Yup! Give it a try!
grayOlorin
hey Andrew! just had a chance to take this for a test ride and it seems to work nicely, thank you

One thing that caught me by surprise though:

- the current UV set in maya come into Houdini as an attribute (uv)
- other UV sets come into Houdini with their “maya” names (i.e. map1)

So I am wondering:

- should we ensure that we either respect the “houdini” way of using uv layers, or use maya's way?

- should we ensure that we map UVs to layer in the same order as they were in maya? (i.e. map1 would be uv, the next one would be uv2, etc)

The reason I am wondering

- We need a way to potentially know in Houdini which attributes are the UVs

- We do need to know how they are named in maya

the way how FBX handles it so far has worked:

- add a uv attribute layer per uvset (i.e. uv, uv2, uv3, etc).

- add variable mappings to map to the maya attribute via the varmap detail attribute (i.e. uv –> map1, uv2 —> someOtherUV –> etc)

this is nice because we basically have a correspondence in Houdini on what maya attribute layer maps to which houdini attribute layer

I do imagine this could break compatibility, but perhaps it could be an option on the houdiniAsset node? How are color sets handled?

Mind you, I also do not mind the current implementation and am incredibly grateful for you getting it working so quickly but I can see this potentially coming up as a question in the future so thought I would bring it up while I am testing this

thank you!
awong
grayOlorin
- should we ensure that we either respect the “houdini” way of using uv layers, or use maya's way?

- should we ensure that we map UVs to layer in the same order as they were in maya? (i.e. map1 would be uv, the next one would be uv2, etc)

Thanks for your feedback! Yeah, I was wondering the same thing. I suppose both ways make sense in some situation. Sometimes the UV names could matter, but sometimes you just want them to behave like layers. This really depends on how the asset wants to use the UVs. This is actually how the color sets are handled too. The “current” color set is mapped to “Cd”, and the names for the other color sets match the Maya names.

Keeping the Maya names does seem weird though, because that would mean the asset needs to know what the Maya names are. I could look into adding an option to map the UVs and colors to layers (uv, uv2, uv3, and Cd, Cd2, Cd3). The names should probably not be sorted, since Maya doesn't sort the names. (For color sets, the order could matter in Maya).

It might be best to just use MEL/python callbacks to let user have control over this. But this seems to be over-complicating things…
grayOlorin
I think following the FBX import paradigm may be sufficient without too many options. Basically use the layer paradigm (uv, uv2, uv3, Cd, Cd2, Cd3), but with variable mappings to keep track of the names (uv <–> map1, uv2 <–> uvSetFromMaya, etc) to keep track of the “bindings”. The nice thing about that method is that any tools which used the FBX importer before can port to the Houdini engine much easier
awong
I see what you mean. Yeah, that might work. Let me look into it when I get the chance.
grayOlorin
Thank you Andrew I appreciate you looking into this too! Every update is a huge help on our side
Jonas Borgman
Is there any news on this front?
We are currently working with multiple uv sets, and from my tests i dont' really get this to work how i expected

I use two different uv sets with random names (“map1” and “uvSet1”), but when i load this object into my asset i get this error:
Couldn't find texture attribute (uv) for mapping from texture space to geometry.
When i grab the scene through the “Debugging/View assets in Houdini”.. (which is awesome by the way) and watch the scene in houdini, i see three uv sets, the two i created and a new one called “uv”.

Is the plan that my maya sets will be remapped to “uv” and “uv1”? which would make sense.

Additionally.. when the uvs are in houdini, are there any commands to find out how many uv sets are on the object? i used the Layer SOP to do an operation per uv set, but i hardcoded it to the number of sets i knew it to be.
I did a quick search, but not much shows up on multi uv usage, since i guess it's a pretty fresh thing.

Thanks!
awong
Jonas Borgman
Is there any news on this front?
We are currently working with multiple uv sets, and from my tests i dont' really get this to work how i expected

I use two different uv sets with random names (“map1” and “uvSet1”), but when i load this object into my asset i get this error:
Couldn't find texture attribute (uv) for mapping from texture space to geometry.
When i grab the scene through the “Debugging/View assets in Houdini”.. (which is awesome by the way) and watch the scene in houdini, i see three uv sets, the two i created and a new one called “uv”.
If you see the “uv” attribute in the debug scene, it's strange that you were getting error about “couldn't find texture attributes (uv)”. Maybe the input geometry wasn't sent to Houdini correctly?

Jonas Borgman
Is the plan that my maya sets will be remapped to “uv” and “uv1”? which would make sense.
Yeah, that's the plan. Right now I'm considering mapping UVs and colorsets into:
  • uv, uv2, uv3, …
    Cd, Cd2, Cd3, …
    Alpha, Alpha2, Alpha3, …

    This should match with what Houdini users are used to. This would break compatibility with the existing name mapping though. And for accessing the original name in Houdini, I'm thinking of having two detail string array attributes that have values like:
    maya_mesh_uv_original =
    maya_mesh_uv_mapped =


    Jonas Borgman
    Additionally.. when the uvs are in houdini, are there any commands to find out how many uv sets are on the object? i used the Layer SOP to do an operation per uv set, but i hardcoded it to the number of sets i knew it to be.

    If you setup layer attributes in Houdini, you'll have a detail attribute called “layercount” that stores how many layers there are. So I could mimic that when passing in the Maya geometry.

    However, this count is associated with all the layer attributes, so both “Cd” and “uv” should have the same count. This isn't true in Maya though, since Maya UV and colorsets are completely independent. So the “layercount” that comes from Maya would probably have to be the maximum number of UV sets and colorsets.
anon_user_32967607
Really looking forward to it! Is there any estimate on when this support for multiple UVs could be in?
awong
If I don't get caught up with other things, I really hope to have it in some time this week. Also, just to clarify, multiple UV support is already there, but the attribute naming is not friendly with Houdini tools. So hopefully the new change will improve this a bit.
awong
I'm done changing the names of colorsets and UVs. The changes should be in today's build (14.0.372). This is basically from the journal:

When inputting colorsets and UVs, follow Houdini's naming convention for the attributes.

Colorsets are mapped to:
Cd, Cd2, Cd3, …
Alpha, Alpha2, Alpha3, …

UVs are mapped to:
uv, uv2, uv3, …

The original names of the colorsets and UVs are stored as detail attributes.

Original name of colorset:
maya_colorset_name
Names of mapped attribute:
maya_colorset_mapped_Cd
maya_colorset_mapped_Alpha

Original name of UVs:
maya_uv_name
Names of mapped attribute:
maya_uv_mapped_uv

Attached a screenshot showing the UV case.
raparicio0
Hello! im trying to get this to work, and was wondering if you could give me a little direction. I understand that the workflow to get the uvs and color sets to be named what our pipeline needs is to set up some attributes to later change the name. What i dont understand is how to go about doing it. So i figured i'd post a few screenshots to see if im on the right track.

At the very bottom of my digital asset, i made an “attribute create” node, and set up a few attributes, with strings. But when i brought it back into maya the names didnt change.
juliap
At least one of the same issues as with the multiple Color names the attributes that the plugin uses are string tuples (and not string arrays and not multi parms) - Of course just changing it to tuples didn't fix all the color set problems in the recent maya_color_set post, so I will make sure I can still get it to work locally. Note that the output mapping was broken until 16.5.364, so if you're using an older version than that you will need to update.

I created a python sop which just hardcoded the name mapping:
node = hou.pwd()
geo = node.geometry()
a1 = geo.addAttrib(hou.attribType.Global, “maya_uv_name”, “uv”)
a2 = geo.addAttrib(hou.attribType.Global, “maya_uv_mapped_uv”, “uv”)
geo.setGlobalAttribValue(“maya_uv_name”, (“map1”, “uvSet”))
geo.setGlobalAttribValue(“maya_uv_mapped_uv”, (“uv”, “uv2”))

Which successfully set the maya names
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB