All posts relating to Maxwell Render 1.x
User avatar
By Thomas An.
#26888
TEST PERFORMED WITH MAXWELL ALPHA - 1.1.33

Hi everyone,

(This may have been discussed and conluded previously, but I wanted to do an independent confirmation)

This test involved the use of thin film dielectrics (membranes) to test Maxwell behavior.
  • Incident dielectric membrane= When the surface normals are on the same side that the incident light hits.
  • Non-Incident dielectric membrane= When the surface normals are on the oposite side from where the incident light hits.
Conclusion:
  • 1. Maxwell light is history aware (it remembers the dielectrics it has passed through). Think of it as a LIFO type stack (Last In First Out) collecting ND numbers each time it encounters an incident membrane.
  • 2. Maxwell calculates refraction by using the ND numbers of the two previous incident dielectric surfaces as N1 and N2 for the snell law. (www). If there are no "previous" ND numbers then air is used.
  • 3. The ND of the non-incident membranes are absolutely ignored. Non-incident membranes only act as "triggers" for using the previous ND as N1 (or N2 depending on how nested they are) for Snell's law
Description.
Image-1a: Two dielectric membranes with normals facing away from each other.
The ray deflection is evident (this image was alowed to render for 5h longer than the others and thats why it looks more well developed)

Image-1b,1c: Changing the ND of the second membrane (B) to see if it will affect the path of the rays.
The answer is NO. Maxwell is using the ND of (the previous) membrane A in all instances.

Image-1d: Does Maxwell use the ND of the previous memebrane regardless of the direction of the normals?
The answer is NO. Maxwell is using the ND of only the previous incident membrane (which is the last membrane whose normals happen to be on the same side as the incident light rays)

Image-2a,2b: Are we sure that the incident membranes are the only ones that contribute to the Snell's equation ?

The answer is Yes. In image 2a the rays are not deflected, but in image 2b they are deflected.

Image-3a,3b,3c Does Maxwell remember the nesting of dielectrics ?
The answer is Yes. In images 3a,b,c all factors are the same as image 1a except a third membrane C is added.
In image3a the ND=1 (air) and the result is the same as image 1a
In image3b the ND=2.4 and now the result has changed correctly as Maxwell exits B from glass to glass therefore straight.
In image 3c the ND=5.0 and now the beams are correctly focused as Maxwell exits from B into a much thicker medium.

Image
Image

Based on the above experiment, then the proper way to draw liquid-in-glass with Maxwell is as shown bellow:
  • Intersection of ray R1 at point A evaluates as step1 Snell's law (in the propagation diagram). This is an incident membrane intersection and Maxwell treats this as an air-to-liquid interface
  • Intersection of ray R1 at point B evaluates as step 2 Snell's law. This is also an incident membrane intersection and Maxwell (correctly) treats it as a glass-to liquid interface
  • Intersection of ray R1 at point X1 evaluates similarly to step 5 Snell's law (of the propagation diagram). This is a non-incident intersection and the ND is irrelevant. Maxwell (correctly) uses the previous NDb and NDa in the stack to treat this as a liquid-to-glass transition
  • Intersection of ray R1 at point X2 evaluates similarly to step 6 Snell's law (of the propagation diagram). This is a non-incident intersection and the ND is irrelevant. Maxwell (correctly) uses the previous NDa and NDo in the stack to treat this as a glass-to-air transition
Similarly the behavior of ray R2 is evaluates to air-->liquid**-->glass-->air (please see diagram for the "key" explanation of liquid**)

I believe this diagram will give the most correct liquid+glass result.
Image

This method was also confirmed with a real-life experiement as illustrated later on here:
http://www.maxwellrender.com/forum/view ... ults#27866
http://www.maxwellrender.com/forum/view ... cene#27837

Image
Image
Last edited by Thomas An. on Wed Jan 18, 2006 10:00 pm, edited 6 times in total.
User avatar
By oz42
#26905
now, I'm only guessing here as I'm no expert but...

I think the normal direction is more relavent in these examples. I figures 2a & 1d the rays aren't deflected because they aren't really passing through anything! The normals are facing away from the light source and therefore don't effect it?

I'm only guessing this because if you render a physical sky scene where the camera is inside a box and the box's normal are facing outwards the render just renders the physical sky, the box isn't apparent at all. I can only assume that this is what is happening with the light rays?

Just a thought...
User avatar
By Mihai
#26998
For me it's enough to say: Maxwell doesn't do two-sided materials atm. But that's not really the problem. A medium should always have thickness. The problem arrises when you want to place two dielectrics right next to each other and have the light refract properly. This is something Maxwell has to adress.
User avatar
By Kabe
#27001
Thomas An. wrote: Conclusion:
  • 1. Maxwell light is history aware (it remembers the dielectrics it has passed through)
  • 2. Maxwell calculates refraction by using the ND number of the previous incident dielectric surface as N1 for the snell law (www).
  • 3. The ND of the non-incident membranes are absolutely ignored. Non-incident membranes only act as "triggers" for using the previous ND as N1 (or N2 depending on how nested they are) for Snell's law
Generally speaking, should this behaviour work on closed bodies - which is the normal case.

