Nightlighting can be setup by using Omni lights in 3ds Max. The exporter will export their instances and associated settings for you. For optimization you will probably need to group various physical lights in the scene together and have them only use a single physical light in game. There is a limit of 20 lights casting on each object.

For objects to receive light from Nightlights they need to have been exported with "Omni" enabled. Additionally ensure that meshes are not clustered together such that they cover an area of more than 20 omni lights.

There are 3 physical parts to the lighting.

  • The physical structure of the light post. This should be modelled normally with out any illumination.
  • The PostFX meshes, these add the glow from the light when it is switched on.
  • The Omni light which lighting information for other objects in the scene.

Setting up Omni Lights

  • Object Name: Nightlight###
  • Create Omni Light in 3ds Max
  • No Spot or Directional Support
  • Configure multiplier, colour, near and start attenuation
  • Objects in the scene receive light from 20 closest omni lights
  • Export SCN snippet through 3ds Max Plugins for automatic generation of settings.

Setting up Post FX

  • Model the physical light and the glow meshes separately.
  • Glow mesh should just cover the bulb area
  • Map with the glow texture we provided in the sample, using the HighSunLum shader. 
  • It is VERY important to note that the size of the PostFX glow mesh has to be, at least, as big as the tracklight reflector bell outer ring. Do not create small mesh, unless you don't want to simulate led lights, or specific shapes. If you want solid and strong light effect just be sure to create glow disks as big as your light reflector bells, on the outer and larger diameter, or this will induce flickering from the PostFX.
  • Track Light example mesh, without and with the postFX glow mesh

Track Light example mesh UV, shader settings, and mapping. In this texture you can set different intensity and different color temperatures. For a nice touch, just set your track omnilights RGB colors, same as the texture area you pick on the texture.

The intensity will need careful testing and adjustment.

Track Light example mesh, export settings.

Be sure to give the glow objects an accurate lod out, remember at night they can be seen from very far away.

Track Light example SCN code (the Instance for the glow mesh must have same suffix name as the first omnilight in the scene (in this case NightLight001);

  Type=Omni Pos=(15.029381, 9.138912, -406.351288) Range=(0.000000, 40.000000) Active=True Intensity=(4.500000) Color=(255, 238, 193) 
  MeshFile=NightLight001Glow.gmt CollTarget=False HATTarget=False