Jump to content
Tato

Edge Displacement on fractured pieces

Recommended Posts

Thanks for the quick feedback and the tips. I`ll create another update soon( not right now as I don`t have working viewport on my laptop :/ ).

Edited by rayman
  • Like 1

Share this post


Link to post
Share on other sites

Also it would be great to have the node in wich i can put an other material with an other displacement for the extorior part and many thanks for your help!

Edited by Grucho
  • Like 1

Share this post


Link to post
Share on other sites

Thanks everyone for this thread. It's amazing. And Pavel, you are a genius! Thank you so much for sharing all your incredible knowledge. Just wanted to say I did a render test and did not have a problem with faceted normals. Keep it up man, you're an inspiration :)

Edited by juztn

Share this post


Link to post
Share on other sites

Thanks!

I just did some tests an it seems that sops part is working fine (both displacement and uvs) on 13.0.310.

 

 

P.S. the sops version (displaceSop and uvs) under it don't seem to be functioning.

Share this post


Link to post
Share on other sites

I probably messed it up. It was late. :) I'm going to spend some more time dissecting it tonight probably. Thanks!

Share this post


Link to post
Share on other sites

Pavel, this is great but not sure how the uv setup works. I have checked the code in the displaceSOP node but I'm not sure how the uv's are handled as it does not seem to take into account the projection done in the "uvs" section above.

I am also unsure about the boundGeo node. I understand this imports the geometry but at what point is the geometry assigned to the variable in the snippet? Hope that makes sense,,,,

 

edit: missed the boundGeo parameter. Just gonna try to link it to a node for testing instead :)

 

J

Edited by juztn

Share this post


Link to post
Share on other sites

Hi All

 

Thats a great thread and great help so thank you all especially Rayman.

 

I am fairly new to houdini so I dont fully understand the setup as its still complicated for me. 

 

I was wondering something and forget me if my idea is riduculous .

 

The voronoi fracture SOP has some functionality for adding interior detail. 

Can we somehow take this functionality in the shader?

I dived inside the voronoi asset and it looks like its  doing it by sampling an SDF and applying noise based on a depth attribute. It looked simpler to me at least.

I cant figure out though how to implement it on a shader or if its possible .

 

 

Share this post


Link to post
Share on other sites

Unforutnatley, the detail produced from voronoi fracture is only applied inside pieces, not on the outside edge of the pieces (correct me if im wrong), so I`think its not a solution.

Share this post


Link to post
Share on other sites

I cant figure out though how to implement it on a shader or if its possible .

 

You could create a rest position on your pieces, write an sdf of the geo to disk, then do volumesample of the sdf by rest position in shader.

Share this post


Link to post
Share on other sites

Again thanks Pavel. 

 

One question, I cannot figure out how to add an other displacement map for the outer face. I have tried to mask it without any success. I hope again you can help.

 

Thanks!

Share this post


Link to post
Share on other sites

I'm more interested to make such displacement in SOP since we usualy export it for rendering in another software so I figured out when I convert the pieces to vdb and back to polygons with my initial geometry plugged on the second input of the convertVDB I get masks for edges, seams and interiors as well as good subdivision resolution for displacement but that happened on the first frame only and I'm not sure how can I use it in the Pavel's setup.

 

and here is the question: why we need to calculated the displacement on every frame. Isn't it possible to get that displacement on the first frame and use the transform from the lowres pieces to drive the hires ones?

Share this post


Link to post
Share on other sites

Again thanks Pavel. 

 

One question, I cannot figure out how to add an other displacement map for the outer face. I have tried to mask it without any success. I hope again you can help.

 

Thanks!

I`ll create some new example scenes by the end of the week (I hope).

 

I'm more interested to make such displacement in SOP since we usualy export it for rendering in another software so I figured out when I convert the pieces to vdb and back to polygons with my initial geometry plugged on the second input of the convertVDB I get masks for edges, seams and interiors as well as good subdivision resolution for displacement but that happened on the first frame only and I'm not sure how can I use it in the Pavel's setup.

 

and here is the question: why we need to calculated the displacement on every frame. Isn't it possible to get that displacement on the first frame and use the transform from the lowres pieces to drive the hires ones?

Well, in sops we don`t have to. In shops on the other hand, we have geometry that is camera dependent, and we have to recompute displacement for every visible point = better detail.

 

Another approach is to execute displacement shop and bake it to UV`s. Then use this map as vector displacement inside your render of choice. This means nice uvs for each piece (or some ptex render hack).

I tried it and it seems to work. Unfortunately I don`t have access to full H license, so maps were really small and I decided to stop working on it.

  • Like 1

Share this post


Link to post
Share on other sites

I`ll create some new example scenes by the end of the week (I hope).

 

Well, in sops we don`t have to. In shops on the other hand, we have geometry that is camera dependent, and we have to recompute displacement for every visible point = better detail.

 

Another approach is to execute displacement shop and bake it to UV`s. Then use this map as vector displacement inside your render of choice. This means nice uvs for each piece (or some ptex render hack).

I tried it and it seems to work. Unfortunately I don`t have access to full H license, so maps were really small and I decided to stop working on it.

 

 

Many thanks again!

Share this post


Link to post
Share on other sites

The only problem I see (and it should be pretty easy to fix) is the same problem I was having in mine orginially. The normals on the outside of the sphere are faceted because they aren't be resampled from the original geometry. An attribvop + xyzdist + primtive attribute run over the verts can do it pretty easily.  

Hey Solitude -- do you have an example of how this is put together?

Share this post


Link to post
Share on other sites

File attached in whatever state it is currently in. I got cut short last night while working on it.  Pretty sure I was messing with the normals for the inside faces last, so they're probably messed up still. 

 

voronoi_edge_disp_v3.hip

Edited by Solitude
  • Like 3

Share this post


Link to post
Share on other sites

Thank you, too, I really appreciate it!

 

I just did implementation of Normals correction inside shops.

Normals inside pieces are handled nicely from displace along normals node. For the outer normals on the other hand, we want to take original averaged normals from bound geometry and then blend again based on distance from bound surface. This means that additional setup outside snippet is involved, so I decided to keep it as simple as possible and dropped entirely displace along normals node and just recompute and blend everything inside snippet. This means old setup will still work, but new one handle normals differently.

 

I also updated overall code and replaced most of intersection functions with xyzdist instead(Thanks, Ian!).

Also I added internal vector space conversion, so no need for transform nodes inside shop any more.

 

There is still more work on sop part. Its not hard to recompute normals after displacement, but I want to do it inside snippet (:

I will post new version soon - just need more tests to ensure than everything is stable inside both contexts.

 

Cheers!

qwJjFNB.png

Edited by rayman
  • Like 1

Share this post


Link to post
Share on other sites

File attached in whatever state it is currently in. I got cut short last night while working on it.  Pretty sure I was messing with the normals for the inside faces last, so they're probably messed up still. 

 

attachicon.gifvoronoi_edge_disp_v3.hip

Thanks! I`m really interested in your method.

Share this post


Link to post
Share on other sites

Wow. Nice to see this topic!

 

The question on first page was about my setup. I did not see this topic before, and I just surprized why nobody noted me about this topic because I am always open to explain any of my techniques.

 

It is just very cool research about several steps displacement for curved surfaces. I did not check current setup of Rayman, but I can suppose that it would be useful to calculate width of each step by original polygon size. Because each step means one access to pointcloud so we want to minimize that.

 

Also I use quaternions instead of matrix because it is vector4 versus vector9 or 16 for matix

Edited by almatea
  • Like 3

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

×