|
![](/i/fill.gif) |
Stefan Viljoen wrote:
> Impressive - how'd you do that?
Thanks! I started by scanning the blueprints. They get scaled to the POV
resolution I'm using (1 unit = 1 meter) and I can turn them on or off
for each deck when I render. They are then a guide for laying the other
stuff out.
The gazillion curved staterooms turned out to be easier than I had
expected. In the end I was able to do them all with three macros,
which, themselves, called one basic macro. It looks like this:
// left & right from POV of center of circle
// leftAngle : left/anticockwise side
// rightAngle : right/clockwise side
// insideRadius : inner wall
// outsideRadius : outer wall
// leftWall : 0 = skip, 1 = solid, 2 = partition, 3 = door
// rightWall : 0 = skip, 1 = solid, 2 = partition, 3 = door
// insideWall : 0 = skip, 1 = solid, 2 = solid with doors
// outsideWall : 0 = skip, 1 = solid, 2 = solid with doors
#macro deck_room(leftAngle, rightAngle, insideRadius, outsideRadius,
leftWall, rightWall, insideWall, outsideWall)
Basically it draws a curved rectangular room. Instead of "left, right,
top, bottom", you pass in "left angle, right angle, inner radius, outer
radius". The remaining variables control what sorts of walls are drawn
(if any).
This gets rolled up into three higher level macros for drawing the three
basic room types: lounges, bedrooms, and bathrooms.
#macro deck_room_lounge(leftAngle, rightAngle, insideRadius,
outsideRadius, leftWall, rightWall, insideWall, outsideWall)
#macro deck_room_bedroom(leftAngle, rightAngle, insideRadius,
outsideRadius, leftWall, rightWall, insideWall, outsideWall)
#macro deck_room_bathroom(leftAngle, rightAngle, insideRadius,
outsideRadius, leftWall, rightWall, insideWall, outsideWall)
Presently these macros just draw the walls. Ultimately they would put
all the furnishings into the room as well.
These three macros are then used by the final macros:
#macro deck_room_stateroom_onedouble(leftAngle, rightAngle,
insideRadius, outsideRadius, leftWall, rightWall, insideWall, outsideWall)
#macro deck_room_stateroom_twodoubles(leftAngle, rightAngle,
insideRadius, outsideRadius, leftWall, rightWall, insideWall, outsideWall)
#macro deck_room_stateroom_quad(leftAngle, rightAngle, insideRadius,
outsideRadius, leftWall, rightWall, insideWall, outsideWall, leftDouble,
rightDouble)
These lay out the basic room group types. These final macros are then
used when laying out the deck. E.g:
// ring 5
#local a = deck_width_to_angle(DECK_ELEVATOR_RADIUS,
DECK6_CORR3_OUTER_RADIUS);
deck_room_stateroom_twodoubles( 0+a, 30-a,
DECK6_CORR3_OUTER_RADIUS, DECK6_CORR4_INNER_RADIUS, 0, 1, 2, 1)
deck_room_stateroom_twodoubles( 30+a, 60-a,
DECK6_CORR3_OUTER_RADIUS, DECK6_CORR4_INNER_RADIUS, 1, 1, 2, 1)
deck_room_stateroom_twodoubles( 60+a, 90-a,
DECK6_CORR3_OUTER_RADIUS, DECK6_CORR4_INNER_RADIUS, 1, 1, 2, 1)
deck_room_stateroom_twodoubles( 90+a, 120-a,
DECK6_CORR3_OUTER_RADIUS, DECK6_CORR4_INNER_RADIUS, 1, 0, 2, 1)
I've posted the entire deckroom.inc file over in p.t.scene-files if you
are interested. The whole source code is a bit large. But I have it on a
public CVS server if anyone is interested. Collaborators welcome!
Cheers,
Jo
Post a reply to this message
|
![](/i/fill.gif) |