2007-02-17

Clouds with mental ray sky

I keep getting requests from people saying things like "I saw you at SigGraph showing of the mental ray sky and it had clouds in it. How did you do that?".



To which I twirl my moustache and say, 'tis a deep secret....

....just kidding.

Here's the thing. The mia_physicalsky shader uses a 'haze' value to derive a sky color based on the sun position/angle. So a 'hazier' sky is more white/yellowish and a less 'hazy' sky is deeper blue. Okay fine, weather control, you say, but that's not clouds, is it?

Well... actually... it is... if you modulate the haze value across the sky!

Observe this video that I made... it's basically a collection of all test animations done during the development of the sun&sky. Some are bad, some are worse, some are nice, some has bugs in them, some use very low anti aliasing, and none is a peice of art. However they do demonstrate the cloud feature...

What I did was use this texture map (which is a slightly modified version of one I found from some old CD-ROM with public domain sky textures) as a spherical environment map plugged into the haze parameter of mia_physicalsky. That's basically it!

In Maya or XSI you can do this directly, in Max you need to drag&drop your "mr Physical Sky" from your environment dialog into the material editor, uncheck the "Inherit from Sky" and apply the map there.

What is important - though - is this; This is a normal run-of-the-mill LDRI .jpg image, which means it causes a "variation" in the range 0.0-1.0 ... this is way too little for being visible as "clouds" in the sky (the haze has a range of 0 to 15)

So to see results, you need to multiply the level of the texture. How you do this differs between the applications (in Maya you can use the Gain, in Max you use the Output rollout and turn up the RGB Level, etc etc) but setting it somewhere between 5 and 10 tends to look nifty.

Note that this is not a "physically correct" effect in any way, notably because it doesn't actually scatter light, or block light, or create any shadows, or anything like that. But it does simulate "light" cloud coverage very nicely (like high altitude cirrus clouds), and the cool thing is that the clouds coloring automagically follows the sun angle, making very nice sunsets possible....



/Z

Labels: , ,

20 Comments:

Blogger Chris said...

Great info zap!

But I can't get the skydemo to download. It says its a 109mb .mov, but stops at 30mb and won't open. Any thoughts?

Tue Feb 20, 02:07:00 PM CET  
Blogger Master Zap said...

Dunno.... I tried to download it myself and it worked...

