texture issue on TSOs

  • You DO NOT need an account in order to download the content that we host....ONLY make an account if you plan to be an ACTIVE member.
  • We DO NOT Allow Multiple Accounts, those people found to have more than one linked to their IP address Will be Banned.

Anthony Stuart

Active Member
VIP
Hot Pass Member
Sep 7, 2016
114
63
I'm working on a track build, it's getting really close to being done, but I'm having one issue that's derailing the project: several TSOs with transparent textures are giving the sim (and Sandbox, but not 3dsimed) trouble trying to tell which face is in front of which. I've narrowed it down to a texture issue, as all of the problematic TSOs use 32 bit color (as opposed to 16 bit), and the grandstand shown has no problems during practice/testing/qualifying when it uses a 16 bit empty texture. Problem is, I've been unable to fix the problem by just changing the MIPs to 16 bit, anyone have any ideas?
3366f71623700b56779711375b23f157.png

67e4fc79c3f4390b4feaa9c286cbd4ce.jpg

c15c59d813654ae95e66bfccbf386b24.png
 

JNorton (WKC)

Well-Known Member
VIP
Hot Pass Member
Sep 28, 2016
736
93
If you're saving the mips with a filename.bmp file and a filename_ti.bmp file for transparency stop. Get rid of that _ti.bmp file and just set the pink area of your .bmp file as the transparent area. That filename_ti file is best used for fences, surface decals and other things like that..
 

Anthony Stuart

Active Member
VIP
Hot Pass Member
Sep 7, 2016
114
63
If you're saving the mips with a filename.bmp file and a filename_ti.bmp file for transparency stop. Get rid of that _ti.bmp file and just set the pink area of your .bmp file as the transparent area. That filename_ti file is best used for fences, surface decals and other things like that..
I had been using .tgas for the built in transparency support when I retextured them, but the grandstand and the lookout tower were copied directly from papyrus/PWF tracks without me ever opening the files, and they worked great on those tracks.... strangely though, when I copied them again, suddenly it fixed them. However, copying the original press box with the old NASCAR Racing Series texture didn't fix that the first time... so I copied it from a different copy of the original Dover and it suddenly worked great @.@
I don't understand computers sometimes lol, but the point is, two of the three TSOs are fixed, and for now I'm gonna settle for the old texture on the building, maybe I'll update the track later XD
 

JNorton (WKC)

Well-Known Member
VIP
Hot Pass Member
Sep 28, 2016
736
93
I had been using .tgas for the built in transparency support when I retextured them, but the grandstand and the lookout tower were copied directly from papyrus/PWF tracks without me ever opening the files, and they worked great on those tracks.... strangely though, when I copied them again, suddenly it fixed them. However, copying the original press box with the old NASCAR Racing Series texture didn't fix that the first time... so I copied it from a different copy of the original Dover and it suddenly worked great @.@
I don't understand computers sometimes lol, but the point is, two of the three TSOs are fixed, and for now I'm gonna settle for the old texture on the building, maybe I'll update the track later XD

Textures can do some strange things sometimes depending on what on a track with them. Resaved 3do files from 3DSimEd will also do some strange things. Walls on buildings will reverse, pieced will be missing. Etc, etc, etc,,,
 
  • Like
Reactions: MeandMe

Mystical

Always 110%
VIP
Member of the Year
Render Partner
Hot Pass Member
Moderator
Dec 21, 2017
1,504
93
Another issue with mips is you may not have set their priority correctly. If they have a low priority (0 or 1) then the Z axis will make them look like they are 'passing through' other 3do sections with different mips that are next to or on the same 3do objects. The reason is the mip with transparency has a priority of 1 just like every other mip so it doesn't know it should be rendering in front of the other mips. Once you set this higher than 1 (like a 2) then that mip will render in front always of any other mip that is set as a 1. General rule is just keep everything at a 1 unless it has a transparent section, then up the number until you see it render correctly in front of the objects that are just behind it.

Example in winmip2:
1652001635050.png

This same technique is used with every mod that has windows, The window mip is set to a higher priority so all the stuff in the interior isn't rendering in front of it. Same concept with trackside objects and mip priority.
 

MeandMe

