The Tomb Raider World is all in the positive plane, except for the "Y"
(Height) cordinate where goes from -32768 to 32769,. this give us 64 Tomb
Raider blocks (tiles) for the Y cordinate because each
solid block is 1024x1024x1024 size. So you have a lot tiles for the
X and Z for going to front and back but only 64 block for going from down
to up.
The TR3D interface edit the rooms in blocks unit (tiles) for the
X,Y,Zcordinates all in positive values, even for the Y cordinate where
is converted to 1 positive tile (the lower room heigh position)
going Up to 63 positive tile (the high room heigh position). The Y
position plus the room heigh MUST NOT BE HIGHER THAT 64.
The X cordinate control the room position going from Left to Right,
and the Z cordinate control the room position going from Back to Front,
so the wall in the room at the lower X cordinate is the
"Left Wall", the wall at the higher X cordinate is the "Right Wall",
the wall at the lower Z cordinate
is the "Back wall", and the wall at the higher Z cordinate is the "Front
Back".
PORTALS:
Portals are the tricky part, that is because it is not obvious how it
work.
For best perfomance when you play a level, the Tr engine will mainly
will
only render the walls, floors ceiling etc for the actual room where
Lara is,
this room is called "the current room", also the engine only
will render
the portions from others rooms that are visibles from the current one,
this
other rooms are called the "neighbor room".
For to make Lara change from the current room to the neighbor room
and then
make she come back you need to do 2 things:
- You need to put the position for both room in a way where two columns
or rows are
overlaped. (see the picture.)
This can be done using the "send to..." command from the menu
or changing
manualy the X,Y,Z room position.
For make Lara change to neighbors above or below you only need
to put the
floor for a room and the ceiling for the other room at the same
Y position.
(see picture)
Front/Back Room Overlaped.
Up/Down Rooms Aligned
- You need to put in some tiles in the overlaped rows or column a special
mark that will tell to the TR engine to make "current" the neighbor
room
when Lara step over those tiles. This especial mark is called
a
"Portal Attrib".
Also for to make Lara can see the neighbor room when she is in the current
room, you need to put a visual windows to the neighbor room. This visual
windows is called "Portal View".
The "Portal attrib" and the "Portal view" must be defined in both
room.
The 5th dimension:
Like you can see in the picture, two rows (also can be columns) are
overlaped
with the neighbor's rows, this mean that some solids (walls, floors,
ceilings)
from the neighbor room share the same position with the solids in the
current
room, but these neighbor solids are not actives until Lara make current
the
neighbor.
Sometimes when Lara is near of this shared position and in front a
"portal view", you can see the unactives neighbor solids, these are
called
"Gost solids", and they reside in the called "5th dimension" or the
overlaped
rows/columns.
To avoid these "Gost solids" you must draw the same solids (normaly
walls) in
the 5th dimension for both rooms, so they room equal in the 5th Dimension.
Portals attrib types
The current room can have neighbors rooms at:
- at Front: When the neighbor Z position is higher. For acces this neighbor
room you need to put a portal at the Front wall.
- at Back: When the neighbor Z position is lower. For acces this
neighbor
room you need to put a portal at the Back wall.
- at Right: When the neighbor X position is higher. For acces this neighbor
room you need to put a portal at the Right wall.
- at Left: When the neighbor X position is lower. For acces this
neighbor
room you need to put a portal at the Left wall.
- at Above: When the neighbor Y position is higher. For acces this neighbor
room you need to put a portal at the Ceiling.
- at Below: When the neighbor Y position is Lower. For acces this neighbor
room you need to put a portal at the Floor.
* The especial mark (the portal attrib) needed for acces rooms at front,back,
left and right positions is called "Room Side type".
* The especial mark (the portal attrib) needed for acces rooms at Above,
positions is called "Room Above type".
* The especial mark (the portal attrib) needed for acces rooms at Below,
positions is called "Room Below type".
So when you put a "portal attrib" at some sectors to make Lara change
from the
current room to the neighbor, you need to especify the neighbor's room
number and the attrib type "Side","above" or "below".
- Each sector can only be "Side" type or "Above/Below" type.
- If a sector is "Above type" Lara will acces the above room when she
touch the ceiling at that sector.
- If a sector is "Below type" Lara will acces the Below room when she
step
the Floor at that sector.
- A sector can be "Above" and "Below" at the same time.
- The neighbor's room number must be valid when you put the attrib,
this
mean that you can't especify a room number higher that the total
already
created rooms, also you can't put the actual current room number.
- Room number "0" mean "there is not portal attrib in this sector."
- When you put a Portal side type, the sector is Cyan colored, when
you
put a portal Above/Below type the sector is Magenta colored.
- Portals Views types
* The Portal view that you put at the front wall for to see the front
neighbor room is called "Front type".
* The Portal view that you put at the Back wall for to see the back
neighbor room is called "Back type".
* The Portal view that you put at the Right wall for to see the right
neighbor room is called "Right type".
* The Portal view that you put at the Left wall for to see the left
neighbor room is called "Left type".
* The Portal view that you put at the Ceiling for to see the above
neighbor room is called "Ceiling type".
* The Portal view that you put at the Floor for to see the below
neighbor room is called "Floor type".
When you define a portals view you must especify the neighbor's room
number
to see, the width size for the window, the height size for the window,
and
the portal view type.
- The Window's size is in tiles.
- When you define "Ceiling types" or "Floor types" then the <height
size> is
interpreted like the <long Size>.
- The neighbor's room number must be valid when you put the attrib,
this
mean that you can't especify a room number higher that the total
already
created rooms, also you can't put the actual current room number.
- The visual window is show in Yellow color and can't be seen from the
back side.
The visual window width goes from left to right, so if you have a 3
tiles
width window, and you put the window at the column 5, then the window
will
cover the sectors 5,6,7.
The portals views must cover the tiles that have the portals attrib,
for
example; if you make a hole in the front wall to acces the front neighbor,
and the hole is 4 tiles width and 2 tiles height at the columns 4,5,6,7,
then
you put a portal side type attrib at the sectors 4,5,6,7 to make Lara
change
to the neighbor room when she step those tiles, then you define a portal
view with the neighbor's room number, with 4 tiles width and 2 tiles
height,
then put the window at the tile 4.
Example Step-by-Step (Front/Back example)
- Create a new room 10x10x3 (Room A)
- Create a new room 10x10x3 (Room B)
- Put in the Neighbor control the value "1" (Room A)
- Select the option "Send to Front" from the menu to send the current
room (Room B) front to the rom especified on the neighbor control.
- The rooms are now well overlaped, make current the room #1. Center
the camera.
- Select the "zero size" shape type, put the heigh selector at 1,
click at the center front walls (5,10 and 6,10) to make a entrance
similar to the picture, the entrance is 2 tiles width and 3
tiles high.
- Put the value "2" at the <room side> portal attrib control, and
click
over the two tiles in the entrance (5,10 and 6,10), these tiles
are
now cyan colored. Note: After this don't forget to reset this
value
before click over others tiles.
- Select the PORTALS dialog, put the Value "2" at the <Room> control,
put the value "2" at the <Width> control, put the value "3"
at the
<Height> control, select the type "Front" at the <type>
combo box,
click the <ADD> button.
- Move the new portal view over the marked entrance: (Press <Alt>
key and click
over the tile at 5,10.)
That's all for the Room #1, now you must do similar work for the room
#2 so
Lara can travel to both ways.
- Make current the room #2. Center the camera.
- Now you must make the 5th dimension to conside with the room #1.
For Rooms that will have the Portal View type "Back" always
do this:
-Remove all the walls for the row#1.
-Make the Row#2 look exactly like the last row in the
previous room:
*Select the "zero size" shape type, put the heigh selector
at 2.
*Click over the sectors at the row#2 for put walls, except
at the
sectors where will be the entrance (5,2 and 6,2).
- Put the value "1" at the <room side> portal attrib control, and
click
over the two tiles in the entrance (5,1 and 6,1), these tiles
are
now cyan colored. Note that you are puting the mark at the row#1,
the
portals attrib always must be placed at the borders rows or
columns.
- Select the PORTALS dialog, put the Value "1" at the <Room> control,
put the value "1" at the <Width> control, put the value "3"
at the
<Height> control, select the type "Back" at the <type>
combo box,
click the <ADD> button.
- Move the new portal view over the marked tiles: Press <Alt> key
and click
over the tile at 6,10. note that you need to rotate the room
to see the
portal view.
Compile and test the level.