Updates for old assets and modifications

dougtrain

Signalling Engineer
Hi all. I could do with a bit of help to fix some assets if anyone can spare a minute or two please.

Having moved all my assets from TS12 to Tane I am finding that some engines are not working as they should. All diesel and class 31 / 33 / and 29. They are on the DLS as TMZ 06003 who had updated them at some point. I have been able to sort out the class 31 and 33 so that Tane is happy with them but the class 29 is causing me a problem.

Again, the 29 tidies up to a Tane standard but the windows / glass will not function properly. It is fine in his 31 and 33 assets but the 29 shows "frosted" glass for want of a better description. I have compared the configs and they are the same/similar so it must be down to interpretation in IM file. Or have I missed something?

Would appreciate any feedback on this.

Regards
Doug
 
Again, the 29 tidies up to a Tane standard but the windows / glass will not function properly. It is fine in his 31 and 33 assets but the 29 shows "frosted" glass for want of a better description. I have compared the configs and they are the same/similar so it must be down to interpretation in IM file. Or have I missed something?

The problem is most likely in the images themselves. If the texture.txt file for the window image includes an 'Alpha=...' line then you need to adjust the opacity of the alpha channel in the image file. If the image file doesn't have an alpha channel, then add one and make it mostly transparent.

However the problem might also be in differences in the way that T:ANE handles opacity for certain texture types.
 
Thanks SailorDan. The windows on a 33 are fine. If I copy the glass files into the 29 they do not work. Both engines are by the same person and the configs are very close/similar. So I am using a set of images that work in one engine but not the other. There is an alpha inclusion. I will just have to fiddle with the images. This is all very odd. I agree with you that there is a Tane issue as the windows worked in TS12.

Doug
 
This is all very odd. I agree with you that there is a Tane issue as the windows worked in TS12.

Check the texture type in the two meshes - the T:ANE issue is related to certain texture types.
I presume you have checked that the texture.txt files in the problem asset include the 'Alpha=...' entry in addition to confirming that the the alpha channel is in the image.
 
I've had a look here, I would say the problem was more of a misted up Window than frosted.
OK got it open grey opaque.texture.txt and edit to read as follows:
Opacity looks to have been done at mesh level.
Code:
Primary=grey opaque.tga
Alpha=grey opaque.tga
Tile=st
Then do exactly the same for the interior / Cab <kuid2:218467:50069:1> NBL type 4 cab

Not perfect but to me a looks a lot better.
 
I have copied the file contents so you can have a look. All the images with these are TGA. One question though - I read in the wiki that the Alpha should be a BMP? is that correct?

glass-black.texture plus tga of the same name

Primary=glass-black.tga
Alpha=glass-black.tga
AlphaHint=semitransparent

---------------------------------------


grey opaque.texture plus tga of the same name

Primary=grey opaque.tga
Tile=st

----------------------------------------

grey opaque-grey opaque.texture no image

Primary=grey opaque.tga
Alpha=grey opaque.tga
Tile=st
AlphaHint=semitransparent

------------------------------------------

window.texture plus tga of the same name

Primary=window.tga
Alpha=window.tga
AlphaHint=semitransparent


These are the included files relating to anything glass. I DID find two typos where grey=Grey and window= windows so there may be other issues.

Doug
 
Thanks Malc

Too late tonight for me to have a go so I will try it out in the morning.

Regards
Doug

UPDATE................
You know how it goes with Trainz guys and I just HAD to do the check. I had spent enough time on this so what is another 10 minutes?
The good news is that it worked Malc and I thank you and SailorDan for replying and your input......Appreciated

Regards
Doug
 
Last edited:
Yes it's a bit confusing in that folder, the Window TGA is for the square side Windows 1 either side to rear of the door, glass TGA is for the number thingy on the ends.

AlphaHint I think defaults to semitransparent if it's missing.
 
You know how it goes with Trainz guys and I just HAD to do the check. I had spent enough time on this so what is another 10 minutes?
The good news is that it worked Malc and I thank you and SailorDan for replying and your input......Appreciated

I had a look at <kuid2:218467:50069:1> and it requires two fixes, but it's not clear which you have already done. You should be able to get exactly the effect you need.

The texture,txt file (grey opaque.texture.txt) requires an Alpha=... entry. For an old asset this might have been the BMP that contained the alpha information as a grayscale. For this version it should be the TGA file (grey opaque.tga). BUT that image file does not have a alpha channel - it's 24 bit.


So the two fixes are are:

1. Add 'Alpha=grey opaque.tga' to the texture.txt file.
2. Edit 'grey opaque.tga' to include an alpha channel that is mostly transparent. Exactly how you do that depends on your image editor, but the process would probably be to load the image, set the transparency level across the whole image, and then save as 32-bit. Saving as 32-bit is what forces the transparency you just applied to be included in the image file. If you edited transparency in the editor, then the default for saving should become 32-bit, but that doesn't always happen. If the transparency is in the file then AssetX reports the file as 32-bit, and displays the transparency separately from the opaque portion.

Do not set other transparency options in the texture.txt file - transparency should be done through the image file and the Alpha tag.
 
Back
Top