kvdo Posted April 18, 2015 Share Posted April 18, 2015 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? Quote Link to comment Share on other sites More sharing options...
MENOZ Posted April 18, 2015 Share Posted April 18, 2015 I think you can use the gradiend of the volume as a normal to compute the reflection Quote Link to comment Share on other sites More sharing options...
Skybar Posted April 18, 2015 Share Posted April 18, 2015 It was for a job so I can't really go into specifics (I used some variation of it for the softtoys in my latest reel), but it's quite straightforward. The gradient of an SDF acts like a normal, so use that for shading. Quote Link to comment Share on other sites More sharing options...
kvdo Posted April 18, 2015 Author Share Posted April 18, 2015 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. reflective volume_v02.hipnc 3 Quote Link to comment Share on other sites More sharing options...
zoki Posted April 18, 2015 Share Posted April 18, 2015 thats great thanks Kevin Quote Link to comment Share on other sites More sharing options...
Zybrand Posted April 20, 2015 Share Posted April 20, 2015 Nice one Kevin! thanks for sharing Quote Link to comment Share on other sites More sharing options...
cojoMan Posted May 3, 2015 Share Posted May 3, 2015 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 Quote Link to comment Share on other sites More sharing options...
cojoMan Posted May 4, 2015 Share Posted May 4, 2015 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 Quote Link to comment Share on other sites More sharing options...
kvdo Posted May 9, 2015 Author Share Posted May 9, 2015 Ah, yes. That would be the issue. Pleasure Nicolae! Quote Link to comment Share on other sites More sharing options...
pupps09 Posted April 3, 2018 Share Posted April 3, 2018 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 Quote Link to comment Share on other sites More sharing options...
Skybar Posted April 3, 2018 Share Posted April 3, 2018 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. Quote Link to comment Share on other sites More sharing options...
pupps09 Posted April 3, 2018 Share Posted April 3, 2018 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? Quote Link to comment Share on other sites More sharing options...
Skybar Posted April 3, 2018 Share Posted April 3, 2018 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! 1 Quote Link to comment Share on other sites More sharing options...
pupps09 Posted April 4, 2018 Share Posted April 4, 2018 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. Quote Link to comment Share on other sites More sharing options...
Skybar Posted April 4, 2018 Share Posted April 4, 2018 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 Quote Link to comment Share on other sites More sharing options...
pupps09 Posted April 4, 2018 Share Posted April 4, 2018 11 minutes ago, Skybar said: 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 Cool...Appreciate all of your help! 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.