• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Transit texture questions

Started by Magneto, June 13, 2013, 12:44:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Magneto

Hi,

I'm working on a mod that changes sidewalk textures for the NAM components, and I have several questions:

1. What are those textures used for?



2. The Tram-In-Road pieces displayed on picture below uses roads exits that retain concrete textures that are not affected by a sidewalk mod. Does those pieces are using another texture as a background?



Which leads to question 3: is there a texture index/database with references?

Thanks.



Indiana Joe

I'm not positive about those four textures there, but I think some of them might be connected to seaports or ferry docks or something.  Just a hunch.

Second, I can't imagine why you're getting that weird texture under that tram piece.  Mine looks normal, like this:



Do you have some tram mod installed or something?

Lastly, I wish there was some master texture database, but there is not.  There are just too many of them and no one has made one.

memo

#2
I am quite confident that (1) is used in preview models only. Though, I am not sure if it is in use anywhere anymore as the original NAM viaducts have been replaced.

(2) might indeed make use of another texture. The white sidewalks are probably baked into the textures whereas the grey textures could be a reference to a texture which is replaced by a sidewalk mod. This would be very clever, and it is what I would aim for because it is easy to replace the sidewalks then.

As for (3), the only database I know of is Maarten's Road Texture Database.


Edit: The best way to find out about the references is to open the corresponding s3d-files in reader, actually.

Magneto

Thanks for your replies guys.

Indiana: Yes I'm using a mod, hence the weird textures

Memo: Do you mean to look under the mats tab of models for the references? For one I get 0x00001204 which is normal, for the other I get 0x00000A0E which I don't know of; it should be 0x0004B04 instead...

So far the only workaround I've found to block the concrete is to put sidewalks on the aforementioned textures IDs, the caveat is that the sidewalks are appearing when the texture is used in unzoned areas.

memo

Quote from: Magneto on June 13, 2013, 05:25:04 PM
Memo: Do you mean to look under the mats tab of models for the references? For one I get 0x00001204 which is normal, for the other I get 0x00000A0E which I don't know of; it should be 0x0004B04 instead...

Yes. 0x0A0E is the texture for diagonal road. The "E" indicates that it was darkened for the use on s3d-models (to overcome the difference in colour between s3d-models and non-s3d-textures). The default version of this texture is 0x0A04 (minus 10).

Quote
So far the only workaround I've found to block the concrete is to put sidewalks on the aforementioned textures IDs, the caveat is that the sidewalks are appearing when the texture is used in unzoned areas.

I cannot answer this right now without having a look at the s3d-file.

Magneto

Quote from: memo on June 13, 2013, 11:41:31 PM
Yes. 0x0A0E is the texture for diagonal road. The "E" indicates that it was darkened for the use on s3d-models
Quote

Thanks Memo, you answered question #4 before I ask it :D

Here the IIDs.

0x584891F0 & 0x584893F0 are using texture 1204, which is also referenced in the following models:
-0x58489000
-0x58489300

0x584895F0 is using texture 4d04, which is also referenced in:
-0x58489400
-0x58489700

Swordmaster

Here's a tutorial that may help you getting a good overview of all textures. I have a private database with all NAM textures, maybe I should find a way to upload that.


Cheers
Willy

memo

#7
Quote from: Magneto on June 14, 2013, 04:58:00 AM
Thanks Memo, you answered question #4 before I ask it :D

Here the IIDs.

0x584891F0 & 0x584893F0 are using texture 1204, which is also referenced in the following models:
-0x58489000
-0x58489300

0x584895F0 is using texture 4d04, which is also referenced in:
-0x58489400
-0x58489700

Okay, here is what I found. 0x584891F0 & 0x584893F0 & 0x584895F0 are preview models and don't necessarily need to be updated. If you look at the MatsTab of 0x58489000 (or one of the examples), you will notice that the "alpha test" flag is not set, which means that the alpha map of the FSH will not be applied, which means no transparency despite the alpha channel. Thus, it is possible to display the sidewalks, located below the transparency.

There are several ways to procede:

• You replace the textures 0x1200 - 0x1204 by your aforementioned replacement texture, plus you have to add the alpha channel. The transparent parts of the image need to be replaced. A problem with this is that it would not work with other road texturing mods, or you would need such a replacement texture for every such mod.

• You modify the models: Add a second Anim section which must reference material 1, add material 1 to the MatsTab, copying the IID and all the settings of material 0, but set the "alpha test" flag. Then change material 0 to 0x532638fa - 0x532638fe, for example (depending on zoom level), or a different fitting sidewalk texture. This modification should best be included into the NAM, so that other sidewalk mods can profit from this, too.

