LarryG on 17/9/2016 at 00:31
I have recently learned a bit about spotlights and modeling of spotlights, so I thought I would share before I forget it all.
I. Modeling spotlights
The following two diagrams pretty much tell the tale. If you want to control the direction of the spotlight then you need to model two little cubes as well as the light itself. The two cubes are called vhots and will be recognized as such when you name them @h01 and @h08 respectively. The @h01 vhot is the light source origin. The placement of the @h08 vhot defines the direction of the light, from @h01 towards @h08. If you don't provide the @h01 vhot, then the light source origin will be the centroid of your model. If you don't provide an @h08 vhot then the direction will always be along the negative z axis of the model (straight down for an un-rotated model in Dromed)
[ATTACH=CONFIG]2303[/ATTACH]
[ATTACH=CONFIG]2304[/ATTACH]
The LGS theatrical spotlight provides another example. This is a jointed model, where the angle between the mounting brackets and the spotlight itself can be set in DromEd. The spotlight is set up with the light part as the base and the two brackets on either side as the movable sub-objects, so you will need to set the joint angle (using Shape>JointPositions) and then rotate the model so that the bracket is aligned properly to the surface you wish to have the light appear attached to. Note that this model has @h01 but not @h08. This means that the direction of the spotlight will be straight down as modeled (straight out from the back of the light through the lens at the front, however it is oriented in DromEd).
[ATTACH=CONFIG]2305[/ATTACH]
II. Spotlight Parameters
There are two key spotlight parameters for you to specify: Renderer>Light and Renderer>SpotLight.
The brightness of the spotlight is taken from the brightness setting of the Renderer>Light parameter.
The Renderer>SpotLight parameter defines two cones, an inner cone and an outer. The brightness falls off linearly from the brightness specified in Renderer>Light to 0 between the inner and outer cones. That is, the inner cone is entirely at the brightness specified. The intensity of the light between the two cones decreases as you go from the inner to the outer cone. The X value of the Renderer>SpotLight parameter specifies the inner cone angle in degrees, and the Y value specifies the outer angle. The Z value is ignored. So the X value you specify must always be less than or equal to the Y value.
[ATTACH=CONFIG]2307[/ATTACH]
There also is the Renderer>SpotlightAndAmbient parameter, which adds the spotlight cone to an normal ambient light. It has one limitation: if you use it on an animlight all you will get is the spotlight and not the ambient lighting. Used on a non-animlight you get both (as in Lights > MechLights > MechFloorLamp). You can emulate the effect on a animlight fixture by using two animlight sources linked to the same control, one a hack light and one the light fixtue. I think having the light fixture the ambient animlight and the hack the spot animlight works the best.
Oh, for SpotlightAndAmbient, X and Y are as for Spotlight, but Z is actually used for the intensity of the spotlight. The intensity of the ambient light is from the Light parameter.
Le MAlin 76 on 17/9/2016 at 22:34
SpotlightandAmbient property is just a broken property which concert spotlight in omnilight.
LarryG on 18/9/2016 at 02:44
SpotlightAndAmbient isn't broken. Check out Lights > MechLights > MechFloorLamp. Just stick it in a room and look at the ceiling to see the spot. It just doesn't work with animlights.
Le MAlin 76 on 18/9/2016 at 12:27
Ok thank you. It's usefull informations :)
gamophyte on 20/9/2016 at 16:41
Thank you LarryG! I am a huge geek of making and working with objects in Dromed. I spent too much time making objects that I may never use just because of how much fun it was. Will ref this when it comes time to have my custom spotlights for a new AI faction :sly:
Tannar on 20/9/2016 at 17:56
Thanks, Larry! This is great information and I appreciate the time you took to put it together.