SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => General Custom Content Discussion => Topic started by: Magneto on June 13, 2013, 12:44:11 PM

Title: Transit texture questions
Post by: Magneto on June 13, 2013, 12:44:11 PM
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?

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimageshack.us%2Fa%2Fimg713%2F4641%2F0x503ea705.png&hash=f6f9c7cf0f597cad3d61cd7085a06e589dcf7f8d)

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?

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg694.imageshack.us%2Fimg694%2F6025%2F0tte.jpg&hash=44b7bc0b1762367f384c3a22577d291684ae4cff)

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

Thanks.


Title: Re: Transit texture questions
Post by: Indiana Joe on June 13, 2013, 01:12:00 PM
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:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg94.imageshack.us%2Fimg94%2F6691%2F7ab50e441abe787d5848920.png&hash=24976e8ac5672db02a99a6fd508c0fbb39b7b65f)

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.
Title: Re: Transit texture questions
Post by: memo on June 13, 2013, 01:30:47 PM
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 (http://community.simtropolis.com/topic/53270-rrt-team-road-re-texture-team-initiative-and-project-plans-looking-for-participants/?p=1360146).


Edit: The best way to find out about the references is to open the corresponding s3d-files in reader, actually.
Title: Re: Transit texture questions
Post by: Magneto on June 13, 2013, 05:25:04 PM
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.
Title: Re: Transit texture questions
Post by: memo on June 13, 2013, 11:41:31 PM
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.
Title: Re: Transit texture questions
Post by: Magneto on June 14, 2013, 04:58:00 AM
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
Title: Re: Transit texture questions
Post by: Swordmaster on June 14, 2013, 07:37:08 AM
Here (http://sc4devotion.com/forums/index.php?topic=15441.0)'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
Title: Re: Transit texture questions
Post by: memo on June 14, 2013, 10:35:16 AM
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.
Title: Re: Transit texture questions
Post by: vortext on June 15, 2013, 10:40:13 AM
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?  ???
Title: Re: Transit texture questions
Post by: memo on June 15, 2013, 11:07:23 AM
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.
Title: Re: Transit texture questions
Post by: vortext on June 15, 2013, 11:19:28 AM
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.
Title: Re: Transit texture questions
Post by: memo on June 15, 2013, 11:44:53 AM
Yes, you can simply replace the sidewalk FSH file in your plugins. ;)
Title: Re: Transit texture questions
Post by: vortext on June 15, 2013, 11:49:03 AM
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

(https://dl.dropbox.com/s/no135idt9sze1t4/sidewalk%20elroad.jpg)

Now I'm guessing the same technique could be applied to GLR as well?  ::)
Title: Re: Transit texture questions
Post by: memo on June 15, 2013, 11:55:36 AM
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.
Title: Re: Transit texture questions
Post by: Magneto on June 15, 2013, 02:45:10 PM
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:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg703.imageshack.us%2Fimg703%2F3576%2Fcwon.jpg&hash=cef1f8eb15e8af0e6dd0c97ac6f29b4d879d00aa)

Any advice? No idea what I did wrong.

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

Title: Re: Transit texture questions
Post by: vortext on June 15, 2013, 03:00:49 PM
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. . ::)

(https://dl.dropbox.com/s/51i81o0k0fk7zhq/sidewalk%20glr.jpg)

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.


Title: Re: Transit texture questions
Post by: memo on June 15, 2013, 11:18:51 PM
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.
Title: Re: Transit texture questions
Post by: Magneto on June 16, 2013, 06:03:16 AM
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?
Title: Re: Transit texture questions
Post by: vortext on June 16, 2013, 06:14:05 AM
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
Title: Re: Transit texture questions
Post by: Magneto on June 16, 2013, 06:36:08 AM
Works for me too  ;)

Thanks everyone!
Title: Re: Transit texture questions
Post by: vortext on June 16, 2013, 07:12:10 AM
Hm, it actually does seem to work for avenue too except the flipped/mirrored tile doesn't want to play along. Or is that precisely because of the faulty model?

(https://dl.dropbox.com/s/dmz4e7go8q31a68/sidewalk%20avenue.jpg)
It's a glr-in-avenue piece, just reused glr-in-street texture because quick&dirty.
Title: Re: Transit texture questions
Post by: memo on June 16, 2013, 08:12:08 AM
It can of course be applied to any puzzle piece, if you edit the models accordingly. What I said may have been unclear: Replacing the sidewalk texture of TIA does not work this way, currently, because the models are not designed like this - however, it is very well possible to adapt the models this way, but as you may have guessed, it would be a certain amount of work. ;)

Regarding your problem, the order of the materials does matter. Does the second Anim entry refer to the GLR material which is supposed to be displayed on top?
Title: Re: Transit texture questions
Post by: Magneto on June 16, 2013, 08:47:54 AM
I found 2 pieces of the elevated rail over road that are probably using wrong references.

The elevated rail over straight road - no pylon uses texture 0X53263804, while the version with pylons uses 4B0E - I see no reason those 2 pieces are using different textures, but maybe I missed something. Anyway minor annoyance, as both have colour compensation.