Well-Known Member
Hot Pass Member
Jan 23, 2019
137
33
For transparency on TSOs, my issue is the pink fuzz (or the colour that’s supposed to be transparent) just ahead on objects and fences (disappears as you get closer). This could be due to me using a type 4 or 7 mip for transparency. I do not know how to use type 10 as shift+click creates a grey area when using that method. It's also seen in camera view; I do not think it's necessarily due to night mip explorer as it happens on my day tracks. I am using priority 4 because it’s sharper, and no _ti files.

I have image with arrows showing where they are:

Pink In The Distance - 01.jpg
Pink In The Distance - 02.jpg
This might be an issue me/you/others might come across so I put it here if you don't mind. :)

Any ideas on what might fix this?
 

Mystical

Always 110%
VIP
Member of the Year
Render Partner
Hot Pass Member
Moderator
Dec 21, 2017
1,504
93
Are these custom 3do's? What do they look like up close in winmip/your image editor?

Even though you have pointed out in the distance the pink I am seeing it appears in the 3do's up close as well if you look very carefully:

1652571349680.png

Another common mistake with transparent mips is when you select the pink to be transparent your texture cannot have any semi-transparent pixels or the pink will register very easily in sandbox/the game.

For example take this shape I have on a pink background, looks good right?
1652571461976.png

Well... not exactly becasue if we were to go into winmip2 and choose the pink as the transparent texture we would still get that 'halo' pink effect around our object. If we zoom in closely to the edge of our texture you will see the edges have many pixels that are semi-transparent:

1652571538696.png

Every pixel on your texture need to be fully opaque. There are several ways to make a texture in a paint program output full pixel opacity. In affinity photo (what quick method I use) it has a very easy tool to select different pixel opacity levels and isolate those for editing. In this case I need to remove/make the semi-transparent pixels fully opaque so I choose this option:
1652571713350.png

After I create a alpha layer of my texture that only includes the full pixel I just mask it to my texture and boom:
1652572205305.png

You can see here very up close no pixels have the pink 'bleed-through' which appears to be the issue your textures might be having. Now when I go back to winmip2 and select the pink both in sandbox and in-game I will no longer see any pink pixelation artifacts surrounding my 3do objects.
 
  • Love
Reactions: MeandMe

jacobc62

Well-Known Member
Hot Pass Member
Jun 25, 2017
565
93
Optionally, the method I have used in the past is to save the texture as a TGA with transparency. This allows for WinMip2 to automatically detect the transparent areas (as they are already transparent) without the need for worrying about the pink bleeding into the 3DOs model when rendered in Sandbox or NR2003.

I haven't personally seen any massive file size increase from using this method, either.
 
  • Like
Reactions: MeandMe

Mystical

Always 110%
VIP
Member of the Year
Render Partner
Hot Pass Member
Moderator
Dec 21, 2017
1,504
93
Yeah saving as TGA with embedded alpha is good. However, it does increase the file size quite a bit. So I only use embedded alpha channels for 3do's that had semi-transparent sections (think at a night track the light poles and fake light gradient that fades to black for example).
 
  • Like
Reactions: MeandMe

MeandMe

Well-Known Member
Hot Pass Member
Jan 23, 2019
137
33
Are these custom 3do's? What do they look like up close in winmip/your image editor?

Even though you have pointed out in the distance the pink I am seeing it appears in the 3do's up close as well if you look very carefully:

1652571349680.png


Another common mistake with transparent mips is when you select the pink to be transparent your texture cannot have any semi-transparent pixels or the pink will register very easily in sandbox/the game.

For example take this shape I have on a pink background, looks good right?
1652571461976.png


Well... not exactly becasue if we were to go into winmip2 and choose the pink as the transparent texture we would still get that 'halo' pink effect around our object. If we zoom in closely to the edge of our texture you will see the edges have many pixels that are semi-transparent:

1652571538696.png


Every pixel on your texture need to be fully opaque. There are several ways to make a texture in a paint program output full pixel opacity. In affinity photo (what quick method I use) it has a very easy tool to select different pixel opacity levels and isolate those for editing. In this case I need to remove/make the semi-transparent pixels fully opaque so I choose this option:
1652571713350.png


