## Bubbles: materials inside other materials

Please use this forum for general user support and related questions.

Moderator: coordinators

Forum rules
Please include your operating system type/version, LuxRender version and Exporter version used when submitting a support post.

Make sure you have read the Release forum thread for Release and RC (Release Candidates) builds as these threads contain information on known problems and workarounds: Test Builds Forum

### Re: Bubbles: materials inside other materials

Currently Lux does not keep track of the materials the light has passed through (i.e. it only takes the current material into account). So to get the correct result you have to use "to_medium_ior"/"from_medium_ior" (where from is the side the normal points to) for the ior.

As this is obviously not the most natural way to describe a material, we should probably best change to normal behavior (i.e. each material just has its own ior and lux keeps track of the from medium, combined with some precedence-like system) sometime in the future.

MOD:
So in the case where you have bubbles in water, you just model these bubbles "inside" the water (i.e. the water contains no "holes"), have all normals point outside and use for materials:
water mat-> "glass" with water ior (1.33 or so)
bubbles mat-> "glass" with air ior / water ior (1.0 / 1.33 = 0.75 or so)
If your looking for the guilty, you need only look into a mirror - V
Lotuspec

Posts: 101
Joined: Mon Nov 19, 2007 1:53 pm
Location: Belgium

### Re: Bubbles: materials inside other materials

Labello wrote:isn't the ior a relative value that depends on both volumes that the light is passing. the outer and the inner volume. i think it was something about the different speeds of light in the volumes. but we always calculate with air being the outside volume. but now water is outside and air is inside. so why couldn't there be a ior<1? sorry for my maybe stupid question, i have no physical education or experience

No, the ior is fixed for any given material. It's the reflectivity that depends on the two refractive indices on each side of the interface.

jeanphi wrote:Actually, using reflection and transmition values different than 1 is non physical for ior based materials. Setting them will just simulate complex wavelength dependance of ior or the imaginary part of ior (it's much easier for an artist to input a desired colour than try to match it with electromagnetic properties). For example the substrate material explicitely converts the specular color to ior values for the fresnel term.
Jeanphi

Ah, then it's cleverer than I thought. I will have to investigate further.

grasshopper

Posts: 28
Joined: Thu Oct 25, 2007 8:47 am

Previous