PDA

View Full Version : Negative IOR Values


arehmanm
01-22-2008, 07:54 AM
Hi, I'm a final year undergraduate student and currently im working on my fyp which is simulating negative index refractive materials in 3D studio MAX.
Ive spent a month mucking around with 3DS MAX and learning the basics. Ive tried a couple of methods for refraction but none allows me to enter a negative value.

Any ideas how I can get it done? I have a hunch I mite need to dig deep with MAXScript and write a shader or something. Please help!

i need to get images similar to the following made in pov-ray: http://www.imagico.de/pov/metamaterials.html

Bobo
01-22-2008, 03:53 PM
have a hunch I mite need to dig deep with MAXScript and write a shader or something.

Not really.

You should know that most parameters inside of Max (and I mean INSIDE) are unclamped - they are only limited on the very surface, the User Interface.

You can open TrackView and set a key to ANY value for any parameter you want. In some cases, the internal code might have built-in validity checks to clamp to reasonable values, for example a Visibility track is taken only between 0 and 1, anything below 0 is taken as invisible and anything above 1 as visible, but you can have ANY value stored in the track.

Similarly, you can set most values to ANYTHING via MAXScript, for example if you assign a Raytrace material to an object, select the object and say

$.material.Index_of_Refraction = -1.5

the IOR will be set correctly to -1.5, just the SPINNER in the UI will show you 0.0 because the input is clamped at UI level to avoid stupid people from doing stupid things (and I don't mean you).

Negative IOR values are all but physically based - the index represents the ratio of the optical densities of the two media with 1.0 when the two have the same density, >1 if your material is denser than the environment (air?), <1 if your medium is less dense than the environment. Since both densities are positive, there is no natural way to get a negative value in the real world, so the UI was designed to prevent people from entering unrealistic values.

There is no guarantee that the Max Raytracer or mental ray will perform the calculations with negative IOR correctly, but I would assume they would.

Have fun with your tests!

arehmanm
01-24-2008, 06:41 AM
hey bobo, thanx for ur reply!
yup, same thot i had. i was looking for a way to enter -ve values, and i thot maxscript would be the way to go.
but i tried the trackview method and it works! my simple first test image looks to be negatively refracting correctly which means there are no limitations in the raytracer. ill have to do some more extensive testing and comparison with POV-ray to confirm tho. but its definitely a good start. dunt have to learn maxscript now ... thanx again!

CGTalk Moderation
01-24-2008, 06:41 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.