• Welcome to SC4 Devotion Forum Archives.

Starting a new set for NAM and need some directions...

Started by nathkel, March 01, 2012, 07:59:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nathkel

I was going to make a request for certain NAM pieces, but decided to try and construct them myself instead of waiting for someone else to create them. But when i began studying what it would take to assemble them, i then decided to try something simpler --- actually ANOTHER request i was going to make.
But i still need some reference help on assembling NAM puzzle pieces. I have read mrtnlrn's tutorial on doing just that and found a few important details missing.
So i was wondering if anyone had any links or advice that would help get me started. I want to abide by NAM's standard dimensions and texturing, and need more info on the RUL structure.

Here is what i intend to work on:

Some of the important pieces missing in the game as well as NAM are the roads that merge into other roads that are in the middle of a curve. For this project (which will be an extension of the NAM), i'm calling these Tangential Curves (or TCs) and want to make it easier to merge lanes into curving roadways.
I'm hoping these would be fairly easy to construct and have drawn up some of the CellLayouts and ConsLayouts for such curves. I am not sure however about CheckTypes. Are the numbers in the CheckTypes H3IDs of existing tiles, and if so, how do i find an H3ID of the tile that will be part of a curve? I will have to create a few new FSHs but i noticed many of NAM's curves were S3D files instead. Is this necessary?
I especially need to learn about the syntax of the CheckType lines, like the words "check" and "optional." I'm not sure also about some of the symbols used in the ConsLayout data; it's not completely covered in the tutorial.

