Dispersion: Prism

Hello, I usually find what I am looking for in the High End forums however I can't seem to pin-point a good approach to this problem. A client wants white light to pass through a simple prism and then disperse into the colors of the rainbow on exit. (I've attached an image of what I want to achieve). After that I would apply a type of fog or mist to pick up the colored rays in space.

I have been successful in doing this in Maxwell Render. However, it would take at least a week to render without a render farm and there are no particles to represent the mist like in Maya just the rays cast on the ground plane. I feel a lot more comfortable working in Maya. (Using 2012 64)

I've been doing some research and seems like L_glass is the option because of the dispersion but was decommissioned a while back and the latest version I've found is v3 alpha. And I don't even now that it would cast the rays as hoped for. I have also been reading up on the MIA_shader and not sure it that will cast either. Also there was a fake one out there that looks good but isn't compatible with 2012 64.

I ask if anyone has a strategy on how to approach this or has a tutorial I could reference to achieve this elusive effect? Appreciate the help.

Thanks,
Moffi

Well the problem is that you'd need to turn the spectral rendering option of Mentalray on (otherwise the caustics volume photons can not show the color spread correctly), and my understanding that really means you'd need to write your own shaders, and i mean ALL OF THEM. (besides fiddling with custom Mentalray text is not for the faint heart).

And it'd be as slow as Maxwell more or less (the spectral data is huge so you need to shoot many many more rays what you pay for).

Thanks Joojaa, Guess that leaves me to submit it to Ranch Render render farm and take the Maxwell route if there isnt a way in MR. I saw that v-ray for Maya can do this but can it cast the rays and space and pick up the fog or mist effect? Ugh....

Well, I found this. And you can d-load the scene. It won't render for me. An alternative to Zap's in Maya

http://mayadvance.blogspot.com/2009/...mond-farm.html

Is there a way I can use this scene and massage it into the prism idea?

Also, Found the latest L_glass: http://area.autodesk.com/forum/autod...-mental-ray-39

Unless someone has the current....L_glass beyond the v3 alpha x64

Does anyone have a step by step to install the v3 properly? to give it a go.

its NOT a problem with diffraction, even standard maya shaders have a option to enanble chromatic abberration. So you have this in the box allreadt no need for extra shaders if rgb cplors would be enough.

Its NOT a problem with fog mist, even mentalray can do this, its a question fo rgb values versus spectral values. Heres a simple image rendered with mentalray:

Example file can be found here (from my own repository c. 2006 but the original idea is not mine i just modified it to render the image, no guarantee it will work in newest maya), made for maya 7.0 So yes you've had this for a long time

[b]The PROBLEM IS:

[/b]RGB is just 3 primary colors, real world does NOT work in rgb values, so when you make a spread in the light fog you would just get 3 colors spread around But this is NOT how it really works, so you would get a spread yes. But you would not get the violet and the magenta parts of the spectra, and the yellow, and orange part would not work out properly. That is the problem, and vray wont help because its not doing spectral renders.*

Same applies to all rendering its NOT about the shader its about using spectral rendering versus not using spectral rendering. It wont really work without spectral renders*, unless the sader works only on pectral rendering then it does not help. And ALL your suggestions, shert maxwell do not support spectral rendering. Your searching the wrong thing.

However renderes arent physically accurate they are fakes anyway so why not fake the result.

  • thing is its VERY very rare to need the spectral rendering, and this particular effect si the ONLY one that i know of where its a MUST have. for diamonds an such the lack of the violet is so minor that it may not matter. but for the prism spread it does.

Jooja, thanks for the concise explianation. It helps alot to wrap my head around the issue. I will give your scene a whirl and try to massage it maybe? My question is could I apply a ramp shader to the light in your scene and instead of RGB. Do Red, yellow, green, cyan, blue, and purple for the spectrum. The mist/fog is an effect that I would like to do in Maya vs Maxwell because well Maxwell cant do it however it can do real world dispersion. Below is a 22hr test render on an over-clocked i-7 950 to 4.25Ghz with a solid state HD and a ton of memory. Maxwell is "Physic"lly accurate - white light enters and disperses into the spectrum on exit. I can run it through Neat Image and de-noise it with smooth results.  So covering all the bases in Maya would be ideal considering the mist/fog effect too.  Figured v-ray wouldn't work thanks for confirming. A render farm from Ranch Render is an option.