After I create a alpha layer of my texture that only includes the full pixel I just mask it to my texture and boom:
1652572205305.png


You can see here very up close no pixels have the pink 'bleed-through' which appears to be the issue your textures might be having. Now when I go back to winmip2 and select the pink both in sandbox and in-game I will no longer see any pink pixelation artifacts surrounding my 3do objects.
Thank you for this explanation, I will try to see if I can do that in GIMP or affinity photo. In addition, they are not custom 3dos, they are the sawmill trees from Action Packed Tracks. The 3do may not be the problem, the same happens with fences and barriers. I edited them to have snow on them in GIMP. What is different with the original is when you open up the files in WinMip2 you see that it uses Type 10, also has pink transparency.

Here are some images:

Original Settings

Original Sawmill Tree - 01.jpg

My Settings

My Sawmill Tree - 01.jpg

Note: Changing of Mapp setting does not change the issue.

I'll try your method and report back on it, I think most track makers use Type 10 and if they do shift+click they do not get grey in the background, with type 10. I don't think they all have silhouette _ti files either. Hopefully, with experimentation I will find out how that's done as well if needed.
 

MeandMe

Well-Known Member
Hot Pass Member
Jan 23, 2019
137
33
Optionally, the method I have used in the past is to save the texture as a TGA with transparency. This allows for WinMip2 to automatically detect the transparent areas (as they are already transparent) without the need for worrying about the pink bleeding into the 3DOs model when rendered in Sandbox or NR2003.

I haven't personally seen any massive file size increase from using this method, either.
It's TRUE, there is no colour bleeding. Before I (sort of) figured out pink transparency, I made an image transparent or got an PNG image (already transparent), then I turned that into a TGA in GIMP when exporting, after that I turned it into a MIP and it seems to work with these WinMip2 settings: priority 4 (sharper), Type 4 or 7 (for transparency), and shift+click the box in the corner.

Here are my settings:


PNG to TGA To Mip Issue - 01.jpg

Although my second favourite method, the only issue that put me off this is you only have one colour of transparency: black. If any of the images have this exact colour then it leaves areas in patches in the game. Winmip2 thinks it's supposed to be transparent.

Here is an image:

PNG to TGA To Mip Issue - 02.jpg

Therefore, if the image does not have this black colour then it works completely fine, although some PNG images turned into TGAs then Mips do not always work in WinMip2.

This method (PNG to TGA to MIP) sometimes says it's an invalid .mip file. I don't know why.

PNG to TGA To Mip Issue - 03.jpg

I stopped using it after there were some holes in my Jasper horizon on the parts of the same exact same black. Still a good method though.

I sometimes do transparency using online-image-editor.com I don't think this plays a factor though.

 

JNorton (WKC)

Well-Known Member
VIP
Hot Pass Member
Sep 28, 2016
736
93
It's TRUE, there is no colour bleeding. Before I (sort of) figured out pink transparency, I made an image transparent or got an PNG image (already transparent), then I turned that into a TGA in GIMP when exporting, after that I turned it into a MIP and it seems to work with these WinMip2 settings: priority 4 (sharper), Type 4 or 7 (for transparency), and shift+click the box in the corner.

Here are my settings:


You can tell winmip that any color is the transparent color.
 

JNorton (WKC)

Well-Known Member
VIP
Hot Pass Member
Sep 28, 2016
736
93
Thank you for this explanation, I will try to see if I can do that in GIMP or affinity photo. In addition, they are not custom 3dos, they are the sawmill trees from Action Packed Tracks. The 3do may not be the problem, the same happens with fences and barriers. I edited them to have snow on them in GIMP. What is different with the original is when you open up the files in WinMip2 you see that it uses Type 10, also has pink transparency.

Here are some images:

Original Settings

View attachment 131901

My Settings

View attachment 131902

Note: Changing of Mapp setting does not change the issue.

I'll try your method and report back on it, I think most track makers use Type 10 and if they do shift+click they do not get grey in the background, with type 10. I don't think they all have silhouette _ti files either. Hopefully, with experimentation I will find out how that's done as well if needed.

