Jump to content

Raytraced shader question


haggi

Recommended Posts

Hi,

I'm creating some shaders from scratch. Creating a lambertian shader with a checker on it works fine, but now I'd like to use reflections and refractions.

In the attached image you can see an image of the scene (attached too). The box has a reflective shader, the sphere a refractive shader. I use the trace vop as well as a refract node.

It works, but it seems that the reflection as well as the refraction is attenuated by a fresnel function. Thats nice, but I'd like to have control about it and be able to create a 100% reflective material like chrome. Unfortunatly I could not find more information about this behaviour. I suppose its built into the trace node, but is it possible to turn it off?

post-3146-13114402801_thumb.jpg

raytraceMat.hipnc

Link to comment
Share on other sites

it seems that you need to plug something into Trace Intensity input of Trace VOP for it to work as you expect, simply to override the default behavior

so plug at least constant with the value of 1.0 to it

or better Parameter so user can change it

Link to comment
Share on other sites

I am just getting into using Houdini so I could be wrong but I believe your reflections are working just the way you want in your original file. Parts of it are black because there is nothing for it to reflect. If you put something in the scene directly above your box you will see it reflects just fine.

Edit:

I adjusted your shaders to work with pbr so your environment light would show in reflections. I am no expert and there may be a better way to do this but it works and gives the result you want.

post-4202-131144730493_thumb.jpg

raytraceMat_pbr.hipnc

Edited by sjmcc
Link to comment
Share on other sites

I am just getting into using Houdini so I could be wrong but I believe your reflections are working just the way you want in your original file. Parts of it are black because there is nothing for it to reflect. If you put something in the scene directly above your box you will see it reflects just fine.

Edit:

I adjusted your shaders to work with pbr so your environment light would show in reflections. I am no expert and there may be a better way to do this but it works and gives the result you want.

Thanks a lot for your help.

Unfortunatly it seems not to be the environment only. There is no attenuation and no multiplication in the shader with some other values. This means that e.g. the reflection on the cube should be as bright as the orginal checker on the floor because it reflects 100%. But it is darker. If you turn the camera so that you see the cube form from one side, the reflection gets darker and darker. To me this looks like a fresnel attenuation which I dont want, at least not at the moment.

post-3146-13115224121_thumb.jpg

Link to comment
Share on other sites

anim is right. I tried his solution yesterday and it didn't seem to make a difference. I tried again today and it works perfectly so I must have been doing something wrong. So thank you for the info anim and that will teach me to listen to the guys with more experience next time.

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