CGTalk > Techniques > Lighting and Shaders
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-31-2013, 07:29 PM   #1
hgagne
PRO
CGSociety Member
portfolio
Hilaire Gagne
Toronto, Canada
 
Join Date: Sep 2011
Posts: 80
Question Lighting to Simulate the Beam From a Vehicle Headlight?

Hi Folks,

I have been experimenting with simulating the light coming from a vehicle headlight and am running into issues getting results. I'm using Maya 2014, Unified Sampling, Physical Sun & Sky, MIA_EXPOSURE_PHOTOGRAPHIC Lens Shader.

The shaders applied to the vehicle are all MR materials (mia_xxx) and as noted above, the scene is configured with a Physical Sun & Sky.

Rendering the scene is fine and the materials appear as expected; I can adjust the Multiplier of the Physical Sun & Sky to simulate day/dusk/night. When I add Maya Spotlights (Quadratic enabled) to simulate the Headlights of the vehicle, I have to increase the Intensity of the Spotlight to ridiculous values (500,000.00 +) and that can't be right ... obviously I'm doing something wrong or shouldn't be using Maya Spotlights.

I did try the MIB_LIGHT_SPOT - which is listed under LEGACY in Hypershade - and linking it to the Custom Shader of the Maya Spotlight (MR > Light Shader) however, this seems to "break" the Spotlight such that no light is rendered at all. Other than the MIB_LIGHT_SPOT, I'm unsure as to what type of MR light I should be using.

Would appreciate any kind soul who could point me to resources I can read/watch or proper workflow to simulate the beam of light from a vehicle headlight.

Advance thanks,
 
Old 11-01-2013, 02:46 PM   #2
dmillercg
CG Artist
 
dmillercg's Avatar
portfolio
Derek Miller
Senior CG Generalist
3DExcite
USA
 
Join Date: Mar 2012
Posts: 66
Hey hgagne,

Headlamps can be tricky whither they're running on or turned off and can be done in a million different ways. I've found the shape of the headlamps determines what sort of light you should use. Spot lights are a good start, but you may also want to look into using a volumetric light on the inner side of the lens to give you the reflections you want, then use a spot light just outside the lens to illuminate the area in front of it. You may also want to consider rendering out your headlamps separate from the rest of the vehicle and just comp it in later. This way you can push and pull the values of your lights in your headlamps without damaging the lighting on the rest of the vehicle. Hope this helps.
 
Old 11-01-2013, 04:06 PM   #3
hgagne
PRO
CGSociety Member
portfolio
Hilaire Gagne
Toronto, Canada
 
Join Date: Sep 2011
Posts: 80
Hi dmillercg,

Appreciate the time you have taken to respond.

Quote:
Originally Posted by dmillercg
Headlamps can be tricky whither they're running on or turned off and can be done in a million different ways. I've found the shape of the headlamps determines what sort of light you should use. Spot lights are a good start, but you may also want to look into using a volumetric light on the inner side of the lens to give you the reflections you want, then use a spot light just outside the lens to illuminate the area in front of it.


The headlamps are square. It's a simple vehicle model in that I created a single piece of geometry for the glass (mia glass thick) and a single piece of geometry for the back (mia chrome). I added a bump map to the Mental Ray Standard slot as well as the Refraction slot for the glass MIA_xxx material. I also added an MIA_LIGHT_SURFACE shader to the Advanced > Additional Color slot.

All-in-all, that aspect renders fine and fairly believable for the model level ... and my current learning (skill) level.

Quote:
You may also want to consider rendering out your headlamps separate from the rest of the vehicle and just comp it in later. This way you can push and pull the values of your lights in your headlamps without damaging the lighting on the rest of the vehicle. Hope this helps.


I added a Physical Sun & Sky to the scene and the scene is modeled to the scale of 1 Maya Unit = 1 cm. As far as the Physical Sun & Sky and MIA_xxx materials (shaders), everything renders nicely with Mental Ray ... at least I'm happy with the results so far for learning purposes.


The issue I am encountering is two-fold:

1) I'm not certain why I have to increase the Intensity of the Spotlight to outrageous values (500K+). I suspect I'm doing something incorrectly as I can't help but think that the software really isn't designed to push such enormous values. Since I'm still relatively new and learning, I lack the history on Maya that seasoned folks such as yourself have.

2) I have learned that Maya materials aren't really recommended as they are not "energy conserving" and native Maya lights are considered problematic. That said, I did look through Hypershade and found the MIB_SPOT light (under Legacy) but unfortunately it seems to disable the Spotlight entirely when I connect it to the Custom Shader slot of the Spotlight - color, intensity, etc. cease to function regardless of values.

