Jump to content

UDIMs in Houdini, how?


anicg

Recommended Posts

most straightforward method is to use UV layout SOP that can distribute uv islands automatically into arbitrary number of udims, based on some parameters available. or, if you want more specific distribution, you can create a udim primitive attribute that specify at what udim any particular primitive is supposed to end up and supply that into uv layout SOP. then you can also use more exotic methods like vex code or looping methods to distribute pieces of geometry into udims by some user specified rules. for this simple case thou, uv layout should be more than enough.

Link to comment
Share on other sites

45 minutes ago, davpe said:

or, if you want more specific distribution, you can create a udim primitive attribute that specify at what udim any particular primitive is supposed to end up and supply that into uv layout SOP. 

Cool, many thanks. Some go by twos and some are by ones (difference in resolution), how do I do the next step (in quote) of gently asking each one of the UV islands to go to a defined/separate tile? 

Link to comment
Share on other sites

well the most straightforward way seems to be to set the uv layout scale to slightly bigger number so two pieces never fit in a single udim (that is if they're not forming a single uv island).

other way is to generate a udim attribute beforehand and tell uv layout to look at that (Target Assignment > Target Atrribute). for example, if you want a single poly per udim, you can calculate udim from primitive number. in primitive wrangle, something like this would do the trick i suppose: i@udim = @primnum+1001; 

if your islands are containing multiple polygons, you can use Connectivity SOP in UV connectivity mode. that will generate 'class' attribute per uv island which can be used instead of primitive number: i@udim = i@class+1001;

Link to comment
Share on other sites

  • 11 months later...

Correct me if I'm wrong. The target assignment override within the UV layout sop, creates a default attribute called; udim.  Then you can specify the primitive for the UV island, for example; 410:1002 is primitive 410 and should move the uv island associated with primitive 410 to udim 1002, as mentioned in the documentation ? 

From this thread, it appears as though it doesn't do that; rather, it keeps the islands packed within the first udim or 0-1 space ?

Link to comment
Share on other sites

9 hours ago, CinnamonMetal said:

The target assignment override within the UV layout sop, creates a default attribute called; udim

it doesn't create any attribute, but if you have integer prim attribute with the same name as specified (default: udim) it will be used to place those islands to udims based on that value if target is UDIM Tiles

or it will use that attrib to place islands to rectangle matching the index from attribute if target is set to Rectangles and Default Target is specified

additionally to that attribute you can specify overrides in Overrides parameter with the format you described (<primitive>:<udim or rectangle index>)

Link to comment
Share on other sites

9 minutes ago, CinnamonMetal said:

Is it possible to replace the override primitive option, with a group ? The Target Assignment does what I want, except; I want to move groups into a different UDIM tile, that is where I think, it's not possible with the Target Assignment override.

just assign desired value of udim attribute to your group before UV Layout as described here, you don't have to touch the override parameter

it's important however that the primitives with the same udim attribute value form an isolated uv island, UV Layout doesn't seem to be split them otherwise

Link to comment
Share on other sites

  • 1 year later...

Is there a way to query/return the UDIM tile number for a certain piece of geo?

For example, I want to QC that the modeling team have laid the UVs into the correct tile - it would be great to be able to assign the color red if /my/geo/path/car_door_001 does not live in tile 2005 etc etc...

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...