

#1
Posted 10 March 2020 - 01:38 PM
As much as they are an integral part of the GPL experience, I've never messed with them and don't know how to manipulate them to do what I want.
I know that things like the flagman is an SRB, but that's about it.
How do you make the waving flagman?
How do people make the 'waving' flags on a pole?
How do you make the image face the viewer always?
If someone has a user guide to SRBs, that would be great! If not, then maybe this thread will help not only me, but others like me!
#2
Posted 10 March 2020 - 03:34 PM
Flagmen and starter are in GPL/objs folder and ruled by the .exe itself; they are not just SRB; the images themselves need to have a determinate color palette or they will not work.
How do people make the 'waving' flags on a pole?
Those are made by using the animation tool called GPL Anim that create a structure that can handle animated objects.
For the flags, you then create a series of (usually 8) SRB that will make a loop when played continuously.
I found a little tool called flagimation that can create a waving series of images from a base bmp; you can for sure make better flags using the modern 3D programs but I just don't know how...
How do you make the image face the viewer always?
That is the characteristic of SRB 3DOs.
You use SRB23DO tool (GPLSRBMini3DOEditor100.exe) for creating the 3DO that goes with the SRB image; giving its height and an optional collision.
SRB image comes from a BMP using WinMip, exactly as the MIP image.
Here you find some tricks by luna:
http://javinester.co...pl/editing.html
Done these tracks and working on others.
#3
Posted 10 March 2020 - 03:38 PM
This can be done using GPL Editor:
1. add new string = name of .srb. Make note of offset
2. add new vertex (point) xyz = position of srb in the 3do. Make note of index number
3. find place in 3do tree for srb. This is the awkward bit. To avoid clipping the srb needs to be positioned in the correct node of the correct plane. Your 3do will most likely be a load of T-9 nodes - 1st child is above (in front of) the plane, 2nd is on the plane and 3rd is below (behind) the plane. Usually the 3rd node will have another T-9 node. Basically your srb will need to be behind (below) everything that is in front of it and in front of (above) everything that is behind it ... this is obvious in the real world but you need to consider the structure of a 3do to get it to work in the GPL world. If you select a node and press F2 you'll see all the contents of that node, and this should help you find where in the 3do tree the srb should be. The attached diagram may also help explain how this works if you wanted for example to have a tree behind the two 'walls'. (note that depending on the structure of the object it may actually be impossible to add the the srb without clipping, or at least not without altering the planes first.) If you're lucky you'll find an empty node where you can put the srb ; if not you'll need to cut the node, replace with a T-4 with 2 children and paste back what you cut into the 2nd child and add the srb in the 1st child (or vice versa ).
4. When you've found the right place/node, right-click and replace node with a T-3 (srb) node.
5. Double-click srb node, type in string offset and vertex number, set scale (in metres) and set unk to 65536.
6. save 3do, done.
Done these tracks and working on others.
#4
Posted 11 March 2020 - 07:12 AM
#5
Posted 11 March 2020 - 07:30 AM

For some more inside on the SRB you can look this and my following posts in the thread.
http://srmz.net/inde...572
Just consider that the pitboard.srb that we talk about there, behaves just like all the other .srb files so those two adjustable values in the last row move the anchor point (where the SRB rotates around) along the texture.
This is useful for example if you have a flag with pole texture that you want to use as SRB:
You make the SRB and by default it will rotate around its center.
If you want it to rotate around the center of the pole that is on the left, you will need to change the value to the pixel you measured to be the center of the pole in the texture.
Hope its clear enough...

Done these tracks and working on others.
#6
Posted 10 May 2021 - 08:49 AM
ginetto, on 10 March 2020 - 03:34 PM, said:
You use SRB23DO tool (GPLSRBMini3DOEditor100.exe) for creating the 3DO that goes with the SRB image; giving its height and an optional collision.
How can I get this tool to work. I've tried it on my Win7 box with Win98 compatibility and it still will not install. Never mind Win10.
The above "How to add an SRB to existing 3DO" assumes a lot of tribal knowledge that I do not have.
I can make an SRB with PapyBMP, but have no idea how to add it to a 3DO as a texture
#7
Posted 10 May 2021 - 01:19 PM
I use win 7 and have it works normally, no extra compatibility needed.

To add an SRB to an existing 3DO you need to use GPL editor. If you never used this tool, it can be overwhelming but is just a matter of trial and error.
There is no readme for this particular tool but after a few tries (and a few always welcome questions here) I am sure you can figure it out.
The above instructions are accurate but first you need to open a 3do in GPL editor and just mess around with its options.

