• Welcome to SC4 Devotion Forum Archives.

How to model a bridge for SC4

Started by jeronij, April 05, 2007, 05:21:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jeronij

Dear SC4 Bridge Engineer

This is a tutorial intented to show you the technical aspects that you must keep in mind while designing a bridge for Sim City 4

We will build a very basic and untextured bridge, since the focus of this tutorial is not the artistical modelling, but the technical one. You must extrapolate the techniques shown here to your own models. This tutorial will cover the construction of the most basic bridge, which is made of three pieces:
Start/end piece
Repeat piece
Center piece

This tutorial is made for the most unexperienced BATter, so probably some of you will find it very basic. The idea is that everybody can follow it, regardless of its BATting experience.

THE MOST IMPORTANT THING IS TO KEEP ALWAYS THE 16X16 METERS PIECES AND THE EXACT CENTER PLACEMENT RULES IN MIND. The width could be variable, but not the lenght. The pieces must always be 16 meters long (Y Axis). And the pieces must always be exactly centered in the 0,0 x,y coordinates.

Lets start with it.

MODELLING BASIC BRIDGE PIECES TUTORIAL

1) CREATING AND PLACING THE TRANSIT TEXTURES

Lets start with a brand new fresh BAT scene.

The first thing we will add is the basis transit texture (*) for the bridge:

We will create a basic box with the following settings




We will create a new standard material, and add the desired transit network as the difuse map



We will go one level up inside the material editor



And we go to the maps tab. We select the opacity map, and we assign the correct alpha map ( included with the main transit network texture)



We can apply now the material to the box we created



To be able to see it the right way, we must activate the "2-sided" option



We can copy the box twice as shown in the image, and we have the three basic tiles basis ready  ;D



2) CREATING AND PLACING THE PIECES

We will create now very basic objects to conform the bridge pieces. Simply create one box as shown below for the start piece basis



Create another bos with the following parameters for the start piece support



And this is the basic start / end piece.



Time to create some more pieces.Selec the basis box for the start piece and copy it three times as shown in this image



Create another box with the indicated parameters to create the pylon for the center piece. We have our first basic bridge created  :thumbsup:



3) BASIC LODS CREATION

Select the two boxes of the start piece and make a copy (shift+click)



Hide all but the two new boxes. Select one of them and convert it to an editable mesh. Name it LOD5



Select "Add" and click on the other box to create a single object.



Make two copies of the new object, and call them LOD4 and LOD3



Unhide all, and select all the objects for the start piece, including the LODs, and the repeat piece objects, and use the "Save Selected" option to create a new file with these objects.



Now play a bit with the objects.Move the repeat pieces to the 0,0 grid coordinates, and make two additional copies of it. Use the existing basis box to create the LODs for this piece, using the technique explained in the step above. Again Save selected as a new file.



Finally repeat the process for the last piece. The Support piece. (LODs and Save selected)



"$Deal"$ IMPORTANT
Once you understand the basics of this tutorial, you must also read and understand the: How you get rid of the glitches between pieces tutorial. If you dont follow these rules when rendering, the models will look wrong in game, specially in zoom 2 and 1 levels.


4) RENDERING THE MODELS AND GIVING THEM CUSTOM ID's

We must give each model a custom Group and ID values. These values will be given to you when I know the exactly amount of pieces that you will need and the type for your bridge.
The BAT usually assigns a random GI, and we must make an extra step to get our GI

Create a new empty scene. Create a smal box. The smallest, the best.



Render this box. Give it the definitive name that you want for the final model.



Once the model is rendered, (yes , the single box), it is time to save the file,



And open the properties dialog box



Go to the Custom tab, and click on the ModelID in the list. The Group and ID are editable now in the value box. You will have to change the second and third values here, with the ones that I will indicate.

If you want to follow this tutorial, use the following values for the GI's for your models:
Start piece: group(second value)= 0xbadb57f1  Instance(third value): 0x30000000
Repeat piece: group(second value)= 0xbadb57f1  Instance(third value): 0x30010000
Center piece: group(second value)= 0xbadb57f1  Instance(third value): 0x30020000



