Jump to content


SRB textures

srb texture waving

  • Please log in to reply
30 replies to this topic

#1 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 10 March 2020 - 01:38 PM

Ok, So I know this is going to sound strange to those of you who know me, but I haven't a clue how SRBs work.

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 ginetto

ginetto

    Master Tracker

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 11,913 posts
  • Gender:Male
  • Location:Lombardia ITALIA

Posted 10 March 2020 - 03:34 PM

How do you make the waving flagman?
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 ginetto

ginetto

    Master Tracker

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 11,913 posts
  • Gender:Male
  • Location:Lombardia ITALIA

Posted 10 March 2020 - 03:38 PM

This is how to add an SRB to a pre existing 3DO:

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 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 11 March 2020 - 07:12 AM

Many thanks Ginetto.  This helps tremendously.

#5 ginetto

ginetto

    Master Tracker

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 11,913 posts
  • Gender:Male
  • Location:Lombardia ITALIA

Posted 11 March 2020 - 07:30 AM

Great Lou :)
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... :P

Done these tracks and working on others.


#6 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 10 May 2021 - 08:49 AM

View Postginetto, on 10 March 2020 - 03:34 PM, said:

How do you make the image face the viewer always?

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 ginetto

ginetto

    Master Tracker

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 11,913 posts
  • Gender:Male
  • Location:Lombardia ITALIA

Posted 10 May 2021 - 01:19 PM

Try to put all these dll together with the exe. I have it installed with all the other tools so I am not sure which one it uses.
I use win 7 and have it works normally, no extra compatibility needed.
Attached File  SRBmini.7z   1.24MB   4 downloads


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 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 10 May 2021 - 06:59 PM

Thanks Gin... that Mini SRB works.  Not sure why I cant run the install.

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

  • Attached File  tree.jpg   318.52K   10 downloads


#9 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 11 May 2021 - 03:03 AM

Hi Lou,

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 ginetto

ginetto

    Master Tracker

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 11,913 posts
  • Gender:Male
  • Location:Lombardia ITALIA

Posted 11 May 2021 - 07:27 AM

As Tommie said :rolleyes:
He is a pro with this tool :thumbup:

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
Attached File  1.jpg   120.85K   15 downloads

Scrolling down the PRIM tree for a place to put your SRB you can push F2 and see where you are at:
Attached File  2.jpg   114.08K   15 downloads

once you found a place that seems good, select an empty node and right click on it and choose Insert>Replace Node
Attached File  3.jpg   151.61K   16 downloads

Now an Add new node window appears; in the list, select Flavor 0x3 Srb then OK
Attached File  4.jpg   123.3K   13 downloads

You see that a new line replaced the empty node, is a Flavor=3 that link an SRB to the 3DO
Attached File  5.jpg   101.63K   10 downloads

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
Attached File  6.jpg   91.64K   11 downloads


The string and vertex for the SRB need to be added to the 3DO; for this you use the buttons in the top row
Attached File  aaa.jpg   45.78K   9 downloads

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
Attached File  8.jpg   96.83K   8 downloads

choose the new position that is an empty node, select it, right click, Paste node
Attached File  9.jpg   84.27K   6 downloads


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 :thumbup:

Done these tracks and working on others.


#11 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 11 May 2021 - 07:49 AM

Thanks Tommie.  That helps some... will keep looking at it.

#12 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 11 May 2021 - 07:55 AM

View Postginetto, 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 :thumbup:

Now that's more of a proper how-to.  Thanks both of you for your generous help!

#13 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 11 May 2021 - 08:36 AM

Those pictures are very clear ginetto :cool: .

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 :P . However they are excellent as a first guide to know what your are looking at within GPL Editor. In the case of the T-9 node Guru made a wrong assumption and got confused comparing it to the T-A (Flavor 10) node. I figured out the workings of the Flavor 9 node after seeing how much Gustavo liked them when working on the GPLEA car models, and copied his working method when creating a new 67 GTx Lola T70 nose. I still have to finish the rest of that car :think: ...

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 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 11 May 2021 - 09:57 AM

Ok, so lets suppose I have a tree that is in a trackside 3DO.  In this case, a barn that is there for no purpose other than to create a familiar visual reference.  When driving down the front straight, the bar is off to the side.  The tree will (should) be in front of your vision when passing the barn.  You can see the barn behind the tree.

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 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 11 May 2021 - 10:08 AM

