Posted by rgbold on May 27, 2000 at 22:10:02:
In reply to: Tritem Lighting posted by Bart on May 27, 2000 at 17:03:07:
Bart, You asked for it:
Make sure you have the newest TRitem (g)
No prob. Sometimes I don't explain things very well. And to tell the truth, some of the functions
in TRitem even I don't understand how to work 'em. I just used the 'Stone', tried to code it into
the level and if it did something, hey, new function! Like the underwater current. I know TRitem is putting
in the correct info, but how do I get it to do something like when Lara is swept downstream? Anyway...
First question, making sure you mean a camera that you have added, as Lara 'is' really the first game
camera in every level, the 'Look at' item itself is a bogus invisible item. You are supposed to select a regular item
to look at but the way my code stood at that point it was a nightmare to put it in that way. The camera will
look at this item from where you placed the camera. So if you placed your camera in the middle of the room,
placed your 'look at' item near the north wall, when Lara steps on the sector that you selected as a trigger
the scene will show a shot from the cameras position to the items position. To view in a certain direction
/angle you need to figure the camera position relative to the item and also figure in the height you need the
camera at.
Second question- I call them 'Lara dolls'. Kind of a cheat. In TR3 every level has in it's moveables
a mesh of Lara in the proper outfit. However these do not move and are not solid so I didn't place them
in TRitem.
Third. Hmmmm. Don't know if I copy you correctly. Technically (aproximately) the zip line drops
from where it entered the sector at a 75 degree angle and each section is 6 feet long and exits the sector
about 1.5 feet under where it entered. The height field in TRitem selects the height at the bottom of the
box you selected and each box represents about 1.5 feet so each time you move over a sector when
laying the line you must drop down one height box.
Fourth. Lighthing is a huge subject. I probably should have renamed that 'vertex lighting room',
and stuff to Room lighting, quad lighting then vertex lighting. Spot lighting is not spot lights. The best
way to try this stuff out is to make a sample room in TReditor using all the defaults, 10x10 room,
127flr 139cieling Lara light 16 Room light 16. I'll use TR3 as an example so make sure your
levelx.dat file for TReditor is from TR3 ( TR1/2 light values are reversed from TR3, see the docs).
You really need to change the textures using Rview to get a sense of what the lighting is doing. You
can use the texture function in TReditor but Rview shows you the textures real time and the 'replicate'
function allows you to tile the room in seconds. First take a look at the room using Tomb Raider
so you can judge the changes you make later. In TRitem, load up the level, bring up the 'Lara light'
selection and set the RGB values to 31-31-31. Save it and run the level in Tomb Raider. Lara is
kinda dark, she needs some external lighting in order to see her. Go back to TRitem, load it up
and click on one of the corners of the room, choose the 'vertex lighting quad' selection, RGB of
31-31-31 with 'vertex normal'. Set it and save it. Tomb Raider again to look. You should see a
lighted corner where you placed it. If you don't your video card is doing something I don't understand.
Run Lara over to the lighted corner. She's still dark because the light is 'mesh lighting' and is applied
only to the texture on the wall, it doesn't emminate any light. Go back to TRitem. Choose the same
corner and just use the bottom height box for floor height, choose the 'add spot lighting' function,
use RGB 31-31-31 with a 'fade1' and 'fade2' of 10. Save it and take a look using Tomb Raider
engine. You should see Lara lit up now because that dang spot lighting is the strongest you can
make. The fade values have to do with how far the light travels, I think. Load it up in TRitem again
and use the same corner selection to make a 'spot lighting with 15-15-15 and 10 fade values.
When you look at it again in Tomb Raider, run to the opposite corner from the light and you'll see
the effect of the diminished RGB values. You can mix the RGB values to make colors but you
need to do your own experiments as there are too many combos. 'Per vertex room lighting' applies
the same thing the 'quad' lighting did but this time instead of only doing one 'box' it does the whole
room. The 'per vertex lighting' item itself applies the light only to that x,y,z position and makes
a swatch of light emminating from that vertex on the mesh textures with that vertex in common.
Hope this helps some, let me know..