"Physic"lly accurate

No its just more accurate in terms of how it uses color, its still no more physically accurate then you make use of. You can do this in mental ray if you will but then your the guy writing the shaders period.

Problem with using spectral rendering is that while the engine may calculate with spectra, normal modellers sure as hell are not able to use this info. See not only do you need more calculation time, but you'd need to be a very well tuned scientist to be able to model anything sane in this environment. See your shaders model something, but every time you have a shader youd need to pass a spectral color as opposed to a normal color. This in turn means taht you couldnt use any textures crated in Photoshop, you couldn't use cameras to capture your textures etc. Youd need specialized equipment built for you from scratch.

Second, to be physically accurate is a bit of a lie. Since we humans do NOT know how the physics of surfaces actually work, just how they approximately work. So if the physical accuracy of something like vray and menttalray would be on a scale form 1 -100. 10 Maxwell would be 10,1 at best. Even if you turn all the bells and whistles on the real limit to physical accuracy is the speed. Theres no magic in path tracing things its just very very slow. So we use tricks to do things at a sane speed to get good enough. Off course this brings us to the third problem, real world is not raytraced, but rather photons move from light sources towards the eye/camera. So even with sane speeds in maxwell its STILL a trick. And finally we do not know how the human auto exposure works, so any

So there is NO such thing as physically accurate, we have no freaking idea of how it really works, just better tuned versus little worse modeled. But its all up to the users skills mostly, so if your skill is 1 than the result on the 1-100 scale is STILL 1. Given that the rest of the way is so much work for you its a bit pointless. And even more its totally pointless to agrue about this if you dont write the shader code yourself, you lost 90% of any accuracy about your special need just there. There just needs to be some special justification to go there.

So how do you fake this?

Well simple you make a light that emits the spectra (it projects an image ramp) that tied to the light fog, emitting from within the prism. Because the maths involved is so easy you can with little effort calculate this spread. And its 100 tmes faster. But do you really need a lightfog for this effect? use a plane!? again 100 faster than the faked projection.

So at the end of the day you get more accuracy in terms of whaat you get to show whan you fake cartain things, so you can concentrate on whats really important.

PS: In any event when you have a justification for that kind of accuracy, that makes sense. Go to the local uinversity and ask for a grant of supercomputing time. I mean i have no special need and they still gave me 1 million processor hours of computation chips for developing a imaginary diesel engine.

Jooja, This is invaluable information and should be shared.  I am alighned in the academic field but not in Physics. Is there a chance you can make a quick scene in Maya? Like I said, this is a stumper and have been using Maya/MR for several years. This problem is a rough one.

So I've pretty much givien up on the Maxwell route in favor of trying to fake it in MR.  Here some images of where I am currently stuck. I am using "transmat" on the material shader and shadow shader in the LamberxxSG. Also the "parti_volume" in the volume shader of the same material. I get great ressults with one color but when I create the spectrum of colors and try to combine them things seem to get wierd. I have attached a few images of what I've tried so far. The only thing I can think of now is applying a ramp shader to the scatter of one long bar that constitutes the distance if all the colored blocks where together. The idea with these was to bend them into rays like you would see coming from a prism. Thanks again for taking a look.

M

And I try to get a simple red beam like you do Joojaa from you scene. I get no stream of light like you have. My first thought was ya just change the scatter in the parti's.....I tried to change the color beam to red  and try to understand the scene that you have on hypershade (seperatly turn the color to red for each one/ render to see etc/ turn off move to the next one) Still can't get even one R of RGB. Then went through process for every node including the lights. I'm going to go bang head against wall.

I found some of his docs to be helpful but a little out dated. I guess my idea currently is create strips of colored glass of the spectrum in the window like he has in "volume scattering through colored materials tutorial". http://www.scribd.com/svenito/documents. Still  researching a solution. Thanks.

The latest rough draft still needs a bit of tweaking....