Jump to content

Reflective volumes


kvdo

Recommended Posts

I came across this video a little while back, and the poster doesn't seem to have much transparency about his method.

 

 

does anyone have any ideas on how one can get specular/reflections onto a volume in the shader?

Link to comment
Share on other sites

  • 2 weeks later...

Thanks Skybar. I realise now I was going wrong in calling the gradient volume 'N'. That seems to not work for whatever reason. Also later realised that I needed to transform the gradient into the correct space.

Here's the hipnc for anyone else's future reference.

 

Hey Kevin, thanks for sharing

I just opened the scene you provided though and it doesn't work for me - I have an error in the shader on the ADD op regarding a data type mismatch...where you are trying to add the BSDF to the specular sum ?...care to open the provided hipnc file and see if it works for you ? Can't figure this out on my own...

 

thanks

Link to comment
Share on other sites

nevermind - aparrently the specular model in H14 is different than the H13 one, and was "leaking" some parameters. Opened in H14 and worked just fine.

so word of caution : H14 file.

 

thanks again, Kevin

Link to comment
Share on other sites

  • 2 years later...

Hi. Know this is an old thread, but was wondering if anybody can help out. Trying to get specular highlights on converted vdbs from particles.

Used the same method as the hip file (reflective volume_v02.hipnc) above, but the normals dont seem to be recognized.

Any help would be greatly appreciated!

I've attached a hip file to explain what i'm trying to do.

 

reflective volume_test_v01.hip

Link to comment
Share on other sites

2 hours ago, pupps09 said:

Hi. Know this is an old thread, but was wondering if anybody can help out. Trying to get specular highlights on converted vdbs from particles.

Used the same method as the hip file (reflective volume_v02.hipnc) above, but the normals dont seem to be recognized.

Any help would be greatly appreciated!

I've attached a hip file to explain what i'm trying to do.

 

reflective volume_test_v01.hip

It's because you have no normals. Take a look at the values on the node "point1", you tell it to add normals but a point doesnt have intrinsic normals so none will be added - the value for N is (0, 0, 0). Add point normals on the sphere instead, and the scatter will inherit those.

Link to comment
Share on other sites

30 minutes ago, Skybar said:

It's because you have no normals. Take a look at the values on the node "point1", you tell it to add normals but a point doesnt have intrinsic normals so none will be added - the value for N is (0, 0, 0). Add point normals on the sphere instead, and the scatter will inherit those.

Thx for the quick reply David. It worked like a charm. 

I actually have one more question. What I'm really trying to achieve is trying to get specular on my whitewater sim, which are cached out as points. I want to render them as a volume with specular highlights.

The cached points have no normals. Would I need to convert those to polygons via Particle Fluid Surface first to get the Normals and then convert to a VDB?

This guy that posted this on vimeo https://vimeo.com/159216723  states that he converted his FLIP particles to VDB with "VDB from particles", then used "VDB Analysis" to calculate the gradient field, but doesnt really go into detail about anything else.

Do you understand how he is doing this?

 

Link to comment
Share on other sites

4 hours ago, pupps09 said:

Thx for the quick reply David. It worked like a charm. 

I actually have one more question. What I'm really trying to achieve is trying to get specular on my whitewater sim, which are cached out as points. I want to render them as a volume with specular highlights.

The cached points have no normals. Would I need to convert those to polygons via Particle Fluid Surface first to get the Normals and then convert to a VDB?

This guy that posted this on vimeo https://vimeo.com/159216723  states that he converted his FLIP particles to VDB with "VDB from particles", then used "VDB Analysis" to calculate the gradient field, but doesnt really go into detail about anything else.

Do you understand how he is doing this?

 

Yeah, turn your particles into an SDF volume (with VDB From Particles), calculate the gradient of that (with VDB Analysis) and then sample that onto your particles to use as a normal. Even cheaper is to use the surface field from the sim, because we get that for free anyway (if it is a FLIP sim). Included both as an example here: particleNormals.hip

Hope it helps!

  • Like 1
Link to comment
Share on other sites

11 hours ago, Skybar said:

Yeah, turn your particles into an SDF volume (with VDB From Particles), calculate the gradient of that (with VDB Analysis) and then sample that onto your particles to use as a normal. Even cheaper is to use the surface field from the sim, because we get that for free anyway (if it is a FLIP sim). Included both as an example here: particleNormals.hip

Hope it helps!

Thx once again David. Would've never been able to come up with that on my own. Just to make sure, would I render out the points with a volume shader and connect the normal parameter to the specular (ex: PBR Specular, PBR Metallic) in the shader? 

I tried this approach and got the specular reflections, but wasn't sure if this is the correct method. 

Link to comment
Share on other sites

5 hours ago, pupps09 said:

Thx once again David. Would've never been able to come up with that on my own. Just to make sure, would I render out the points with a volume shader and connect the normal parameter to the specular (ex: PBR Specular, PBR Metallic) in the shader? 

I tried this approach and got the specular reflections, but wasn't sure if this is the correct method. 

I haven't done it myself for particles but I reckon that would work! If it looks good and works for you go for it :) 

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