Yes :)

#16 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 11 May 2021 - 02:09 PM

View PostTvO, on 11 May 2021 - 10:08 AM, said:

Yes :)

:burp:

now...

Attached File  treeSRB.jpg   210.02K   12 downloads

Quote

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)

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

Vertex Number :  the vertex to which the SRB will be attached and rotate around

similarly, this is the reference number of the newly added vertex - (vertex 40 in mu case)

Quote

Scale : the height of the SRB in meters

is this an actual height in meters or a scale value versus the size of the MIP/SRB?

Attached File  treeDialog.jpg   21.05K   10 downloads

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

Attached File  treeChange.jpg   65.75K   5 downloads

#17 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 11 May 2021 - 02:50 PM

View Postljmagyar, on 11 May 2021 - 02:09 PM, said:

View PostTvO, on 11 May 2021 - 10:08 AM, said:

Yes :)

:burp:

now...

Attached File  treeSRB.jpg   210.02K   12 downloads

Quote

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)

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 :) . The Flavor 3 node only needs to reference the string number (in this case 88) to point the executable to use that string in the 3do for this node.

View Postljmagyar, on 11 May 2021 - 02:09 PM, said:

Quote

Vertex Number :  the vertex to which the SRB will be attached and rotate around

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.

View Postljmagyar, on 11 May 2021 - 02:09 PM, said:

Quote

Scale : the height of the SRB in meters

is this an actual height in meters or a scale value versus the size of the MIP/SRB?

I'm not sure :think: . ginetto has more experience about SRB's, and it appears he is talking about an actual height in meters rather than a scaling value. In the example from Richard Neville (luna) here ( http://javinester.co.../SRBtricks.html ) he seems to have set the scaling to 20. Seems kinda low for a tree (20 meters = 66 feet), but could work I guess. Anyway, it's easy to test and if it's too big or small, adjust :) . GPL Editor is by no means a finished product, it's in beta stage at best, even though it hasn't been updated in 21 years hahaha. So some stuff it asks may be incorrect and/or doesn't work. This could be one of those cases, where it should read 'height' but instead reads 'scale'. Still, it's all we have and beats hex editing any day :) .

View Postljmagyar, on 11 May 2021 - 02:09 PM, said:

Attachment treeDialog.jpg

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

Attachment treeChange.jpg

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 ginetto

ginetto

    Master Tracker

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 11,913 posts
  • Gender:Male
  • Location:Lombardia ITALIA

Posted 11 May 2021 - 05:29 PM

As Tommie said already, yes to all your question :)
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 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 11 May 2021 - 05:36 PM

thanks guys... going to try placing the 3DO and testing tonight.

... 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 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 11 May 2021 - 11:12 PM

Add a Flavor 4 node with how many children you like into the place of the empty node and put SRB's as Child nodes. A Flavor 4 node is just a split in the tree and does nothing else.

#21 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 12 May 2021 - 05:08 AM

View PostTvO, on 11 May 2021 - 11:12 PM, said:

Add a Flavor 4 node with how many children you like into the place of the empty node and put SRB's as Child nodes. A Flavor 4 node is just a split in the tree and does nothing else.

that makes perfect sense... ahhh the subtleties of tribal knowledge

#22 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 12 May 2021 - 05:50 AM

Well, the more you know, the more you know what you don't know :P

#23 Lee

Lee

    Honored Member

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 8,793 posts
  • Gender:Male

Posted 12 May 2021 - 07:09 AM

It's amazing that Phil Flack could figure out the .3DO tree structure with all its different flavors and then write a program to edit them.  It's all so complex and I'm in awe of someone with that level of skill.

GPL Track Editor can be exasperating though with its bugs.

#24 ljmagyar

ljmagyar

    Senior Member

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 138 posts
  • Gender:Male
  • Location:Indiana, USA

Posted 12 May 2021 - 06:40 PM

Success!!!  I added 8 light poles to my paddock wall and it works!!!

Thanks for your help and patience guys.  Very much appreciated

#25 TvO

TvO

    Honored Member

  • Member
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 2,381 posts
  • Gender:Not Telling

Posted 13 May 2021 - 05:36 AM

Wehey, nice :cool: .

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