SkyLightControl
window v1.1a |
download the maya 4 plugins for the skyLightControl (NT Only)
Hello
my friends, thanks for according a bit of your precious time in reading
the long and boring documentation I spent hours to write! :-) (but it's
worth it!!) First
of all, I have to thank Thomas Briggs,
Francois Zarroca
and Stephane Deverly and Bryan
Ewert for their precious help on writing this mel. They did everything!!.
Actually I did nothing but telling what would be best for us in having
such a powerful GUI for faking outdoor illumination. However, in the contrary of the method explained in the tutorial which uses the closestPointOnSurface node to get the color from the closest pixel in U and V to the light, here we used 2 plugins (included with the maya3.0 dev kit): the iffInfoCmd and iffPixelCmd plugins. Thomas has been the first to send me a simplified GUI which uses those plugins. The very advantage of those is that we will no longer have hundreds of ramps and their 2d placement 'polluting' our hypershade!! :) We use the iffInfoCmd plugin to retrieve U and V coordinates from an IFF texture file, and the iffPixelCmd to get the color of the pixel at U and V coordinates, then we dispatch pixels color to all the lights (according to their positions) The
second difference from the tutorial, is that maya's default lights illuminate
the diffuse, ambient and specular components of a shader, and the very
bad point of using maya's default light source are the little specular
smudges on shiny materials. The only workaround was to set a negative
value of shadow color and set the intensity of each light to 0 so only
the shadows were visible (but that would mean too: forget about the color
illumination: for a tutorial about outdoor illumination, that was top
knotch!! :-)) Here we used 2 types of light: - Ambient light
(for illumination: color emission) with the ambientShade attribute set
to 1 (no specular) This is twice heavier (in number of lights) than before, but it makes miracles!! :-) I
was hoping a lot from A|W's R&D to make a light that had both properties
from an ambient light (ambientShade attr.) and a point light (cast dmap
shadows), but it seems that no! We'll wait until Maya 4's been released.
The last thing is we still need to create a sky surface to adjust correctly the texture file the lights will emit (by default, the sky_surface doesn't cast shadow) Once the texture is adjusted you can hide it or use it as background... Ok, this was for the 'theoretical' part of the SkyLightControl window, now lets get into what you came here for...
Installation: - Unzip the SkyLightControl.zip file. - Copy the iffInfoCmd.mll
(NT) or and iffPixelCmd.mll files into the directory you specified
in the MAYA_PLUGIN_PATH env. file; - Then copy the SkyLightControl.mel, skyGeodesic.mel, and skyLightTuneAmbientLightsWithoutWindow.mel script into your script directory (usually C:/WINNT/Profiles/user/maya/scripts/) Now load the plugins in Maya (Menu Window - Settings / Preferences - Plug-in Manager...) Source the scripts
with the script editor: Click on 'File, source script...' menus;
with the browser go into your script directory, and select them (one by
one), and press enter or click on open, or type in the script editor:
source skyLight geodesic.mel. Press [enter], then type source
skyLightControl.mel. Press [enter]
How the SkyLightControl window works?
TYPE OF SHADOWS Dir shadows:
creates directional lights to cast shadows
DOME U count:
specifies the number of lights in U (default: 10 - min:2 - max: 30) Important note: The 'status' field at the bottom of the window displays the number of lights that will be created with both method according to the U and V count values.
Examples: Use frame extension: if checked on, the script will update the lights (checking U and V position, retrieving pixel's color...) each time you change of frame. Your first frame (if you are using a sequence of images as light emission) has to have the number 0 (frame_seq.0000.iff, ...) The padding is not important. This is the only condition to use a sequence of images. (Anyway, it just work as hell!!) :-)
SHADOWS The shadows attributes
are the same as a point or directional light. The parameters
remain the same as the beta version plus the addition of the Re-use dmap
shadows attribute, and the modification of the way we treat the shadowColor. If you miss the old and uniform shadow behavior (with v1.0) just set the shadow Contrast to 0. But you'll have to modify the shadowDensity.
Modify the -0.5 in red (You'll have to do this twice, so find another string like this and modify both of the values as there is 2 $shadowColorFloat strings) *IMPORTANT NOTE: As the 'shadow' lights are just here to cast shadows, they have by default NEGATIVE values for SHADOW COLOR. So be very careful when adjusting the Shadow density (to avoid total black areas because of the superposition of hundreds of shadows)
COFFEE 'MATIC Coffee 'Matic:
Allow the user to select and drink his coffee during the loooonnnng renderings.
Many kinds of coffee are available here and for free!!. I hope further
versions will include Arabica, Colombian, and many others...
INTENSITY Global intensity:
To the contrary of the beta version, this parameters is now a multiplier
of the highlights intensity and lowlights intensity values.
COLOR CONTROL Contrast:
sets the contrast of the texture emitted by the lights (default: 1 - min:
0 - max: 4)
CREATION / UPDATE Create all:
once you set all the wanted parameters for the skyLight, click on Create
all to create the lights and the sky_surface.
Note that if you have already created a skyLight, and you want to change the type of light that casts shadows, you'll have to delete the first skyLight and then re-create another one with the new type of lights.
Attributes or features that will be added or implemented in the final version: - Uniform type of distribution of light: There's still too many lights created at the top the 'sky' than at its base, so we're working on that. - Color control: All color attributes will be keyable.
In
version 1.0, if you batch rendered an animation with a sequence as light
emission, maya returned an error message about a procedure. All
keyable attributes (light intensities and (now) shadowDensity) are refreshed
when the time slider moves. Before (beta version and v1.0), shadow casting was uniform (no relation with the texture used as light). So on the majority of the renderings, shadows were projected diregarding the 'texture's light orientation'. Now, the shadow casting depends on the luminance of the texture. If you have a part of the texture that is very dark (black or anthracite), the lights over these dark areas will cast lighter shadows than the lights placed on a higher luminance value of the texture. Fixes bugs during the creation of a skyLight with uniform distribution of lights and a texture file.
Known limitations
/ bugs: - Sometimes,
when one uses the skyLightControl after maya has been restarted, the skyLightControl
window doesn't show up, and this error message is displayed: Error:
Cannot find procedure "SkyLightCreationUV". - If, by any chance, you get a coffee with the Coffee 'Matic feature, don't call me or email me to tell me "it works, you're a genius!! How did you do that?? etc..." 'cause I won't believe you!! :-) (hey, pas folle la guepe!! Not crazy the bee!!) :-) - Undo: to undo your last modifications in the skyLightControl, press [z] to undo in Maya, then click on Get Attr From Dome - If you use a
file you have converted in solid texture file from a standard shader network,
you may have a wrong 2d placement. -If you are using
a sequence of images as texture file, it seems that the skyLightControl
doesn't find the sequence. - If you use the color picker from the skyLight window, when you have picked a color, close the color picker to continue the refresh of IPR.
Voila, c'est fini!!
if you have any comments / critics / improvements / bug report, you want
to tell me: [email protected]
download SkyLightControl.mel and plugins version 1.1a Irix / NT |
SkyLightControl.mel - (c) F. Zarroca - E. Campin / Sept - Nov 2000 |