Glass shader?

Started by Tim O'Donoghue, December 24, 2006, 12:36:58 AM

Previous topic - Next topic

Tim O'Donoghue

Using a sphere object and a reflectivity shader, I rendered a very basic scene:

http://www.pbase.com/tjod/image/72012146 for practice.

I'm wondering if there is a good way to make a similar shader to mimic glass, similar to this:

http://timster.net/terraforma/Galleria/Mojoworld%20images/Habitat.html

If the shader could have an adjustable index of regfraction, some really interesting effects could be made ...

Thanks in advance.

Tim O

Oshyan

The Index of Refraction is already controllable in the normal Reflective Shader. There is no transparency yet though. I'm not sure if you could duplicate that Mojo scene, but if that's all reflections then I would think so.

- Oshyan

Tim O'Donoghue

Thanks.  I take that to mean there may be transparency at some point? That would be a very handy option. I noticed the IoR in the reflective shader but left it at the default

The Mojo scene is all refraction, not reflection.  (plus some weird fractal mutants ...)

Oshyan

Ok, if it's refraction (transparency) then it's not possible currently. Transparency will be implemented for water and hopefully that will translate to the same "water" material on other objects, including transparency. That would be in keeping with how TG2 currently works.

- Oshyan

gregsandor

How do you set up the shader for reflectivity on the sphere?  Can you post a  screenshot of your node setup?

Fierys

Gregsander, to get, for example, mirrorlike surface apply reflective shader to it and set index of refraction to max value (10).

Tim O'Donoghue

Here's the TGD file:

gregsandor

Thanks.  I managed to get it working last night, and am now trying to make a reflective shader that is chrome (bumpy surface mixed with image map.  Any ideas on how to combine the reflective shader with an image?

Tim O'Donoghue

Interesting idea, but I'm not sure how to do it. I'll see what I can find over the next few days.

Oshyan

The Sphere object comes with a Default Shader plugged in to its Surface Shader input (you have to view the "internal network" to see this - click the object in the node list and press the small network button to the right of its name). To get displacement plug a color-generating shader (Power Fractal for example, or an Image Map shader if you already have an image you want to use) into the Displacement Shader input on the Default Shader. Then adjust the Displacement Multiplier in the Default Shader Displacement tab; set it to 1 to start with and adjust from there to get the strength you want. To get reflection then just plug a Reflective Shader in-between the Default Shader and the sphere's Shader Input (put the Reflective Shader below the Default Shader in the network flow).

- Oshyan