Once you have changed the values with the new ones, click on update. Save the file and exit GMAX, or start a new scene, and the re-load the recently saved. This step is very important and you must make sure you follow it carefully.



Once you have reloaded your scene again, we must empty it. Unhide all the elements in the scene, select them all, and delete them.



Once the scene is empty, it is time to recover our previous pieces.Click the merge option....



and select the desired model for this piece.



Select all  the elements in the merged model and accept



And your model is ready to be rendered  ;)



Repeat this step for every piece.

5) FINAL TOUCHES

Once all your models are rendered, you must clean up your plugins folder.



At this point, you should send the models to me or another modder in this team , so the draggable bridge can be done

(*)Corrected textures have been gently provided by Callagrafx. They are under testing right now, and will be attached to this tutorial as soon as the test is passed.


THIS TUTORIAL IS UNFINISHED AT THIS MOMENT, AND SOME ADDITIONAL INFORMATION AND PICS, MAY BE ADDED IN THE NEXT DAYS. Anyway, the main process explained here is 100% valid.

Tomorrow I will attach the textures and also a test bridge exemplar for you to download, so you can follow this tutorial on your own computers.

You will need this file for all the existing and new bridges (including the one explined in the tutorial) to work togheter:
NAM Bridges Controller

And attached to this post  is the test bridge for the ones interested in following this tutorial. This is a street bridge ( even it uses road textures.... :-[ ), and it works even if you dont have the models. As you create the models, you can draw the bridge and see how the models look like  ;)

EDIT 220407: Also attached are some corrected textures for road, one way road and avenue.
EDIT 0605007: Also attached are all the pending corrected textures for railroad, street, highway, elevated rail, GLR and monorail.
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


freedo50

Hi jero, i have decided to try my hand at modelling bridges and thought i might start out with an avenue bridge, can you tell me  if the network textures are available yet? Also, are the support sections of the bridge allowed to be more than 1 tile long?
Thanks,
Fred

jeronij

#2
Glad to see some volunteers  :thumbsup:

Freedo, I would suggest you to start with a sigle tile bridge ( road, street, train, GLR, RHW, monorail, elevated rail) for your first model. It makes things much easier for the first time  ;)

We dont have the adjusted textures yet, but once you know what type of bridge you will make, I will try to adjust that one for you. I have the one I used for the Krummbach bridge, which would fit nicely for a road, onewayroad and avenue bridges.

Ah, the support sections should be one tile long. However, you can use overhanging models (for the archs and such) but I suggest you (again) to start with a basic and simple bridge.
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


freedo50

Thanks for the advice, I figure I will start with a road bridge first and then do the avenue bridges I originally wanted to do after that.Could you send me the textures for a road bridge please?
Hopefully, I will be able to get a basice draft of this finished by the end of today.
off to revise now  :'(
Thanks,
Fred

jeronij

I have attached some corrected textures to the first post  ;)
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


freedo50

Thanks, I've finished most of my revision for the day ;D, so I'll crack on with my bridge now!

Colyn

Ok ... I have some questions ...

1. Can a bridge be limited to what height it will be ... what I am after is low level bridges.
2. Do you apply nitelites as normal in gMAX.

Here is what I have done to get a feeling for this ... obviously it needs some more components.



Work, the annoying period between bike trips.
Come see CSX Play

jeronij

Some answers then... ;)

1) No, the way you mean  ::) .
2) Yes. You can nightlight your model as usual in BAT. You can add existing props lights as well, and create your own if you want for that bridge.

The model is looking nice and it is really unique. The support pieces should be around 200 meters long, or as long as possible without loosing credibility. The start and end pieces should be also longer ( to the Z). Maybe adding a simple squared block under the actual pieces would be enough.
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


Colyn

JR I am not sure I understand ... what do you mean by ... "The support pieces should be around 200m long" ?

In my picture is 3 pieces ... the END PIECES and the MIDDLE pieces,

WHat do you mean the start and end should be longer ... do you mean the FOOT need to go DOWN more ?
Work, the annoying period between bike trips.
Come see CSX Play

freedo50