I'm currently creating the graphics for these, pasting the images from the Maxis and NAM FSHs. But i'm finding there is some inconsistency in the coloring. Is there a download for all the current NAM and NWM texture graphics from which i can draw the standard widths and coloring? (I'm looking specifically for the single lane ortho/diag textures, as well as the 2-lane roads and 2-lane one-ways.) I trieed extracting textures with SC4Tool but wasn't sure which textures would be appropriate for the NAM/NWM...

Any knowledge or links would be greatly appreciated and i would love to be able to contribute to the most essential mod for SC4 -- the NAM project. I just need all the knowledge i can get to bring something nice to the table...

MandelSoft

Quote from: nathkel on March 01, 2012, 07:59:32 AM
I'm hoping these would be fairly easy to construct and have drawn up some of the CellLayouts and ConsLayouts for such curves. I am not sure however about CheckTypes. Are the numbers in the CheckTypes H3IDs of existing tiles, and if so, how do i find an H3ID of the tile that will be part of a curve?
No, the numbers in the check types are about the layout with two numbers for each wind direction, starting with North. Unfortunately, I lost the original document that did explain this in detail (but in dutch) due to a hard drive wipe. Maybe another NAM member can help you out here...

Quote from: nathkel on March 01, 2012, 07:59:32 AM
I will have to create a few new FSHs but i noticed many of NAM's curves were S3D files instead. Is this necessary?
Yes, this is necessary. All puzzle pieces are models, but most of them are just flat S3D models.

Quote from: nathkel on March 01, 2012, 07:59:32 AM
I especially need to learn about the syntax of the CheckType lines, like the words "check" and "optional." I'm not sure also about some of the symbols used in the ConsLayout data; it's not completely covered in the tutorial.

Nope. Still haven't figured out what these to exactly...

Quote from: nathkel on March 01, 2012, 07:59:32 AM
I'm currently creating the graphics for these, pasting the images from the Maxis and NAM FSHs. But i'm finding there is some inconsistency in the coloring. Is there a download for all the current NAM and NWM texture graphics from which i can draw the standard widths and coloring? (I'm looking specifically for the single lane ortho/diag textures, as well as the 2-lane roads and 2-lane one-ways.) I trieed extracting textures with SC4Tool but wasn't sure which textures would be appropriate for the NAM/NWM...

I believe there isn't a standard package, but I can explain the color shifts: puzzle piece darkening. if this isn't applied, textures on model based pieces would appear brighter than the textures from the draggable pieces.

Best,
Maarten
Lurk mode: ACTIVE

jondor

I can help a little now (and more later when I have time to go make sure I get my facts straight).  "check" and "optional"  mainly have to do with the auto place feature, although "optional" is useful for plopped puzzle pieces.  Both tell the game engine that those particular check type lines do not represent parts of the puzzle piece, but draggable network sections instead.  "check" tells the engine that the type flags MUST be present in order to plop the piece, "optional" tells the engine that they don't have to be, but that it must create them if they are not.  That's how regular draggable stubs are applied to pieces.  The third hex field is a mask so that only certain portions of the type flags apply to "check" or "optional".

I can explain more about the ConsLayout later.  Most of what is published about them applies to the vastly different (and ironically more flexible) Vanilla SC4 puzzle piece format, which is why a lot of it makes no sense.

Edit: There's actually some good info about the ConsLayout on the wiki, probably about as good as I could explain. -> http://www.wiki.sc4devotion.com/index.php?title=RUL_0x10000000
All new animated railroad crossing props for networks of all sizes! (Phase 1 complete)--> http://sc4devotion.com/forums/index.php?topic=13209

Mostly writing pony stories on FimFiction.net, but Cities: Skylines is my new best friend.  Anything and everything I made for SimCity 4 is fair game for use and distribution.

nathkel

Okay, that helps. The Wiki page is pretty thick with info, but no mention of "check" and "optional" so i'll hafta guess at the syntax rules based on what you wrote up for me.

Concerning the S3D files, i do have gmax but have not done anything with it because of the steep learning curve. Is there a tutorial on transferring the road textures to an S3D model?

Also, i'm finding that creating the puzzle pieces is difficult when there is a curve. It's easy enough to use existing images that contain the curves, but alot of times i have to create a new curve for the piece. Is there an easier way to draw the curved road textures using splines or something. I have GIMP and Photoshop 7.0 at my disposal.

I have also found a set of images in the NAM download, which puts it in an RHW folder. I can use these for the RHW TCs, but i must gather the regular Road/Street/Avenue textures from the vanilla file.

With enough information, i can feel confident enough to assemble these pieces for an addon into the NAM network. I'm hoping Tarkus will share some of the little tips on his constructions so i can go full board on this... :satisfied:

jdenm8

From the Wiki's IntersectionOrdering RUL article:
Quote"check" makes the building engine check if the given network tile is in this position. If so, it must correspond to the RULFlagByte portion that the HexMask defines.

"optional" tells the building engine to not look for a s3d file for this interchange. Rather, it looks for a network tile of that network which corresponds to the RULFlagByte, and uses that s3d or FSH. If a tile of this network is there, it must correspond to the portion of the RULFlagByte that the HexMask defines.

"HexMask" tells the check and optional conditions which sides of the tile to look at. FF deonotes that it must match, 00 denotes that it does not need to comply.

As for an S3D model: iLive's Reader is perfectly capable of doing the model editing for you unless you're doing fancy 3D work. All you need to do is set the Material Definition correctly (The default settings are not correct &sly ) and ensure the texture is properly wrapped. The Puzzle Piece maker is perfectly capable of creating the models with all of the correct settings for you (and it's what I use).

For creating the textures, I'm going to refer you to the gmax transit texture creation tutorial. It uses Splines and a Draft (I think that's what it uses) to wrap the textures around a 3D "box" to make smooth curves and the such. Final touch-up is usually done in Photoshop to fix small oddities or errors.


"We're making SimCity, not some dopey casual game." -Ocean Quigley

jondor

Quote from: jdenm8 on March 12, 2012, 01:07:18 AM
The Puzzle Piece maker is perfectly capable of creating the models with all of the correct settings for you (and it's what I use).

Only MOST of the correct settings as I recall, unless it's been updated and I never noticed.  Last I knew, it still used 'nearest' filtering instead of 'bilinear' and 'repeat' wrapping instead of 'clamp'.
All new animated railroad crossing props for networks of all sizes! (Phase 1 complete)--> http://sc4devotion.com/forums/index.php?topic=13209

Mostly writing pony stories on FimFiction.net, but Cities: Skylines is my new best friend.  Anything and everything I made for SimCity 4 is fair game for use and distribution.

jdenm8

Quote from: jondor on March 12, 2012, 02:53:48 AM
Quote from: jdenm8 on March 12, 2012, 01:07:18 AM
The Puzzle Piece maker is perfectly capable of creating the models with all of the correct settings for you (and it's what I use).

Only MOST of the correct settings as I recall, unless it's been updated and I never noticed.  Last I knew, it still used 'nearest' filtering instead of 'bilinear' and 'repeat' wrapping instead of 'clamp'.

It does too, I completely forgot about that. Though, I was more saying that the settings it uses does work, unlike Reader's default.


"We're making SimCity, not some dopey casual game." -Ocean Quigley

nathkel

Okay, i found some important docs on the NAM standards here, so if anyone else has any questions that file at the bottom of the page should be very helpful.
However, it does not include the default specs on the layouts for the road graphics (altho as stated previously, the graphics themselves can be found in the NAM dat files). But I think it would be a good idea for the NAM team to make available (and use) a standard set of textures for the various transit pieces that they (and any others who wish to create pieces for) can apply. This set would include straight pieces, basic transitions, and basic curves of various radii.
Currently i am constructing my own standard set, whose measurements are derived from the NAM textures, but do not look "worn" like the NAM's. They are instead much cleaner, but they keep the same width and colors so that new masks (for sidewalks, for example) don't hafta be created. Very unusual pieces are not part of my set, but here's what i have so far:

1x1 RHW2 - straight ortho
1x1 RHW2 - straight diag.
1x1 RHW2 - 90-deg. curve
2x2 RHW2 - 90-deg. curve
3x3 RHW2 - 90-deg. curve
4x4 RHW2 - 90-deg. curve
5x5 RHW2 - 90-deg. curve
2x3 RHW2 - 45-deg. curve

I'm using these to construct the RHW2 Tangential Curves, but when i begin on the RHW4s, i intend to create my own standard pieces to work with them.

jondor

It will actually be easier to do that after the release of Project57, at least in the case of the RHW.  The dimensions of some of the wider networks are changing slightly and I'm actually working on a model-based approach for the diagonals of all the networks so that they will utilize the ortho texture.

In fact, looking at your list, as of current standards you would only need three textures.  All the curves (aside from the 1x1) would be created as MORPH curves like so:



They are just two concentric circles of points mapped to the ortho texture such that the model itself bends the texture around the curve.  90 degree curves are easier because the circle's origin is a whole number.  45 degree curves take some trig to figure out, otherwise they will be misaligned.

After that, the real trick is splitting them up along the 16m SC4 grid.  Usually done with 3D modelling software.
All new animated railroad crossing props for networks of all sizes! (Phase 1 complete)--> http://sc4devotion.com/forums/index.php?topic=13209

Mostly writing pony stories on FimFiction.net, but Cities: Skylines is my new best friend.  Anything and everything I made for SimCity 4 is fair game for use and distribution.

nathkel

Wow a year later!...
Okay i'm sure i can do this, but i need to know which textures to use for morphing along the path. My first goal is to create puzzle pieces for the regular (non-RHW) network. I have found the textures database for NAM 31, but i have to sift thru alot of images, and i'm not sure if the ones i'm choosing have the correct road widths. A list if the correct index numbers in that database would be helpful...