Texture Controled Lights 1.5.8 (maya script)

Control light colour/intensity by sampling shaders

License Type:

Freeware

File ID:

4869

File Size:

51 KB

Created / Updated:

Oct 16, 2007 / Oct 16, 2007

Owner:

Guf   More free downloads from this user See users marketplace items See this users portfolio Send a Private Message

Platforms:

windows

Downloaded:

978

Maya:

7.x, 8.x

Tags:



Texture Controlled Lights means the ability to link the colour and/or intensity of a light to a sampling of a shading network, such that if the shader is animated, so is the light, and that it's animation matches.

Use case: For a scene with a flaming torch on the wall, sometimes it is better to fake it with an animated placard (especially if the camera doesn't move, or the movement doesn't give away the fake).
The scene is then usually lit with an animated pointlight at the same position.

However, if the highs and lows of the light flicker don't match the animated flame texture's apparent highs and lows, it looks odd.

This script allows you to control the light colour (by sampling outColor) and intensity (by sampling outAlpha), so that the texture does whatever it does, but the light always matches it.

Options include pointsampling, or using the average of a grid of samples, sampling to control either or both of colour and intensity.

Extended use case: If the light is quite big in the scene, a single pointlight might not give the moving feel of the flame. In this case, setting up say 4 pointlights sampling from grids that average the 4 quarters of the texture, and arranging them in space around the flame in a similar fashion (but in 3D not just 2D), the lighting is still simple and lite, but responds with moving illumination in response to the animated texture, giving both matching flicker and nice moving shadows. (One could also apply some other small motion to the lights for an even smoother result).

This tool can be used for all sorts of things, from providing a simple way [for an artist] to animate a coloured light by using a texture (the attributes that the engine looks at are on the light so can be keyed from the AttributeEditor), to whatever you can think of. (c:

The instructions for use are in the header comment in the file.

Created and tested on Windows, but should work on other OS's as well, and probably works on Maya6.x
(Note: uses string continuation, which apparently can cause issues on OSX.)

Related Marketplace Items

  • Light_lister