• In this particular case, changing the puzzle piece RULs of these pieces might work, so that those tiles are no longer used. I might try this out. Edit: This does not work.


Excuse me for having misunderstood point (2), previously.

vortext

Wait. . Memo are you saying in theory it's possible to have GLR puzzle pieces with transparency which allow custom sidewalks, instead of having the sidewalk baked into?  ???
time flies like a bird
fruit flies like a banana

memo

#9
No, if you want sidewalks like on draggable FAR, for instance, I have to disappoint you. (In a very limited manner, it does actually work. The only puzzle pieces I know of that make use of this are the 15m road onslope pieces.)

What I was suggesting is to seperate the sidewalk texture from the road texture in the s3d-model. The sidewalks will still be baked into the puzzle piece, but not into the road texture. This makes it much easier to replace the sidewalks because all the model files can reference the same sidewalk texture. The model file effectively references two different textures: sidewalk and road.

Though, currently, the only puzzle pieces that make use of this technique I am aware of are the El-Rail-over-Road puzzle pieces.

vortext

#10
Quote from: memo on June 15, 2013, 11:07:23 AM
This makes it much easier to replace the sidewalks because all the model files can reference the same sidewalk texture.

And could this sidewalk texture be replaced ingame without changing the s3d-model, i.e. with a simple texture override? Still not clear to me.  &Thk/(

Sorry for the hijack Magneto.
time flies like a bird
fruit flies like a banana

memo

Yes, you can simply replace the sidewalk FSH file in your plugins. ;)

vortext

#12
Quote from: memo on June 15, 2013, 11:44:53 AM
Yes, you can simply replace the sidewalk FSH file in your plugins. ;)

Indeed so I noticed!   :D



Now I'm guessing the same technique could be applied to GLR as well?  ::)
time flies like a bird
fruit flies like a banana

memo

It does not work for the draggable sets 1 and 2 because they are not model-based, but it does for sets 3 and 4. Regarding the GLR puzzle pieces, I am sure it presently doesn't work for GLR-in-Avenue either (my fault ::)), because the models are not set up like this.

Magneto

Quote from: Swordmaster on June 14, 2013, 07:37:08 AM
I have a private database with all NAM textures, maybe I should find a way to upload that.

Definitely. If you decide to make it public, we could add references and classification to form a decent texture database.

Memo: No need to apologize, it's me that have trouble to explain things clearly ;)
And thank you again for the instructions; I couldn't make it this far without your help.

So I went to modify the models, but I probably fumbled somewhere:



Any advice? No idea what I did wrong.

Vortext: No problem. The answers to your questions interest me as well ;)


vortext

Quote from: Magneto on June 15, 2013, 02:45:10 PM
Vortext: No problem. The answers to your questions interest me as well ;)

In that case. . ::)



While it'd take a while implement I can see the advantages to it. Could draggable GLR be converted to a model-based network, similar to RRW?

Too bad about the avenues, though the t21s behave weird too so I guess they'll just be the odd one out.


time flies like a bird
fruit flies like a banana

memo

Magneto: In the Anim section, the second entry has to reference material 1 instead of 0. Presently, both entries reference material 0 which is the sidewalk texture.

Quote from: vortext on June 15, 2013, 03:00:49 PM
While it'd take a while implement I can see the advantages to it. Could draggable GLR be converted to a model-based network, similar to RRW?

Certainly, it could. However, there are particular issues with that. Namely, as can be seen with the implementation of the alternate GLR sets, the placement of the El-Rail supports would have to be changed to a T21-based setup, which in some cases results in undesired pylon configurations. If you have the alternate GLR sets in your plugins, you may experience the drawbacks of this T21-based setup.

That said, I think that converting the urban GLR style to a model-based network would be quite easy, as you can copy everything from one of the alternate sets. Alternatively, you could simply replace one of the alternate GLR styles by your custom sidewalk texture. This would be the easiest way.

As for rural GLR, I don't see any advantage of converting it to a model-based network.

Magneto

So I naively thought that changing the name would do the trick for the referencing... Yeah right  ;D
Tried to change the values in the Flagsd column (0x0 to 0x1), no luck.

How do you do that?

vortext

Expand the group and change the reference in the Mat Block column from 0x00 to 0x01. Or at least that seemed to work for me.  :D
time flies like a bird
fruit flies like a banana

Magneto

Works for me too  ;)

Thanks everyone!