Track editing progress notes
#51
I yours case is better to replace single roof polygon with two smaller polygons:

roofA: POLY <47> {point7, point8, point9, point12};
roofB: POLY <47> {point9, point10, point11, point12};

_roof: BSPF (point12, point7, point11), nil, roofA, roofB;
Reply
#52
(04-07-2020, 03:32 PM)checkpoint10 Wrote: Something fun I made in Notepad! The one thing surprising on this one is that the BSPF point references needed to be reversed for the 2 right columns compared to the 2 left. Not entirely sure why that is because they are otherwise the same object which I just copied over 3 times. Anyway, it worked!!

Other thing I learned while writing the .3D file is that you can name your points and polygons anything, and be strategic about it. I named the points for the columns in such a way that I only had to add a prefix to all the names each time I duplicated it.

That's sweet. I saw it and laughed. Great work.
Reply
#53
(04-07-2020, 03:32 PM)checkpoint10 Wrote: Something fun I made in Notepad! The one thing surprising on this one is that the BSPF point references needed to be reversed for the 2 right columns compared to the 2 left. Not entirely sure why that is because they are otherwise the same object which I just copied over 3 times. Anyway, it worked!!
If my object has four column then I will make it such way (column numbered from left to right):

R1: BSPF (, , ), nil, column1_right, nil;
R2: BSPF (, , ), nil, column2_right, R1;
R3: BSPF (, , ), nil, column3_right, R2;
R4: BSPF (, , ), nil, column4_right, R3;

L4: BSPF (, , ), nil, column4_left, R4;
L3: BSPF (, , ), nil, column3_left, L4;
L2: BSPF (, , ), nil, column2_left, L3;
L1: BSPF (, , ), nil, column1_left, L2;

Because front of polys of all columns are laying on same plane I can combine them in single list

F0: BSPF (, , ), nil, LIST {column1_front, column2_front, column3_front, column4_front}, L1;

Same for back polygons if they will be visible.

I think this way is optimal. BSPF function is good because we tell when polygon will be drawn by game's graphics. If our point of view is behind plane of view that we set in BSPF function then poly will not be drawn. It means less stress on graphics.

For sure there are other ways to gather columns in 3D. For example you can gather each column at first and then combine them with BSPN function.

C1a: BSPF (, , ), nil, column1_left, nil;
C1b: BSPF (, , ), nil, column1_front, C1a;
C1c: BSPF (, , ), nil, column1_right, C1b;

C2a: BSPF (, , ), nil, column2_left, nil;
C2b: BSPF (, , ), nil, column2_front, C2a;
C2c: BSPF (, , ), nil, column2_right, C2b;

C3a: BSPF (, , ), nil, column3_left, nil;
C3b: BSPF (, , ), nil, column3_front, C3a;
C3c: BSPF (, , ), nil, column3_right, C3b;

C4a: BSPF (, , ), nil, column4_left, nil;
C4b: BSPF (, , ), nil, column4_front, C4a;
C4c: BSPF (, , ), nil, column4_right, C4b;

A: BSPN (, , ), C2c, C1c;
B: BSPN (, , ), C3c, A;
C: BSPN (, , ), C4c, B;
Reply
#54
This is definitely a more logical way to think about drawing order - I have not been as thoughtful on this point and will want to revise all my BSPFs.

A couple questions as I review the example you gave:

If I imagine I am looking at the object while Column 4 is closest to me (i.e. I am standing on the right), I would want all the right-side-facing polygons to be drawn from Column 1 (the farthest) to Column 4 (the closest). In which case why is your second block of code going from Column 4 to 1, or is my understanding reversed?

I also wonder on the last line "F0: R1: BSPF..." why is it not just "F0: BSPF..."? I believe I understand the rest of it, and the LIST function seems like a nice way to condense the code since the order doesn't matter for all the polygons lying on same plane.

Thank you for your patience and willingness to teach!
Reply
#55
(04-07-2020, 04:39 PM)checkpoint10 Wrote: If I imagine I am looking at the object while Column 4 is closest to me (i.e. I am standing on the right), I would want all the right-side-facing polygons to be drawn from Column 1 (the farthest) to Column 4 (the closest)...
You are right. That what I do in first block. Draw right side polygons from farthest to closest column.

(04-07-2020, 04:39 PM)checkpoint10 Wrote: ..In which case why is your second block of code going from Column 4 to 1, or is my understanding reversed?
Because second block is for leftside polygons. And you can see left side polygons only when standing on the left. Then Column 4 is farthest and Column 1 is nearest. So I draw them in second block from Column 4 to 1. That's simple Wink2

(04-07-2020, 04:39 PM)checkpoint10 Wrote: I also wonder on the last line "F0: R1: BSPF..." why is it not just "F0: BSPF..."?
Missprint or copy error Smiley Should be just F0:
Reply
#56
This is like learning a programming language. These examples are really helpful. I was wondering when I would need to use BSPN (or BSPA or BSP2) because by far most examples only use BSPF.
Reply
#57
Yes, for sure there is something common with programming.
BTW If you need examples of any objects from my tracks then I have full archives of all building files for my tracks Smiley Just ask
Reply
#58
I am trying to combine a couple of 3DOs (two towers of the same hotel building) and I thought I could make another .3D file that does this:

tower1: DYNAMIC 0, 0, 0, 0, 0, 0, 1, EXTERN "hhotel1";
tower2: DYNAMIC 150000, 0, 0, 0, 0, 0, 1, EXTERN "hhotel2";
building: LIST {tower2, tower1};

This seems to work, except I am not sure how to control the draw order. Let's say from some angles I want tower1 to be drawn first, other angle I want tower2 first. Is there a way to do this, or do I need to go back and combine all the points and polys from both towers into one .3D file?
Reply
#59
(04-08-2020, 02:19 PM)checkpoint10 Wrote: I am trying to combine a couple of 3DOs (two towers of the same hotel building) and I thought I could make another .3D file that does this:

tower1: DYNAMIC 0, 0, 0, 0, 0, 0, 1, EXTERN "hhotel1";
tower2: DYNAMIC 150000, 0, 0, 0, 0, 0, 1, EXTERN "hhotel2";
building: LIST {tower2, tower1};

This seems to work, except I am not sure how to control the draw order. Let's say from some angles I want tower1 to be drawn first, other angle I want tower2 first. Is there a way to do this, or do I need to go back and combine all the points and polys from both towers into one .3D file?
I you will make 3do as you shows above then it will work only in N2/N3. 3do in ICR2 format needs that at least one BSP function has to be presented in 3d. So for you best way to combine two objects is to use BSPN function. Create thre points to determine some plane between two objects. This plane will determine when draw order switch will happened. Then combine objects byBSPN function using this plane.

I ususall do this things in main track.3d file. After main object list I place needed BSP functions and then call them in sections object lists.
Reply
#60
Thank you. I will try your advice.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)