Jump to content

Problematic subdivide SOP


ajz

Recommended Posts

Hello.
I'm trying to subdivide an object in order to export it for texturing. Because later I will be using subdivision at rendertime, I need to either use Mantra-compatible or OpenSubdiv algorithms.

But with both of them I have problems.

Mantra-compatible doesn't smooth UV borders. This normally wouldn't worry me much, but the thing is that it also has troubles smoothing one area of my UV set, which happens to be one of the most visible parts of the model:
post-12470-0-60190100-1424125630_thumb.j
What puzzless me, is that even with 0 subdivision levels it affects UVs:
post-12470-0-78963100-1424125627_thumb.j

For comparison - original UVs:
post-12470-0-35710200-1424125624_thumb.j

In fact, for some reason Mantra-compatible CC algorithm rips off the inner loop - disconnects it from the rest of the UV island, making two UV islands out of one. :blink:
I marked the new island on the image below. I also moved a several faces to better visualize the lack of UV continuity.
post-12470-0-09545400-1424128642_thumb.j
Why does this happen?

OpenSubdiv CC algorithm seems to fare much better when UV-smoothing this region:
post-12470-0-74717900-1424125640_thumb.j
But it removes all primitive groups. And I need them to easily manage objects when I will be painting textures. So to use it, I would have to recreate all groups from scratch.

Can I do something about those two problems?

Link to comment
Share on other sites

well if the latter keeps primitives attributes (I am not sure if it does) you may just add a prim attribute as a stand-in for your group,

which you may also convert back into a group after the subdivision if you want to ;).

 

Also have you tried the "smooth vertex attributes" toggle, or introducing a crease attribute?

  • Like 1
Link to comment
Share on other sites

Thanks Twan. This was a very good idea.

I encompassed subdivide SOP with two Python SOPs. One creates a prim attribute and fills it with primGroup names for each Prim, the other restores those groups from attributes. It's a little bit on a slower side (5 seconds to cook a SOP with 350 000 primitives), so I'll probably need to look into a VEX-based solution once I start feeling more comfortable with this language.

 

What I am curious about is the reason behind making subdivide SOP's OpenSubdiv algorithms drop primitive groups. Did SESI simply overlooked this, or is it how it supposed to work (and why)?

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