Jump to content
anicg

UDIMs in Houdini, how?

Recommended Posts

I've done the UV's, a simple box, flat. Repeated several times.

How do I get UDIM tiles, with each segment (box) in a separate tile. Do I need to create any UDIM stuff before the UV layout?

geouv.JPG

uvs.JPG

uv1segment.JPG

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thanks. Let me start with the first automatic one, is this what you mean?

Pack into : UDIM tiles

Scale: Fixed

But these don't look like several UV tiles? do they?

is this udim.JPG

Edited by anicg

Share this post


Link to post
Share on other sites

it certainly does... right now you're using udims 1001 - 1050 if I count it right.

Share this post


Link to post
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? 

Share this post


Link to post
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;

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
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>)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×