Lookin good there colyn, that will be a cool bridge to use in more equatorial regions.

I have a quick progress report, I tried my first bridge, following the tutorial exactly, and so moved onto the avenue bridge. here's what I have so far, still need to add railings, median, lightpoles etc.:



What do you think? Are the textures ok? I'm not really certain about them, but I can't think what's wrong.

Fred

EDIT: Colyn; He means the support pillars should go down to around -200 on the Z axis I think.

jeronij

Ok, lets go....

Colyn:
(1st Piece) The start and the end pieces are the same piece, which the game mirrors as necessary.

(2nd Piece)There must be a repeat piece, which normally does not have pylons ( but this depends on the type of bridge that you are doing). I can not see this piece in your bridge

(3rd Piece)There must be a center piece, with pylons, for longer bridge lenghts. This piece should have the pylons-supports as long as possible. I can see this piece in your model ( the center piece).

The 200 meters thing:  You must provide your bridge with as long as possible supports. To see how this works: Make a test with the Krummbach bridge.
Place one bridge at almost sea level
Place one bridge at 100 meters of elevation
Place one bridge at 200 meters of elevation
Place one bridge at 300 meters of elevation

Until the 200 meters you will see the bridge's model pylons
From the 200 meters you will see the Maxis pylons bases (is like a building foundation)
The shorter you make your pylons, the sooner the Maxis foundations will shop up.

About the start/end piece, yes, that is what I mean.

Freedo, didn't we say a one tile width bridge ?¿  The textures are looking right to me so far. Lets see the details.... ;)
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


freedo50

Lol jeronij, I was starting on my avenue bridge! I can cut it down to a road brige though if it is that much more complicated with an avenue. Actually, I think I may try and do both anyway! You've got me going now ::)

Fred

Colyn

Ok I followed the Tutorial and entered the GI as per instruction but when I RENDER I get a gMax Error ... Code = 0 ???
Work, the annoying period between bike trips.
Come see CSX Play

Colyn

Ok seems I have overcome that error and the pieces are rendering now.
Work, the annoying period between bike trips.
Come see CSX Play

Colyn

Problem ... two of the pieces rendered with the incorrect IID's :(
Work, the annoying period between bike trips.
Come see CSX Play

pilotdaryl

#15
So Jeronij I have a question for you.  If the road texture piece is at Z-0.0, and the start piece base at Z-0.11, how will the bridge work?  One such example is the LODs not covering the road piece (and being 'underground'), another such example is the fact that the start piece base is also underground.  How will this work?

Okay I have another problem--the posts holding up the handrail at the ends of the pieces are sticking out a bit.  Will this still work?

jeronij

Quote from: pilotdaryl on April 27, 2007, 07:02:00 PM
So Jeronij I have a question for you.  If the road texture piece is at Z-0.0, and the start piece base at Z-0.11, how will the bridge work?  One such example is the LODs not covering the road piece (and being 'underground'), another such example is the fact that the start piece base is also underground.  How will this work?

Okay I have another problem--the posts holding up the handrail at the ends of the pieces are sticking out a bit.  Will this still work?

Some pictures would help to understand better the problems  ::)
About your first block of questions, everything seems ok to me. The bridge deck must be at z=0, and because of this, everything that goes under the deck will be in the z negative range. This is ok. And will work ok. All the released custom bridges are designed this way.

About your second question, I dont understand it enough to be able to answer...a pic would help  ;)
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


FromTheAshes

Of course you can. GMAX is more like "a little brother" of the Max. So everything you can do in GMAX is possible in 3ds Max as well. (And more.) You can even use the BAT for 3ds Max, but I dunno if theres allready a script for version 9...
Visit Vorsfelde.

callagrafx

The BAT4Max script works perfectly in v9 except for the nightlighting (texture style) but who on earth uses those these days?  The simplest way in Max9 to get nightlit windows is by using the exclude function of a target spot.
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it

Biwdc

#19
Thanks guys:
This is great i have been waiting for this info to be releasted,now i can finally
work more with my bridges.i will be checking back on this for the additions to
it.
Check out my sc4 site here:http://www.freewebs.com/biwdc/