bloomendale Posted May 29, 2013 Share Posted May 29, 2013 Hi. Could someone suggest working method to get prefractured geo with rendertime displacements render as one object while frags are together. The problem is if i have separate normals for border points of inside and outside groups then i of course have cracks and sometimes inside geo even visible through outside. If i have my normals averaged i have visible "canyons" identifying my pieces. i can average border normals when piece is "unglued" but this dynamic change of normals it won't work in many cases. what is the right strategy? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Scratch Posted June 9, 2013 Share Posted June 9, 2013 (edited) Digital Tutors has a excellent Video Tutorial explaining the shader setup for such a case. http://www.digitaltu...ring-in-Houdini Last Lesson The thing is, you can't displace "along normal", because the normals face each other on the contact area of the pieces, causing interpenetration when doing displacement like this. What works is just to add noise (1x low frequency, 1x high frequency) to the point position (using rest position for position on the noise to avoid swimming through the noise when the pieces move) and connect that to a displace along normal node, but not in the usual way. Just pipe the result through, it will recalculate/update the normals after moving the points with noise, thats all we need it for. With this setup, the crack-lines will match perfectly, and will not be visible when the pieces are packed together. I've attatched the shop-network of this custom shader setup and a screenshot showing a fractured donut rendered using this shader. It works fine fine for me, hopefully for you too! All the best! Edited June 9, 2013 by Scratch Quote Link to comment Share on other sites More sharing options...
bloomendale Posted June 9, 2013 Author Share Posted June 9, 2013 (edited) Thanks for detailed answer. Yes, i know about this trick. It alters geometry but what i'm looking for is a way to combine different displacements without cracks (or penetrations) and do not alter shape significantly. So i think i need to use blended normals to displace (to avoid cracks) and another normals (from sops or using shading normal vop) in surface shader. And i need somehow blend amounts of displace from different shaders on border points (where 2 prims with different materials meet). It's most difficult part for me). Let's say we have 2 prims. upper prim has normal 0,1,0 and right prim 1,0,0. I have different displacements (texture or noise). And i want to render these prims as connected but "faceted" (no averaged normals on edges). So i need 2 different sets of normals: blended on the edges - for displacement, and separated - for surface shader. And i need to displace points on edges on average amount of two shaders or i will end up with cracks (even if i have the same normal) - I don't know how to do it properly. That's the question) Edited June 9, 2013 by bloomendale Quote Link to comment Share on other sites More sharing options...
anim Posted June 9, 2013 Share Posted June 9, 2013 if it's for object that has a displacement like z-brush sculpt that need's to match then what about storing normals before fracturing (under different name) and use those later for displacement? you can as well just transfer them after fracturing from unfractured geo then they will be the same as on original geo and you can still use whatever displacement was built for that and you can of course blend in some noise for inner pieces using depth attribute if you want Quote Link to comment Share on other sites More sharing options...
anim Posted June 9, 2013 Share Posted June 9, 2013 ah, now I see that you want to mix different displacement shaders then you can store per each border face 2 texture paths say map1 is always primary for that piece and map2 is neighbour piece map then all you need to do is create blend attribute which is 1 everywhere except fracture borders where it is 0.5 and in displace shader mix those 2 maps based on that blend value, then you can apply the same displace shader to all pieces and it still can be different for each the same way for blending noise and texture, of course if there is more different displacements meeting somewhere then you need to blend more of them but I'd say definitely one displacement shader since to get average displacement you need to evaluate every noise/texture that contributes to that shading point 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.