I have searched online (forums, web) and found some information on how to use the MIB_SPOT and from what I gather, I've implemented it correctly; not sure why it isn't cooperating.


Cheers,
 
Old 11-01-2013, 08:01 PM   #4
nookie
Know-it-All
 
nookie's Avatar
portfolio
Luca Fiorentini
Lighting Artist
Lucasfilm Animation
Singapore, Singapore
 
Join Date: Jan 2004
Posts: 367
Send a message via MSN to nookie
Hi hgagne,

Point 1:
When you use Sun&Sky you are using a "physically correct-ish" approach where the sun is emitting a really high intensity (like in real life). You don't see everything blown out because the lens shader (mia_exposure_simple or mia_exposure_photographic) are multiplying down (dividing) the intensity for you simulating exposure. (You can find the lens shader in the mental ray tab in the camera.)
If you try to detach the lens shader and render, you will get a completely blown out render.
This is why you need to put those really high number on the light intensity, and it is normal. So you are not doing anything wrong.
Also, imagine lighting a spot light in the middle of the day in direct sunlight, you will not really notice it unless you have a really high intensity.

Point 2:
You should not use any of the shader under the LEGACY tab, they are there just for backward compatibility and they are obsolete.
If you use a maya light, it will get automatically converted to the right type for mental ray when you render.
You can connect special shaders to maya lights (like the portal light or the blackbody) if needed, but that's another topic

hope it helps
 
Old 11-02-2013, 04:07 PM   #5
hgagne
PRO
CGSociety Member
portfolio
Hilaire Gagne
Toronto, Canada
 
Join Date: Sep 2011
Posts: 80
Hi nookie,

Quote:
Originally Posted by nookie
hope it helps


Sure does! I understand why you have "Know-It-All" below your name.


Quote:
Hi hgagne,

Point 1:

When you use Sun&Sky you are using a "physically correct-ish" approach where the sun is emitting a really high intensity (like in real life). You don't see everything blown out because the lens shader (mia_exposure_simple or mia_exposure_photographic) are multiplying down (dividing) the intensity for you simulating exposure. (You can find the lens shader in the mental ray tab in the camera.)

If you try to detach the lens shader and render, you will get a completely blown out render.
This is why you need to put those really high number on the light intensity, and it is normal. So you are not doing anything wrong.

Also, imagine lighting a spot light in the middle of the day in direct sunlight, you will not really notice it unless you have a really high intensity.


I went ahead and disconnected the "mia_exposure_photographic" shader from my Camera and sure enough, regardless of the value I specify under Multiplier, the render is blown-out ... as expected.

I'd be curious to know how seasoned pros handle day/night for a scene. Granted my test scene is very simplistic in that it is only a vehicle sitting at 0,0 with a Physical Sun & Sky and some Spotlights to simulate headlamps; but, what would the proper workflow be if I wanted to the scene to transition from day to night?

For testing purposes, I have been down-adjusting the Multiplier in the "mia_physicalsky" and it seems that this is likely not the best approach to take.


Quote:
Point 2:
You should not use any of the shader under the LEGACY tab, they are there just for backward compatibility and they are obsolete.

If you use a maya light, it will get automatically converted to the right type for mental ray when you render.

You can connect special shaders to maya lights (like the portal light or the blackbody) if needed, but that's another topic


This helps clarify a few things; if this is noted in the Maya documentation somewhere, I clearly missed it.


Cheers,
 
Old 11-06-2013, 09:16 PM   #6
hgagne
PRO
CGSociety Member
portfolio
Hilaire Gagne
Toronto, Canada
 
Join Date: Sep 2011
Posts: 80
* Update *

For those who may be interested in the saga of Headlamps and Light Fog ... which is where I was trying to get.

Firstly, Maya 2014 and Unified Sampling and Mental Ray and the Legacy Hypershade Node is really spanking my behind.

Secondly, I did manage to get it working - required some serious sacrificial rituals with a bucket of KFC on standby.

http://forums.autodesk.com/t5/Shadi...OT/td-p/4597779


Appreciate the assistance of those folks who replied to my plight.

Cheers,


* EDIT *

So much for proper labeling of project elements; it seems that renaming "coneShape#" and/or "lightFog#" (# being whatever number was assigned at creation) breaks the functionality requiring manual removal via Hypershade before recreation ... at least on Maya 2014 SP2.

Last edited by hgagne : 11-06-2013 at 10:58 PM.
 
Old 11-06-2013, 09:16 PM   #7
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:05 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.