User Tools

Site Tools

This page exists within the Old ArtZone Wiki section of this site. Read the information presented on the linked page to better understand the significance of this fact.

LUX Ambient Glow Tutorial

This is for a tatoo or other partially glowing effect that is controlled by an image map. An Ambient channel texture, for example! This tutorial, for beginners, assumes your tattoo or other effect is only on one material zone.

Ok, part the first: which files you need to edit.

There are two files you'll need to edit.

  • One, the YOURSCENE.LXM file, is the Lux Materials file.
  • The other, the YOURSCENE.LXO file, is the Lux Geometry file.

Both of these are plain text. The LXO can get REALLY big, so you need to have a good text editor - Windows Notepad is not good enough, and a word-processor like Word or Open Office is likely to do something unhelpful to the files.

I can recommend NotePad++ and EditPad Lite as excellent free text editors for Windows. I'm not sure what tools are available to Mac users.

I'm going to assume that the glowing tatoo is only on one material zone - simplest case, to get you started. Crack open the .LXM file and (At the very top or bottom, your choice) add a couple of blank lines, and then paste in the following, making sure to update the “string filename” line with where your ambient map is

 # this part tells Lux about your image map!
 Texture "AmbientLight:amount" "float" "imagemap"
 "string wrap" ["repeat"]
 "string channel" ["mean"]
 # replace the filename below with the path to your texture. 
 # Windows Users! Make sure to use / to separate folders, not \!
 "string filename" ["C:/path/to/your/file/here.jpg"]
 "float gamma" [2.20]
 "float gain" [1.0]
 "string filtertype" ["bilinear"]
 "string mapping" ["uv"]
 "float uscale" [1.0]
 "float vscale" [-1.0]
 "float udelta" [0.0]
 "float vdelta" [1.0]
  Texture "5_AmbientLight:Light" "color" "blackbody"
# pick your colour temperature - 6500 is white, 1500 is very very red, 8000 is quite blue.
 "float temperature" [6500.0]        
  # This part tells Lux to use your image map to blend between Black (no light) and your light color.
  Texture "AmbientLight" "color" "mix"
  "texture amount" ["AmbientLight:amount"]
  "color tex1" [0.0 0.0 0.0]
  "texture tex2" ["AmbientLight:Light"]

Save, close up, and now open the .LXO (And be patient, Victoria is a LOT of object so this is usually a big file).

Now Control+F and search for the material zone the tatoo is going on (so 1_Face for a face tatoo). You'll find a line like NamedMaterial “1_Face_21” (the number stuck to the end changes from scene to scene so if it doesn't match, don't worry, you just need the rest to match.

Before the NamedMaterial line, add a blank line and insert the following:


After the NamedMaterial line, add a blank line and insert the following:

 LightGroup "GlowingTatoo"
 AreaLightSource "area"  "texture L" ["AmbientLight"]
 "float power" [100.0]    # you can adjust this, this is wattage
 "float efficacy" [17.0]
 "float gain" [1.0]

Lastly, Control+F and search for NamedMaterial. This will find the first NamedMaterial after the one we're editing. Right BEFORE this NamedMaterial, add a blank line and insert the following


And that's it. Render, you've got a new light group to play with, and it's a glowing tatoo!