Author Topic: Alpha Texture Issues On Track Scenery  (Read 403 times)

Dalags

  • Posts: 10
Hi all,
I'm having a few strange problems with alpha channeled textures not displaying correctly on my track, as shown in this video:
https://www.youtube.com/watch?v=ngOwQp-dZEs

1.
Objects with alpha channelled textures that are furthest away are showing infront of objects that are nearest. The crowd texture showing through itself is pretty weird too.
In a game called NASCAR Heat, when using alpha channelled textures on tracks we had to set numbered 'priorities' whilst converting them to the ingame texture format. This essentially gave them a numbered order in which to appear. Is there anything similar in Wreckfest?

2. (0:23 in video)
The order in which textures ares displayed seems to change on certain parts of the track!
I've tried moving the entire track incase objects in a certain set of coordinates were causing problems, but this made no difference. I've tried moving Objects backwards and forwards incase there was some Z-axis clashing causing this, but this made no difference.

3. (1:00 in video)
When the camera is on the spectator side of the catchfence, the cars on track are showing before the catchfence texture.


Additional info:
I'm using 3ds Max 2016 and Adobe Photoshop CC with the provided BugBear exporting tools provided. The .tga's are 32bit and have RGB, Red, Green, Blue, and Alpha 1 channels.
The .tga and .bmap textures with alpha channels have the _c5 suffix, catchf_c5.tga/.bmap, crowd_c5.tga/.bmap, fence_c5.tga/bmap etc.
I've tried adding a "decal_" prefix to the texture names, i.e decal_catchf_c5.tga, like the skidmarks in the exampletrack, but this made no difference.

In the material editor, the material for the object with the alpha channel has the #decal suffix, catchf#decal, crowd#decal, fence#decal etc.
I've put the .tga texture in the diffuse and opacity slots on each object, making sure the padlock icon is selected. I've tried adding #decal to the object name too, but this made no difference.

I've tried only having the texture in either the diffuse or opacity slot, flipping normals, resetting the xforms, but none of these methods made any difference.

I'm sure it must be something really obvious I'm doing wrong or missing; any help would be massively appreciated!
Thanks,
Mark

findRED

  • *
  • Posts: 301
The first thing that comes to mind:

Are you running an AMD graphics card?
if so...
do you have msaa enabled ingame?

AMD graphics card running this game with msaa enabled causes stuff like this to happen.  It's a known issue.
The fix:  Disable all msaa.  (unfortunate, but you can still run fxaa)
Laptop:
i7 3630QM 4core 2.4GHz
GT 645M 2GB
6GB RAM


“I created a theme song for the door.” -Unknown Game Composer



MM2 Mods

sam223

  • *
  • Posts: 2717
Its something to do with the way they are setup. I have the same problem with a nvidia card



Have you tried using a .png with transparency and then packing with breckfest instead of .tga (+ alpha) and asset_builder?
Dell U2515H 25",  i5-4690k @4.0ghz, 8gb ram, Zotac GTX 960 4GB, 120gb SSD, 1tb HHD, win 7, G25/Ps3 pad
Online Bangers:Wreckfest - https://goo.gl/AjDHU2

RickyB

  • Posts: 557
This reminds me of a screenshot I made a long time ago ... probably the same issue?
1) The windows (glass) of the cars seem to be infront of the fence - and also the smoke / dust.
2) (...) When there's a car or something in focus-length behind the fence, the fence is focused as well. Otherwise it's blurred.


Compared to screenshots from Bugbears own tracks - made today ...



Notice the windows of the car - looks like they are in front of the fence. Fence has alpha channel, car window has alpha channel.. I guess.

I'm afraid this issue might be something that is caused by the Wreckfest graphic engine itself. So we may not be able to do anything about it. I really hope I'm wrong though.

Only solution I can think of - some 3D spectators without alpha channels or xref'ing Bugbears assets (grandstands, spectators etc.)

sam223

  • *
  • Posts: 2717
Its definitely possible to do it though.Bugbear do the same thing with their flat spectators except they rotate to view the camera. Maybe need to use a specific shader on them to get it to work?


 
Dell U2515H 25",  i5-4690k @4.0ghz, 8gb ram, Zotac GTX 960 4GB, 120gb SSD, 1tb HHD, win 7, G25/Ps3 pad
Online Bangers:Wreckfest - https://goo.gl/AjDHU2

