Playing with glass and visible light again_ discovery

Started by bobbystahr, July 29, 2016, 07:03:24 PM

Previous topic - Next topic

bobbystahr

Playing with glass and visible light rays again. These 3 small renders confirm to me that no matter how thin a solid object is, it will not produce rays(top image) but shares the colour of the glass fairly nicely with the room's atmosphere.
The windows with ray production are all imported plane objects(easier than trying to figure the rotation of the infernal internal plane object)
Bottom one is with the chandelier all lit up to check it's impact on the visible light.
C&C welcome
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Matt

Hi Bobby,

TG4 Beta can render coloured shadows, but it has to be set up in a particular way. In future I'd like to make this easier to do. But for now, here's some stuff from the change log:

Quote
Partial-opacity shadows. The renderer can now render partially-opaque shadows of non-displaceable objects. Partial opacity is achieved with the Default Shader by using opacity less than 1 or using an opacity texture or opacity functon (many vegetation models already do this, with partial opacity occurring on anti-aliased edges in the texture).

It's not just greyscale, but colour too. If you use a colour for opacity, it will produce coloured shadows. It may not be intuitive because the shadow colour will be the complementary colour of the opacity. However, since you're using an image texture you can enable "invert opacity image" and then the colour in the texture will be the colour of the transparency.

Quote
For now, this only works for shadows, while opacity visible to the camera still works as before: it can only be either 0 or 1 and each pixel will jump to whichever value is closest. The RTP has an extra capability that's not in the main render: the RTP can render these partial opacities visible to the camera as well, but we'll change this in future to match the capabilities of the main renderer.

Hopefully that's self-explanatory.

Quote
Please note: Partial opacity is not the same as refractive transparency in the Glass Shader and Water Shader. If you want to use this new feature to render semi-transparent shadows of glass-like objects, we recommend that you use a separate INVISIBLE object for casting shadows with reduced opacity, while keeping the visible object fully opaque (opacity 1) with shadows turned off. This will avoid surprises in future versions of Terragen that can render partial opacity visible to the camera.

This affects how you're going to use it to do stained glass windows. I'd recommend that you have two copies of the glass parts. One copy will use the same setup you have now to tint the world outside, but has shadows turned OFF. Then you'll need another copy that is INVISIBLE to camera but has shadows turned ON, and uses a Default Shader with an opacity texture to control the colour of the shadows.

Yes, this is more complicated than it should be. I'd like to make this straightforward in future.

How are you doing the coloured transparency, by the way?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Quote from: bobbystahr on July 29, 2016, 07:03:24 PM
The windows with ray production are all imported plane objects(easier than trying to figure the rotation of the infernal internal plane object)

You should try the Card object.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

fleetwood

Interesting effects, Bobby. Thanks for checking it out.


bobbystahr

Quote from: Matt on July 29, 2016, 09:37:38 PM
Hi Bobby,

TG4 Beta can render coloured shadows, but it has to be set up in a particular way. In future I'd like to make this easier to do. But for now, here's some stuff from the change log:


Thanks for this Matt...I tried the Partial-opacity shadows but couldn't get it to work, will have at that again.

Yeah I noticed that in the RTP, yup it was.

I do read the notes btw but somehow I missed this last point. Will have a go at this as well.

Currently I'm using a Glass shader and the object's Default through a Merge shader and i use either the 1st Multiply or Add depending on how transparent or translucent I want it. The Add works better for Translucence and the Multiply for Transparent.

I also sometimes (tho not in this experiment) use actual coloured glass shaders for the different colours but I hadn't broken these windows up and had started the project with greyscales I had displace modeled the windows from in Imagine3D so I just did a couple of variations in Photoshop...I'm easily bored heh heh.

Currently my shadows are shaped mainly by the came of the windows and through the door, the branch of an American Elm.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Quote from: luvsmuzik on July 29, 2016, 10:42:45 PM
A beveled edge changes nothing, as if in real world?


It does if you are using an actual beveled glass object.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Quote from: Matt on July 29, 2016, 09:39:09 PM
Quote from: bobbystahr on July 29, 2016, 07:03:24 PM
The windows with ray production are all imported plane objects(easier than trying to figure the rotation of the infernal internal plane object)

You should try the Card object.

Matt


Yeah, one day I'll remember it. I just do .obj set up in Deep Ex and they have a nice plane primitive...expediency I guess,  but I'll give the plane a go next time.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Woo Hoo...thanks Matt.

for me this was the helpful bit in getting my setup to work:

Quote
Please note: Partial opacity is not the same as refractive transparency in the Glass Shader and Water Shader. If you want to use this new feature to render semi-transparent shadows of glass-like objects, we recommend that you use a separate INVISIBLE object for casting shadows with reduced opacity, while keeping the visible object fully opaque (opacity 1) with shadows turned off. This will avoid surprises in future versions of Terragen that can render partial opacity visible to the camera.

This affects how you're going to use it to do stained glass windows. I'd recommend that you have two copies of the glass parts. One copy will use the same setup you have now to tint the world outside, but has shadows turned OFF. Then you'll need another copy that is INVISIBLE to camera but has shadows turned ON, and uses a Default Shader with an opacity texture to control the colour of the shadows.

and this bit you added that wasn't in the notes was important:
It's not just greyscale, but colour too. If you use a colour for opacity, it will produce coloured shadows. It may not be intuitive because the shadow colour will be the complementary colour of the opacity. However, since you're using an image texture you can enable "invert opacity image" and then the colour in the texture will be the colour of the transparency.
because I am using image maps for this.

Sorry, lo res test...hi res to follow so I can move on.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Dune

Interesting thread, learned something again, that I didn't realize before. This may also mean that in trees, it should be possible to have more light passing through into the canopy, after setting it up differently.... off to experiment.

AP

That looks very nice. Is this the very first time we are seeing colored shadows in Terragen?

DocCharly65

Very interesting experiments, Bobby! And some beautiful results too!

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Quote from: Dune on July 30, 2016, 02:37:25 AM
Interesting thread, learned something again, that I didn't realize before. This may also mean that in trees, it should be possible to have more light passing through into the canopy, after setting it up differently.... off to experiment.

I look forward to that result Ulco. Happy I started this thread as it seems something new has arrived. Took me nearly the whole BETA to get here, and y all know how long I've been looking for this. Now to find some cash to up grade.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Matt

Nice result :) Glad I could help.

@AP: yes, this only became possible in TG4, as far as I know. Maybe there are some tricks possible with TG3 but nothing has been demonstrated to work that I recall.

Matt

Just because milk is white doesn't mean that clouds are made of milk.