However, I think it might be worth to check out a special case that happens when you have a liquid in a glass.
To avoid unrealistiv total reflection at the glass-liquid boundary, the liquid has to overlap the glass (I'll skip the explanation here).

So you get the following "membranes":

A. Air -> Glass (incident)
B. Glas -> Liquid (incident)
C. Liquid -> Glas (non-incident)
D. Glas -> Liquid (incident)
E. Liquid -> Glas (non-incident)
F. Glas -> Air (non-incident)

If your theory about non-incident membranes is correct, then the effective NDs in ray direction are (for Glas ND = 1.5, and Liquid 1.3):

A: 1.5
B: 0.86 (1.3/1.5)
C: ? ignored because we leave a medium that we already have left in B?
D: 1.15 ( 1.5/1.3)
E: ? ignored?
F: 0.66.. (1/1.5)1

In fact, such a behaviour would be very close to the real situation, where B+C and D+E are in fact just one boundary.

Cheers

Kabe
User avatar
By Mihai
#27003
ay ay ay......Kabe, did you miss those huge posts about the liquid-in-glass dilemma?
User avatar
By Thomas An.
#27061
pillo wrote:....It looks to me like Maxwell is assuming that on one side is always air.
And the normal define which side is it.
pillo,

I am afraid not. As stated in conclusion 1, it seems that Maxwell uses history for each light ray and keeps all incident dielectric encounters in a LIFO stack.
(Please see updated tests and explanations)
By kingpin
#27069
Hi, Thomas.

I haven't really looked at updated data carefully (so I may be dead wrong... )... But after seeing your test and tests by other (and other renderings), now, I have a suspision that maxwell handle regular rays and caustic differently (more precisely... caustics are on different layer, they behave differently than other rays), so we can't really evaluate them together (it seems that caustic behaves better than other rays... Will it give the same pattern after turing off caustic lay?... ).

I would like to setup my own scene to test... (but... boy, do I s*ck...)... I don't know what is the best way to test it. If anyone can supply me with the scene (to test, behavior of rays that affect view), I will be happy to donate my machine power...

At this point, I really wish that people at NL would tell us what maxwell can and what can't... I know that they are busy with upcoming beta, but matters like this... I know that they've read the whole thread... (and status of SDK for OSX... hehe... ), they can give us few words...

Kingpin
User avatar
By Mihai
#27070
I don't understand one thing about your drawing the stack, why is it for every non incident surface the ray hits, you remove one from the stack of the incident surfaces? How does Maxwell know it hit a surface if the normals are pointing the wrong way?
User avatar
By Kabe
#27073
Mihai Iliuta wrote:How does Maxwell know it hit a surface if the normals are pointing the wrong way?
This is a very basic thing in raytracing, you first check for collisions, and decide after a hit if you hit front or back side.

Kabe
User avatar
By Thomas An.
#27074
Mihai Iliuta wrote:I don't understand one thing about your drawing the stack, why is it for every non incident surface the ray hits, you remove one from the stack of the incident surfaces? How does Maxwell know it hit a surface if the normals are pointing the wrong way?
Reverse normals are like a "minus" sign in math. When the normals are reversed it does not make the surface completely invisible; it is very much a valid intersection, but negative normals affect the equations differently (if they were invisible then we would not see any deflections from surface B in the example-1a... the rays would pass right through undeflected, but they don't)

-
User avatar
By Mihai
#27099
But if you remove B from 1a, wouldn't the rays look exactly the same?

I'm not sure which deflection from B you are referreing to in 1a?

Looking at 2a, it's clear you could just as well remove B, so how do you know the membranes facing the wrong way contribute anything to the calculation?
User avatar
By Thomas An.
#27103
Mihai Iliuta wrote:But if you remove B from 1a, wouldn't the rays look exactly the same?

I'm not sure which deflection from B you are referreing to in 1a?

Looking at 2a, it's clear you could just as well remove B, so how do you know the membranes facing the wrong way contribute anything to the calculation?
aah, here is the trick.
When a ray hits a flat surface at exactly 0 degrees (from the normal) then it has no reason deflect; it just slows down but remains straight. Only a curved or slanted surface will produce deflection and this is the reason that I deliberately chose the combination of a straight and convex surfaces.

-
User avatar
By Mihai
#27107
Yes, I understand but I'm still confused. How do you know Maxwell "does" anything to it's reflection and refraction calculations when it hits a dielectric membrane from the wrong side? You could just as well remove B from 1a, the image would look exactly the same wouldn't it? Apart from the black surface of the membrane, which I guess means Maxwell knows the camera rays are hitting something (from the wrong side and thus renering nothing, black pixels), but the light rays don't.......maybe....I thought this was the essence of bi-directional path tracing? You send rays both from the light sources and camera?

I'm not an expert an ray tracing, I trust what you are saying here, just want to learn the logic of it, that's all :)

edit: You mean when the ray enters from the other side, Maxwell still knows it entered the surface, but the normal angle is negative?
User avatar
By Thomas An.
#27113
You could just as well remove B from 1a, the image would look exactly the same wouldn't it?
Mihai,

Thank you !

I thought the experiment had covered all bases and left no room for doubt, but your question makes sense.

So the answer is No. If in the image 1a, the convex (non-incident) surface is removed then there is no deflection... (which is consistent with the initial conclusions).

Here is the missing link:
This is the same as image 1a but with the convex surface removed.
Image
  • 1
  • 2
  • 3
  • 4
  • 5
  • 14
Sketchup 2024 Released

Any idea of when the Maxwell Sketchup plugin will […]

Will there be a Maxwell Render 6 ?

Let's be realistic. What's left of NL is only milk[…]