Now the case of the T street intersection is more annoying: it uses texture 0x00aa0804, which is obviously wrong. But I don't see any trace of that ID anywhere in the models.










Title: Re: Transit texture questions
Post by: vortext on June 16, 2013, 09:06:58 AM
Quote from: memo on June 16, 2013, 08:12:08 AM
It can of course be applied to any puzzle piece, if you edit the models accordingly. What I said may have been unclear: Replacing the sidewalk texture of TIA does not work this way, currently, because the models are not designed like this

Ah yes, I understood TIA models were intrinsically not designed properly. 

Quote from: memo on June 16, 2013, 08:12:08 AM
Regarding your problem, the order of the materials does matter. Does the second Anim entry refer to the GLR material which is supposed to be displayed on top?

Turned out to be incorrect mat alpha settings, works like a charm now.

Right, pondering the options this quite literary seems to be a game changer - or maybe that's just me. Because for some time now I've been contemplating a GLR retexture and sidewalks proved to be a headache. Both in terms of aesthetics which were being forced upon the user and the actual texturing. This was of course under the assumption sidewalk & surface had to be baked into one and the same texture. Separating the two of them in the s3d model opens up the prospect of custom sidewalk mods for GLR. I mean it's almost too tempting not to pursue. Granted the sidewalk is not wealth dependent and it would require some work indeed. Then again, it seems I have a knack picking extensive projects. .
Title: Re: Transit texture questions
Post by: memo on June 16, 2013, 01:44:22 PM
Quote from: Magneto on June 16, 2013, 08:47:54 AM
The elevated rail over straight road - no pylon uses texture 0X53263804, while the version with pylons uses 4B0E - I see no reason those 2 pieces are using different textures, but maybe I missed something. Anyway minor annoyance, as both have colour compensation.

Are you sure about this? They both seem to use 0x53263804 on my end. When those puzzle pieces came into existence, the texture 0x4B0E did not exist yet, but generally I would advice to use 0x4B0E nowadays.

Quote
Now the case of the T street intersection is more annoying: it uses texture 0x00aa0804, which is obviously wrong. But I don't see any trace of that ID anywhere in the models.

Except for the fact that 0x00aa0804 is not colour-corrected, I can't seem to find anything wrong with it.


Vortext, this info seems to have reached you exactly at the right time, then. ;) I would so much appreciate your work.
Title: Re: Transit texture questions
Post by: MandelSoft on June 16, 2013, 03:17:26 PM
Why stop there with the GLR! I think the TuLEPs would also benefit from this treatment ;)
Title: Re: Transit texture questions
Post by: Magneto on June 18, 2013, 11:40:15 AM
Quote from: memo on June 16, 2013, 01:44:22 PM
Are you sure about this? They both seem to use 0x53263804 on my end. When those puzzle pieces came into existence, the texture 0x4B0E did not exist yet, but generally I would advice to use 0x4B0E nowadays.

Yes. I used watermarked textures.

Quote
Except for the fact that 0x00aa0804 is not colour-corrected, I can't seem to find anything wrong with it.

That's precisely my concern.

Anyway, it's me being picky for little details. Sorry to bother you with that.

Erik, if you need assistance to undertake your GLR conversion let me know, I'll help if I can. Be warned though, I know nothing about models  $%Grinno$%
Title: Re: Transit texture questions
Post by: memo on June 19, 2013, 09:57:04 AM
Quote from: Magneto on June 18, 2013, 11:40:15 AM
Quote from: memo on June 16, 2013, 01:44:22 PM
Are you sure about this? They both seem to use 0x53263804 on my end. When those puzzle pieces came into existence, the texture 0x4B0E did not exist yet, but generally I would advice to use 0x4B0E nowadays.

Yes. I used watermarked textures.

And so did I now, but still I cannot confirm your observation.

Edit: Do you use the alternate El-Rail style? If so, I don't know anything about it. Anyway, the difference in IDs should not matter because the two different textures should look identical.

Quote
Quote
Except for the fact that 0x00aa0804 is not colour-corrected, I can't seem to find anything wrong with it.

That's precisely my concern.

Anyway, it's me being picky for little details. Sorry to bother you with that.

You are not bothering me. ;) I know there are various puzzle pieces that use brighter textures, but RL asphalt does not have consistent colours either. I always aim for colour-correction when implementing new puzzle pieces, but revising all the existing puzzle pieces is quite some work. I can offer GIMP-colour-correction curves for this, if you are interested.
Title: Re: Transit texture questions
Post by: Magneto on June 20, 2013, 11:33:11 AM
Oh yes I should have specified that I use the alternate implementation.

I found color calibration curves for the onslope pieces, is this what you refer to? Otherwise yes I'm interested  :)
Title: Re: Transit texture questions
Post by: memo on June 20, 2013, 12:14:29 PM
Exactly those. Two curves are contained for darkening non-model-based textures for the use on models and vice versa. ;)