Jump to content
Tato

Edge Displacement on fractured pieces

Recommended Posts

Cool stuff... Just found out about this thread. We did this on R.I.P.D. wish I had the example file handy, and the time to make a practical example. The secondary trick is to make the UV space not stretch. Gordon Chapman did the transform matrix for most of this, and I did the shader stuff and maintained the pipeline.

Once you finish it all out, a thing to keep in mind is to keep it robust so that it makes it through different artist hands. If you put this work in your own voronoi fracture sop then it becomes a lot easier to work with. Plus if you concatenate it into a struct like method to limit your attributes from the prims to be displaced, the uvs, and the special vectors, to carry it to the shader and then deconstruct it there you will save your self some pain when artist break the fragile pipe. Also once in the shader you can go to town with different noise attributes. We had concrete, wood, and a few other materials work, quite nicely.

  • Like 1

Share this post


Link to post
Share on other sites

+1 I'd love to see your wrangle implementation!
 

  • Like 1

Share this post


Link to post
Share on other sites

I would love to see some examples, too!!

  • Like 1

Share this post


Link to post
Share on other sites

Thank you, Ben for the useful tips! I just finished the uv part, so more files and examples are next to come (:

 

cBDcfdP.jpg

Edited by rayman
  • Like 8

Share this post


Link to post
Share on other sites

(:

Completely procedural Edge detection based on cusp angles to generate displacement masks:

J6ZVUl7.jpg

  • Like 5

Share this post


Link to post
Share on other sites

HIP

 

It`s a mess inside shader/vop so it is better to look at wrangle to see what exactly is going on. It`s basicly exactly the same thing.

SOP_EdgeDisp_Curved_v06.hipnc

Edited by rayman
  • Like 3

Share this post


Link to post
Share on other sites

Hi Pavel:

 

This looks really promising. Can I see it on a bunny or a teapot? :P  Really looknig forward to digging in to your techniques.

Share this post


Link to post
Share on other sites

Epic thread is epic

Share this post


Link to post
Share on other sites

Hi Pavel:

 

This looks really promising. Can I see it on a bunny or a teapot? :P  Really looknig forward to digging in to your techniques.

There will be problems on thin areas (bunny ears for example), where displacement magnitude is greater than object thickness. This probably can be avoided with some displacement value variation based on thickness. Sounds like another intersection check (:

 

Edit:

nwT6PBr.jpg

In these areas I`ll probably will try to implement some kind of adaptive multi-segment displacement (something similiar to Igor`s tehnique)

Edited by rayman
  • Like 1

Share this post


Link to post
Share on other sites

This is fantastic! Thank you Pavel

 

Im also curious to see igors point cloud method, is that something we can take a look at also? 

Edited by A. Morales

Share this post


Link to post
Share on other sites

Pavel. You are amazing, sir. This is really useful stuff!! Thank you!

Share this post


Link to post
Share on other sites

Okay Fellas. I'm throwing my hat in the ring, here. I've made a few additions to Pavel's file. I hope you all find them useful!

 

I am more interested in the displacement of geometry than the displacement at the shader level for the following reasons.

  • If you are not in a Mantra pipeline, it's easier to pass along the displaced geometry to another renderer.
  • You can add another level of displacement to the newly-shaped, cracked geometry.
  • If you want accurate collisions, you'll want these large scale cracks in the geometry.

So, I added the following features (all of which can be vastly improved and optimized).

  1. Created a group out of the edge points and edge prims.
  2. Used those edge groups to cusp the vertex normals of only the edges. In many shaders, you'll want water-tight geometry. Faceting can cause faces to explode outwards when displacing along normal at render time. This gives you crisp edges, while keeping the rest of the curved surfaces smooth. See the .gif attached.
  3. Used those edge groups to create an edgeDisp attribute with a falloff (the blend of the attribute can be done better). I used this attribute in the existing wrangle SOP to limit the crack-displacement closer to the edges. Why? Because this preserves the integrity of the geometry a little better. Without it, there tends to be more overlapping polygons on the surfaces further from the edges. See the .gif attached.

I'm also attaching the .hip file. I colored the changes I made in red.

 

Click on the .gifs below to better understand what I'm talkin' bout.

 

post-2072-0-59114500-1396934036_thumb.gi

 

post-2072-0-06804400-1396934106_thumb.gi

 

.hip file on it's way!!!

SOP_EdgeDisp_Curved_v07.hipnc

Edited by fxrod
  • Like 6

Share this post


Link to post
Share on other sites

To add to Francisco comments...

 

With dynamics and this type of render within mantra especially use "vertex normals", because vertex normals will stretch geometry over displacement gaps. Point normals will separate when displaced apart in mantra. This is also alternatively helpful in a dynamic pipeline, since, when you run your countless connectivity, assemble, and voronoi fractures you will not have ever face be it's on piece... 

 

So in my mad crazy voronoi fracture with this displacement at the end of it based on the @name=__outside=0 "group" or whatever it is you do this this displacement magic. And at very beginning of the input chain I auto convert point normals to vertex normals with, haspointattribute(opinputpath(".",0)) in a switch with default on right and on left promote attribute from point to vertex, and then do the something similar with a following switch option to create vertex normals(vertex sop has cusping and creating) if hasvertexattribute() doesn't exist. Also convert the internal cusping node to a vertex sop cusp.

 

Honestly if working with mantra don't give your user option to work in point normal land in this type of pipeline when rendering to mantra. Because when there becomes a seam it becomes your issue to solve. I would even sneak into your export rops for your "assets". Soon as one of those attributes breaks it's all down hill, to bug fix land.

 

lol, I miss you mantra!!! lol

Share this post


Link to post
Share on other sites

This thread is gold, thank you gentlemen!

Share this post


Link to post
Share on other sites

Does anyone know how to fix them overlapping polys that we still have left over? I'd like to 'relax' those overlapping polys, similar to uv relax.

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

×