Jump to content

Edge Displacement on fractured pieces


Tato

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

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