Done these tracks and working on others.
#8
Posted 10 May 2021 - 06:59 PM
Adding an SRB to an existing 3do... Step 3 says : "Your 3do will most likely be a load of T-9 nodes"
Is that like saying a "Flavor=9" node???
this is a snapshot of my tree. Please tell me what i am looking at
Attached Files
#9
Posted 11 May 2021 - 03:03 AM
Yes, a T-9 node is the same as a Flavor=9 node. However you are looking at the node repository of the 3do file. The actual tree is found in the 'PRIM' section, which stands for 'Primitives' and is the core of the 3do file. All the other sections contain info that is eventually used in the Primitives section. In a car 3do you have Handles (HAND) which point the exe towards an offset within the Primitives section to execute a particular kind of behaviour, i.e. wheels need to rotate so there is a Handle that points the executable to every wheel in the 3do to make them behave like a wheel, which is revolving. You also have other sections like Strings (STRN) to couple an external 3do or mip to your 3do so you can use it in the PRIM section, Vertices (XYZS) to make up the points used for the polygons, and Planes (PLAN) which determine where a polygon is in 3D space to decide if a polygon should be drawn or not.
So, go the the PRIM section, expand it and you will see your 3do tree root. Select a node in the tree and press F2 to let GPL Editor draw it and show it on the right hand side in your graphical window.
---
Technical babble:
A Flavor 9 node draws GPL polygons in a particular way. It always has three 'Children' (i.e. tree nodes lower down in the tree). The 'Number' describes the Plane that is used from the PLAN section. A plane is a flat invisible surface in 3D space that is used to define it into two sections (above the plane and below the plane) by using vector coördinates. Since you can let GPL Editor calculate the plane based on the location of a polygon I've never looked too much at the actual values but anyway, that's how planes work.
Child 1 (the top child) of the Flavor 9 node can have a polygon inserted (Flavor 81f for instance) or it can be left empty. Usually it's left empty because when you put a polygon in Child 1 it is ALWAYS drawn on your screen. The plane from the parent is used to determine whether to draw everything lower in the 3do tree in front of or behind the polygon.
Child 2 usually has a polygon inserted. The plane from the parent is used to determine whether to draw it or not. Everything lower in the 3do tree gets drawn in front of the polygon.
Child 3 usually has another Flavor 9 node inserted, and the whole process continues. So trees usually look like T-9 --> -empty- / 81f / T-9 --> -empty- / 81f / T-9 etc. At least for cars which is where I do most of my editing.
---
Tommie.
Edited by TvO, 11 May 2021 - 07:55 AM.
#10
Posted 11 May 2021 - 07:27 AM

He is a pro with this tool

For inserting an SRB I attach a few screenies here that might help more than words.
Open the 3DO in GPL editor; I usually set it up so the polys have different colors and are outlined (Options menu) then drag down the border for lower window (so you have more usable space for the main windows).
You can also move the buttons by drag and drop so they take less space.
OK, you see this

Scrolling down the PRIM tree for a place to put your SRB you can push F2 and see where you are at:

once you found a place that seems good, select an empty node and right click on it and choose Insert>Replace Node

Now an Add new node window appears; in the list, select Flavor 0x3 Srb then OK

You see that a new line replaced the empty node, is a Flavor=3 that link an SRB to the 3DO

Double click on this line and a window appears; in this window you need to insert the string reference for:
string offset : the name of the SRB (without extension)
Vertex Number : the vertex to wich the SRB will be attached and rotate around
Scale : the height of the SRB in meters
Unk? : a value that will tell the SRB to be drawn, straight, mirrored or upside down ;
from luna's site:
65536 - this is the default value; the srb will be orientated 'normally'
0 - this will mirror the srb left-right
65538 - this will flip the srb top-bottom
2 - this will mirror and flip the srb

The string and vertex for the SRB need to be added to the 3DO; for this you use the buttons in the top row

After you have done all of this, you need to test the file in GPL to see if the placement of the SRB in the tree is correct; if so you will see it behind the polys in front of it and in front of the ones behind.
If not, then you need to move the Flavor=3 in a different position; to do so, select the flavor 3 , right click Cut node

choose the new position that is an empty node, select it, right click, Paste node

Follow Tommie indications whether to go up or down the tree; a few tries will make it obvious how it works

IMPORTANT: This program is easy to crash so remember to save frequently while you work and always make a backup of the file before to start working on it.
Hope this will help you to figure it out a little quicker

Done these tracks and working on others.
#11
Posted 11 May 2021 - 07:49 AM
#12
Posted 11 May 2021 - 07:55 AM
ginetto, on 11 May 2021 - 07:27 AM, said:
Follow Tommie indications whether to go up or down the tree; a few tries will make it obvious how it works

IMPORTANT: This program is easy to crash so remember to save frequently while you work and always make a backup of the file before to start working on it.
Hope this will help you to figure it out a little quicker

Now that's more of a proper how-to. Thanks both of you for your generous help!
#13
Posted 11 May 2021 - 08:36 AM