I never change the type unless it's a file with a filename_ti.mip. Then I change it to a 7. With all of the white dots in that second image it looks like there is a "filename"_ti.mip file. When in winmip just convert the original mip to a .bmp and it will give you the 2 files if there is a _ti.mip file. This is what a mip with a _ti.mip file should look like.. There should be NO pink. If there is pink then there shouldn't be a _ti.mip file. Generally a mip without the extra _ti.mip file will always be a Type 10 and pink set as transparent. I never use ,tga files, If you do continue to get that pink hue try using MipExp.exe to convert the .bmp file. I have noticed this issue on several .mip files with pink as the transparent color. MipExp.exe seems to convert .bmp files with the pink area back to a mip with better results. You can get MipExp.exe here. https://www.mediafire.com/file/1tlbk6wd17zf818/MipExp.7z/file




pine05.jpgpine05_ti.jpg
 
Last edited:

MeandMe

Well-Known Member
Hot Pass Member
Jan 23, 2019
137
33
I never change the type unless it's a file with a filename_ti.mip. Then I change it to a 7. With all of the white dots in that second image it looks like there is a "filename"_ti.mip file. When in winmip just convert the original mip to a .bmp and it will give you the 2 files if there is a _ti.mip file. This is what a mip with a _ti.mip file should look like.. There should be NO pink. If there is pink then there shouldn't be a _ti.mip file. Generally a mip without the extra _ti.mip file will always be a Type 10 and pink set as transparent. I never use ,tga files, If you do continue to get that pink hue try using MipExp.exe to convert the .bmp file. I have noticed this issue on several .mip files with pink as the transparent color. MipExp.exe seems to convert .bmp files with the pink area back to a mip with better results. You can get MipExp.exe here. https://www.mediafire.com/file/1tlbk6wd17zf818/MipExp.7z/file
Yes, pink does still shine through at other levels of priority. May need to do Mystical’s method first/May need to actually be type 10 (Common). I’ll try MipExp. Having used Night Mip Explorer, I actually forgot that it automatically detects typical transparent colours.

The white dots were me editing the image to look like it has snow NOT _ti interference. Below is a download of both files and the 3do. I will find out if the original image has a _ti file.

My Notes To Self: Unpack Mips In A Batch Conversion, sometimes undoing mips individually does not make the _ti appear.
 

Attachments

  • Redwood Tree Edit.7z
    1.7 MB · Views: 1

MeandMe

Well-Known Member
Hot Pass Member
Jan 23, 2019
137
33
What do they look like up close in winmip/your image editor?
Showing images both close up before I finally do your method. I don't think it was an issue semi-transparent pixels, there is none. Nevertheless, I'll do your method to see if it makes a difference. Previously I have tried to colour over these manually/ use the fuzz factor transparency at online-image-editor.com

Sawmill Trees Up Close - 01.jpg

For the trees, I did not do that because I just edited the image for snow there are no semi-transparent pixels up close. If someone could tell me how to do transparency with type 10 it would help a lot (thank you John Norton for MipExp). In addition, similar techniques are coming in my 2D horizon tutorial soon, the transparent bit, which will be improved even more as I figure this out.

After doing yet another test holding down shift then click on type 10 it still just creates a grey area. Therefore, I might try John Norton's _ti silhouette method/MipExp method.

For now, it's come down to not worrying about priority levels (sharper images) because Mip Explorer/Night Mip Explorer does not have any, and using that for the objects where there is this transparency issue with WinMip and then later using _ti silhouette method when I work out how that's done which CAN have priority. I may not use the PNG to TGA to MIP method due to time wasted when some files are not valid tga files and other not.

Thank you Stunod Community for helping me potentially make my tracks better, and possibly helping other new track makers. :) I hope this has helped anyone wanting to do transparency properly, and will update later if there are new findings or other issues. :cool:
 
Last edited:

JNorton (WKC)

Well-Known Member
VIP
Hot Pass Member
Sep 28, 2016
736
93
You changed all of the attributes for your tree.. The original is a 10, 3, and 1

Yours is at 4, 0, and 4.. It should be at 10, 3, and 1... Try it.. I did and it looks normal now to me..

2022-05-16-11-31-07.jpg
 
  • Like
Reactions: MeandMe

Hot Links