How long did this download take? (I'm wondering if it could be a timeout on the server somehow?)

/Z

Tue Feb 20, 02:22:00 PM CET  
Blogger Master Zap said...

Mkay, I changed the link to an FTP link. Try again.

/Z

Tue Feb 20, 03:06:00 PM CET  
Blogger LehaS said...

hei Zap

The Video Link is still dead i suppose :(

Thanx

Sat Feb 24, 10:11:00 AM CET  
Blogger Master Zap said...

No, works fine from here...!?

/Z

Sat Feb 24, 12:32:00 PM CET  
Blogger Yukito said...

Thanks for the tip. It totally worked! There were some ugly artifacts that appeared around the geometry though. My scene consisted of a cylinder and a ground plane. The artifacts still appeared even after I upped the samples. They disappeared when I removed your clouds from the haze channel.

Tue Mar 06, 09:54:00 PM CET  
Blogger daniel said...

I cant get the video to work either. it finishes downloading and then it says its not a movie file.

Thu Apr 19, 01:36:00 AM CEST  
Blogger Mongo said...

How did you get the sun to appear in the rendering. I cannot figure it out.

Fri May 04, 05:19:00 PM CEST  
Blogger Luzck said...

I cant dlw the video what you you..is extremly slow.
There is other way to get it ?

thank you

Thu Jul 05, 03:37:00 PM CEST  
Blogger 3d Architectural Visualization said...

I am experiancing flickering problem in my walkthrough rendered in mentalray. How can i solve it? Please help me

Fri Aug 31, 12:26:00 PM CEST  
Blogger butlimous said...

Thanks for the nice post!

Free PS3

Mon Sep 17, 02:24:00 PM CEST  
Blogger Eneen said...

Is there a way to get rid of "yellowish cast" of haze? Tint control doesn't do a job :/

Sun Sep 23, 12:53:00 AM CEST  
Blogger mohab said...

i'm shocked by the ocean stuff
if you have time , please hint on that a little , i read the manual but no shimmering stuff like you did nor that movement of the water

Sat Nov 17, 04:50:00 AM CET  
Blogger Jenna said...

Thank you Master Zap!

Thu Nov 22, 03:29:00 PM CET  
Blogger odomok said...

Strange, place2dtexture -> file# -> mib_lookup_spherical produced great results, but mentalrayTexture -> mib_lookup_spherical or env_sphere (maya) would create artifacts as here http://www.djx.com.au/blog/wp-content/images/envSphereForMR/envSphereMR_FG.jpg and the image seemed to be stretched out and unmovable (in rotate UV)

Tue May 06, 08:11:00 AM CEST  
Blogger odomok said...

oh yeah and even with low gain (1,1,1) -> rgbLuminance the linkages that produced the artifacts would cover the sun as well

Tue May 06, 08:16:00 AM CEST  
Blogger Muldible said...

zap or anyone! can you talk about why the sky shader doesn't allow access to control the shadows (render passes) specifically? work arounds? thanks!!!

Thu May 22, 04:10:00 PM CEST  
Blogger Wilbert van den Broek said...

Hey Zap great tips yet again! I have got a few questions however. What node are you using (and how) to connect the sky image to the haze.
Env. ball and Sphere (maya) both work for me but result in the strange noise artifacts mentioned above. The mental ray options (like mib_lookup_spherical) doesn't seem to work. How do I connect them? I tried rgb > haze but I could only connect one of them.
Thanx in advance.

Fri Aug 22, 10:20:00 AM CEST  
Blogger milf said...

black mold exposureblack mold symptoms of exposurewrought iron garden gatesiron garden gates find them herefine thin hair hairstylessearch hair styles for fine thin hairnight vision binocularsbuy night vision binocularslipitor reactionslipitor allergic reactionsluxury beach resort in the philippines

afordable beach resorts in the philippineshomeopathy for eczema.baby eczema.save big with great mineral makeup bargainsmineral makeup wholesalersprodam iphone Apple prodam iphone prahacect iphone manualmanual for P 168 iphonefero 52 binocularsnight vision Fero 52 binocularsThe best night vision binoculars here

night vision binoculars bargainsfree photo albums computer programsfree software to make photo albumsfree tax formsprintable tax forms for free craftmatic air bedcraftmatic air bed adjustable info hereboyd air bedboyd night air bed lowest pricefind air beds in wisconsinbest air beds in wisconsincloud air beds

best cloud inflatable air bedssealy air beds portableportables air bedsrv luggage racksaluminum made rv luggage racksair bed raisedbest form raised air bedsaircraft support equipmentsbest support equipments for aircraftsbed air informercialsbest informercials bed airmattress sized air beds

bestair bed mattress antique doorknobsantique doorknob identification tipsdvd player troubleshootingtroubleshooting with the dvd playerflat panel television lcd vs plasmaflat panel lcd television versus plasma pic the bestThe causes of economic recessionwhat are the causes of economic recessionadjustable bed air foam The best bed air foam

hoof prints antique equestrian printsantique hoof prints equestrian printsBuy air bedadjustablebuy the best adjustable air bedsair beds canadian storesCanadian stores for air beds

migraine causemigraine treatments floridaflorida headache clinicdrying dessicantair drying dessicantdessicant air dryerpediatric asthmaasthma specialistasthma children specialistcarpet cleaning dallas txcarpet cleaners dallascarpet cleaning dallas

vero beach vacationvero beach vacationsbeach vacation homes veroms beach vacationsms beach vacationms beach condosmaui beach vacationmaui beach vacationsmaui beach clubbeach vacationsyour beach vacationscheap beach vacations

bob hairstylebob haircutsbob layeredpob hairstylebobbedclassic bobCare for Curly HairTips for Curly Haircurly hair12r 22.5 best pricetires truck bustires 12r 22.5

washington new housenew house houstonnew house san antonionew house venturanew houston house houston house tx

Mon Aug 25, 10:04:00 PM CEST  
Blogger Igor said...

(2)! Thanks for the tip. It totally worked! There were some ugly artifacts that appeared around the geometry though. My scene consisted of a cylinder and a ground plane. The artifacts still appeared even after I upped the samples. They disappeared when I removed your clouds from the haze channel.

Wed Apr 15, 12:56:00 AM CEST  

Post a Comment

Links to this post:

Create a Link

<< Home