Just remember, if you want to place your SRB behind your object, place it very high up in the tree (perhaps at the empty node after offset [1c7c] in ginetto's example). The executable will draw any polygons lower in the tree on top of your SRB so your SRB will appear behind the object in-game. If you want to place your SRB in front of your object place it at the very end of the tree (that [470] offset in ginetto's example seems all right). Don't use a vertex in front of the object and then place the SRB very high up in the tree. You'll see the SRB get drawn behind the object but you'll get clipping because the geometry (in front of object) doesn't match the draw order (behind object).
For a 3DO containing just the SRB obviously it doesn't matter, as you'll have just the SRB. Although I've never used it, I guess this is what GPLSRBMini3DOEditor does (for the car 3do's I edit there are almost no SRB's there so I haven't used the program yet). You then place the 3DO containing the SRB on your track.
Here's some background info from Guru (Phil Flack):
Grand Prix Legends File Formats (eclipse.co.uk) (click on '3DO' (bar left).
Note that even Guru doesn't know EVERYTHING, so his explanations can contain mistakes or lack practical examples. As you'll see Guru's explanation of a T-9 / Flavor 9 node is different to mine as his info seems to come from a different (I presume coding) background. Mine just comes from doing everything wrong the first time


As most track objects are created with OneTwo3DO which creates a 3do tree automatically they can look a bit erratic when looking at them with GPL Editor as they don't follow the clean tree structure of a car 3do where the tree is drawn by hand. But almost all tree nodes have a Flavor 8, 9, or 10 node where you can drop your SRB in without problems

Tommie.
#14
Posted 11 May 2021 - 09:57 AM
Do I want to pick a node that is high up in the PRIM structure, or is the bottom better.
If I understand what Tommie said, I want it at the bottom so it is drawn last and in front of the barn. Is that correct thinking?
#15
Posted 11 May 2021 - 10:08 AM

#16
Posted 11 May 2021 - 02:09 PM
TvO, on 11 May 2021 - 10:08 AM, said:


now...

Quote
string offset : the name of the SRB (without extension)
is it correct that this isnt actually a STRN, but the reference number {(88) File: tree01 in my case} of the newly created string?
Quote
similarly, this is the reference number of the newly added vertex - (vertex 40 in mu case)
Quote
is this an actual height in meters or a scale value versus the size of the MIP/SRB?

It doesnt appear that anything is changing!? Am I missing something?

#17
Posted 11 May 2021 - 02:50 PM
ljmagyar, on 11 May 2021 - 02:09 PM, said:
TvO, on 11 May 2021 - 10:08 AM, said:


now...

Quote
string offset : the name of the SRB (without extension)
is it correct that this isnt actually a STRN, but the reference number {(88) File: tree01 in my case} of the newly created string?
Yes

ljmagyar, on 11 May 2021 - 02:09 PM, said:
Quote
similarly, this is the reference number of the newly added vertex - (vertex 40 in mu case)
Also true. Same story as with the string entry.
ljmagyar, on 11 May 2021 - 02:09 PM, said:
Quote
is this an actual height in meters or a scale value versus the size of the MIP/SRB?
I'm not sure



ljmagyar, on 11 May 2021 - 02:09 PM, said:
As said before, some stuff in GPL Editor doesn't work properly. The program does not update the tree display after you've made a change. There are some exceptions, but this isn't one of them. Doesn't matter, just double-click on the node to open the popup to change the values. If all is there, all is well! Just don't forget to save your 3DO

Keep an eye on the alpha channel. It is set to 0 by default. You may need to set it to 255 to get your SRB to appear in-game. 0 means it is fully transparent. 255 means it is fully opaque.
Tommie.
Edited by TvO, 11 May 2021 - 02:59 PM.
#18
Posted 11 May 2021 - 05:29 PM

The scale value is the actual height in meters you want to assign to the srb texture.
It can be 2.25 (and it will be 2.25 meters in GPL ) or whatever. SRB is a texture, is not like a mip that need to be mapped on a polygon with specified dimensions, height and width and the mip will adapt; srb it will be seen in GPL the same as you make it in photoshop, same proportions, you can just give it a height dimension.
The string will not change until you save, close and reopen the 3do file. This is valid for all the edits you do in GPL editor; it's a bug but once you know, is not a big deal.
For the opaque transparent I am not sure, it might be just how the poly is displayed when is not textured but I don't recall... is better if you follow Tommie advice and make it 255. Or you can try leaving at 0 and see if it shows in GPL; this tool is all about trial and error

Done these tracks and working on others.
#19
Posted 11 May 2021 - 05:36 PM
... edit. Apparently you can only add 1 SRB to one empty node without blowing things up... unless I goofed up.
I get an error "Exception in ...\nlbarn01.d30 offs e5c"
I was hoping to add several SRB trees in front of the barn. I guess I'll add them as SRB/3DOs one at a time.
If there's a way to add more than one to an existing 3DO, does anyone know how?
Edited by ljmagyar, 11 May 2021 - 07:08 PM.
#20
Posted 11 May 2021 - 11:12 PM
#21
Posted 12 May 2021 - 05:08 AM
TvO, on 11 May 2021 - 11:12 PM, said:
that makes perfect sense... ahhh the subtleties of tribal knowledge
#22
Posted 12 May 2021 - 05:50 AM

#23
Posted 12 May 2021 - 07:09 AM
GPL Track Editor can be exasperating though with its bugs.
#24
Posted 12 May 2021 - 06:40 PM
Thanks for your help and patience guys. Very much appreciated
#25
Posted 13 May 2021 - 05:36 AM

If I may ask, what project are you working on?