Jump to content

Edge Displacement on fractured pieces


Tato

Recommended Posts

So I've got rayman's setup working quite well in my scene.

I wanted to keep an inside\outside shader setup though so I thought I could use the blend value in the displacement shader to drive a layered material blend. I tried this and it worked really well until I applied motion blur. When motion blur is on I get a weird mix happening (see attached images). It's like the geometry is pushing through the mask so that the mask ends up be in the wrong place or the mask just isn't being motion blurred. 

I don't suppose anybody else has come across this issue or understands the code enough to give me a hint about what's going on?

mblur.jpg

no_mblur.jpg

Link to comment
Share on other sites

yeah, share the file pls... it looks like you have overlapping faces (or offset by some tiny distance, something like 0.00001 units) with different colors applied and there is not enough motion blur steps to render that offset precisely. so I would inspect that first being you.

Link to comment
Share on other sites

sorry man, your file has too much stuff going on inside to be possible to quickly inspect. but:

a: when I write cache and render, everything is just blue - no inside/outside mask.

b: ROP is set up in a way that Mantra is trying to run the whole sim thing before rendering (bad). always point the ROP specifically to the objects that are supposed to be rendered (Force objects), not to "everything" in your scene, relying on Mantra to figure it out. it will also make your scenes more human readable and easier to find a problem. it wouldn't be a surprise if this was a part of your rendering issue (you may be rendering something that you don't know you actually are rendering)

c: the object that I figured you are probably trying to render has a whole pile of stuff in it to be evaluated prior rendering. that is not great and it is another likely candidate that may contribute to the render issue. cache everything out first and then just render a plain cache. your renders will be faster with a more predictable results.

cheers, D.

Link to comment
Share on other sites

Hello!

I think what we observing here is just wrong matrix interpolation error. I'm not sure if I posted the last version of this setup here, but I switched from computing restP on the fly from pieces matrix to simple pre-computed restP as the results are much more predictable. Fortunately all you have to do is to find these lines:

restP = ptransform("space:current", "space:world", @P);
restP *= mxinv;

 

and replace them with:

 

restP = v@rest_p;

 

and you should be ready to go.

 

Cheers!

Pavel

corrected.jpg

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 3 weeks later...
  • 5 months later...

So I've gone thru this thread a few times, downloaded Pavel's excellent examples but was wondering if there is any consensus as to the best SOP based approach to Edge Displacement for fracturing? 

I am using primarily GPU based renderer's for my work and am unable to translate the Displacement shaders over, one of the reasons I am focusing on SOP based approaches.

The problem I am having with ANY of the SOP based examples posted is that they all break when using anything more complex than a simple sphere or cube. Frustrating.

 

 

Link to comment
Share on other sites

@art3mis If you are doing a SOP based approach, what is stopping you from using the Boolean SOP to make cuts? You can use proxy geo for your simulation and then replace the proxy geo with your high res geo post sim. Unless you are specifically tied to voronoi for some reason?

Link to comment
Share on other sites

Hi Ryan

Funny you should mention. Finding out about Boolean shatter for fracturing was what led me down this long road into edge displacement.  

But in tests I've done so far the results with Boolean Shatter have been EXTREMELY slow to cook, and the results IMHO don't look quite as good as some of these voronoi edge displacement tests!

So for now am focusing on voronoi.

My vote on the most 'most promising' SOP based approach is Farmfield's.

Simple in its execution without tons of VEX code, so something my feeble brain can get a handle on.

Still some issues with funky edges and some RBD collision issues when interior detail is enabled on more complex geometry but it's the SOP based solution that seems most promising to me.Hoping others more knowledgeable could take a look at this approach and suggest how it might be improved further.

if I had a month free to go over and fully understand each line of VEX in Pavel's  amazing SHOP based approach I would probably favor that over any SOP based approach.  In my tests as well Pavel's SOP based solution didn't play nice with curved surfaces.

note-the attached  preview is without inside detail enabled to speed up sim

 

 

closeup.png

SOP_based1.gif

Edited by art3mis
Link to comment
Share on other sites

I recently did a shot where I simmed the high res geo as convex hulls for one part, which was fine, but then for another I simmed with voronoi pieces, and then used a very high res boolean mesh attached to the nearest voronoi piece post sim (both done as packed prims). It saved a lot of time and hassle worrying about small pieces or oddly shaped ones that would explode. It was also faster to recut the voronoi when I needed to adjust where something was breaking than it was to re cut the mesh too. I basically over-did the boolean part of it so I never had to worry about having enough detail, and not having any overlapping shapes in the sim helped.

  • Like 2
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...