"Astra. Was dagegen?"

Get feedback from others on your works in progress
User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Wed Oct 25, 2006 4:18 am

My Cola Bottle got ior: Cola 1.02 and Bottle 1.15
It's low, but if I set it higher the glass will apare way to thick :?
Probably cause of the powerfull lights in the scene...
And yes, it's modelled the Real Life way 8)

I got two side by side renders soon finish, one Real Life and one Thomas An.
One with ior: Glass 1.3 and Fluid 1.2
And one with ior: Glass 1.15 and Fluid 1.1

EDIT: here it is :D 8)
Image

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Wed Oct 25, 2006 9:32 pm

Here's an image I made:

Image

To model such a scene as the one pictured, The model needs to be set up so that each of the three interfaces can be assigned a different material.

The material for the air-glass interface will be a standard specular material with (internal) index of refraction (IOR) ~= 1.5.

Note that currently in Indigo it is implicitly assumed that the 'external' IOR is 1. (i.e. very close to the IOR of air)

By 'external', I mean the volume on the normal side of the interface.

The air-water interface will be a standard specular material with IOR ~= 1.33

For the glass-water interface, I'll define a new property for the specular material: external_ior. This will define the IOR on the external (normal) side of the surface.
So for the glass-water interface, the usual internal IOR will be 1.33, and the external_ior will be 1.5.

This technique may be something of a burden on the modeller, but it should produce good results.

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Wed Oct 25, 2006 9:40 pm

Hmm.. forgot to add, I would appreciate if someone could model a scene in the way I have described and chuck it up to download, or send it to nickamy AT paradise DOT net DOT nz.
I'll take care of the materials.

lego
Posts: 99
Joined: Sat Oct 14, 2006 7:29 am

Post by lego » Wed Oct 25, 2006 10:06 pm

Image

lowpoly... if it's ok I'll send you the 5kb zipped xml :)

edit:
I've sent it... it's just 5kb, so it shouldn't be a big problem even if it's not ok :lol:

debris
Posts: 23
Joined: Tue Sep 26, 2006 8:14 pm
Contact:

Post by debris » Wed Oct 25, 2006 10:10 pm

I'm not a physicist, but to me it looks like the liquid's and the glass' refractive indices would add up (which is wrong) if the scene would be modeled according to the picture above, because the lightrays don't get kind of "reset" by exiting the refractive material but directly entering another refractive material that bends the direction even further. This would explain why even with a refractive index close to 1 the result looks so strange.

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Wed Oct 25, 2006 10:25 pm

Thanks Lego.

Debris:
in real life, as far as i know, there is no air layer between the water and glass.
The Fresnel equations and Snell's law will handle the glass-water interface refraction and reflection fraction correctly, even if neither of the media are water.

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Post by manitwo » Wed Oct 25, 2006 10:48 pm

For the glass-water interface, I'll define a new property for the specular material: external_ior. This will define the IOR on the external (normal) side of the surface.
So for the glass-water interface, the usual internal IOR will be 1.33, and the external_ior will be 1.5.
:shock: Cooooooool !!! :twisted:

Kyokutan
Posts: 17
Joined: Tue Oct 17, 2006 2:56 am

Post by Kyokutan » Wed Oct 25, 2006 11:04 pm

How about this?

Image

The 2 Meshs overlap to one object. The left one get a colorless spec mat with just ior and the right only transparent colored spec mat with IOR:1

This should avoid color errors...but doubles the polycount.

(Not tested yet)

PS.: MS Paint forever :lol:

User avatar
Pinko
Posts: 58
Joined: Wed Aug 09, 2006 11:06 pm
Location: Italy

Post by Pinko » Wed Oct 25, 2006 11:27 pm

How I can make the shader glass like this bottle in Cinema4d.....
Where I can find a tutorial for indigo shaders???
Tnx in advance.
Pinko.

PS:For inexperienced users tests are very difficult without a basic documentation...:?

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Wed Oct 25, 2006 11:51 pm

11min test render using new technique:

Image

Seems pretty good, hard to tell tho

User avatar
tungee
Posts: 482
Joined: Mon Jul 03, 2006 8:17 pm
Location: Gießen Germany

Post by tungee » Thu Oct 26, 2006 12:07 am

:shock:
Music has the right to children!

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Post by manitwo » Thu Oct 26, 2006 12:26 am

indeed ... looks good 8) :)

debris
Posts: 23
Joined: Tue Sep 26, 2006 8:14 pm
Contact:

Post by debris » Thu Oct 26, 2006 12:40 am

Thanks Ono-Sendai for your reply :)

I didn't mean there really is a thin layer of air between water and glass, but I wondered if the ray of light knows it's exiting one medium and entering another without passing through a surface with an inverted normal and entering another medium by passing through a surface with a facing normal. MentalRay e.g. would interpret it like 2 added IORs which would lead to false results. It either needs a small gap between the two Materials or a shader that offers 2 IORs to be entered (like e.g. the T2S Illumination Shader's "Media In" value): the IOR of the Material and the IOR of the medium it's coming from (most of the time "1" for air).

To be sure I made a simple test:
Image

A textured floor plane, one glass window with thickness and IOR 1.5, another thick glass window in front of the first (on the left side) same IOR but a tiny gap between window 1 and 2 and last but not least a simple one-sided grid with IOR 1.5, too. This covers window 1 on the right side.

Here's the result in XSI/MentalRay:
Image

Result in Indigo 0.66 (sorry for the burn, it killed the .EXR file while stopping the rendering so I had to use the tonemapped PNG :( ):
Image

Notice that there's no XSI-exporter yet, so I exported it via Blender / OBJ and positioned the camera by hand to give a similar angle.
Result in both renderers is the same. As you can see, the IORs on the right side add and results in a very high (=3) IOR while on the left everything looks as expected.
Should be similar to the water in the glass-problem?

Kyokutan
Posts: 17
Joined: Tue Oct 17, 2006 2:56 am

Post by Kyokutan » Thu Oct 26, 2006 4:09 am

Test of my system with green glass and dark yellow fluid.

Image
1000 mutations per pixel


But i got to shrinken the color "layers". When they overlap with the IOR "layer" i get nasty artefacts.

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Thu Oct 26, 2006 8:06 pm

Kyokutan: i presume you are worrying about the colours of the objects due to absorption. This is an issue, but I think it can still work using my technique, I just have to be careful coding.

Post Reply
36 posts

Who is online

Users browsing this forum: DotBot [Bot] and 38 guests