RickyB

  • Posts: 557
True... also the 2D foliage seems to work as well. Hmm looking at a sitting spectator .scne file, the material does not even have the #decal tag but instead #billboard#noshadow. Shader Id 89 ? No idea what that is about.



Changing the texture of the spectators and exporting it with PS still works...


sam223

  • *
  • Posts: 2717
True... also the 2D foliage seems to work as well. Hmm looking at a sitting spectator .scne file, the material does not even have the #decal tag but instead #billboard#noshadow. Shader Id 89 ? No idea what that is about.



Changing the texture of the spectators and exporting it with PS still works...


Did you repack using alphas and official tools?
I suspect its something to do with shader id and #
Dell U2515H 25",  i5-4690k @4.0ghz, 8gb ram, Zotac GTX 960 4GB, 120gb SSD, 1tb HHD, win 7, G25/Ps3 pad
Online Bangers:Wreckfest - https://goo.gl/AjDHU2

RickyB

  • Posts: 557
Did you repack using alphas and official tools?
I suspect its something to do with shader id and #

Yes, made "new layer from transparency", because the .png that I get with breckfest does not have 'Alpha 1' channel, then I add that layer mask as "Alpha 1" channel and exported with official tool.

Dalags

  • Posts: 10
Thanks for the replies.

@findRed
I am on AMD, but MSAA was already disabled, I'm running on FXAA. Sounds like it's not an AMD issue though, going off Sams reply.

@RickyB
Alpha textures were used because the track was made for an older game with strict poly limits. I agree, using 3D spectators and geometry will be the best solution and is what I'll be doing.

@Sam223
Haven't tried Breckfest, but since it'll just reconvert the texture I doubt that'd solve it. You're right, I think there must be some shader or other paramater affecting this. Or maybe it's just an unfortunate quirk with the game engine.

I'm not very familiar with the game yet, but I looked at data/art/objects/prop_forest5_chainlink02.scne in BagEdit, and one of the models for the chainlink catchfencing has $p1 at the end. At the end of the track_modding.doc, it states that $ is a reserved character.
Do we know what the dollar $ or at @ symbols do yet? Or what the billboard shader is for? Perhaps they're clues.

sam223

  • *
  • Posts: 2717
The # suffix defines what shader or custom property is used so e.g when making cars the part of the mesh that works with interchangeable skins has #car_body at the end of the material name. Then the game knows to link that part of the model to car paint shader and use skin reference file.

It also has an effect on the model and theres loads of different ones like #nodeform #car_tire etc etc. I assume the one they are using on their spectators is the one you want. As it will then organise the objects by distance from player cam,with whatever is closest to the cam being in the foreground. They'll probably also rotate to face the camera though like their flat spectators.

Maybe their mesh fences will give some clues aswell.

Maybe alpha channel is also automatically setup back to front,background first before foreground and $p1 means priority 1?

Ill try and get Janne to reply if possible
« Last Edit: August 14, 2017, 09:22:59 PM by sam223 »
Dell U2515H 25",  i5-4690k @4.0ghz, 8gb ram, Zotac GTX 960 4GB, 120gb SSD, 1tb HHD, win 7, G25/Ps3 pad
Online Bangers:Wreckfest - https://goo.gl/AjDHU2

RickyB

  • Posts: 557
As far as I "know" the $ character is for destructible objects - the parts that will show when object gets hit and gets destroyed.
The attached picture shows a box in bagedit that will fall into 9 different pieces when hit.

Mazay

  • Posts: 426
I don't really know what's wrong, but I have couple of wild quesses what to try.

Probably the shader id is wrong. Does the material have _n.tga and _s.tga textures? Just loading the 1 pixel templates from textures folder can change shader to one that maybe works better at times.

Does 1 bit and alpha transparency make difference in how it's rendered? Atleast the buggy windows have alpha transparency so maybe switching to 1 bit could do something. Tree branches etc. have 1bit. I am not 100% sure how to change, but maybe saving as _c1.tga before .bmap conversion does it.
« Last Edit: August 15, 2017, 01:33:03 PM by Mazay »