• Welcome to PiBoSo Official Forum. Please login or sign up.
 
April 19, 2024, 07:20:22 AM

News:

GP Bikes beta21c available! :)


TrackEd crash and shader problems

Started by BerScott, April 19, 2014, 01:27:15 PM

Previous topic - Next topic

BerScott

I'm actually working on a track and I wanted to add it envmaps. At first time I thought that I was implementing them the wrong way, but seems that envmaps+bumpmaps make the TrackEd to crash.

Also I've noticed that some specular maps make some textures to look weird when them have an alpha channel assigned, causing the black alpha channel part to look not entirely transparent. Of course I've make sure to add black color to the RGB and alpha channels, but it still looks not entirely transparent, it shows a white silhouette.

PiBoSo

Quote from: BerScott on April 19, 2014, 01:27:15 PM
I'm actually working on a track and I wanted to add it envmaps. At first time I thought that I was implementing them the wrong way, but seems that envmaps+bumpmaps make the TrackEd to crash.

Also I've noticed that some specular maps make some textures to look weird when them have an alpha channel assigned, causing the black alpha channel part to look not entirely transparent. Of course I've make sure to add black color to the RGB and alpha channels, but it still looks not entirely transparent, it shows a white silhouette.

Specular is added on top of the surface, regardless of alpha.
This is why track modelers are encouraged to model everything possible in 3D, and use alpha channel only where really needed ( windows, foliage, ... ).
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

BerScott

I've finally solved it with the CK_ prefix. Anyway, about the bump+envmaps it would add lot of possibilities. Also I'm not sure if it is possible to use dynamic env mapping.

PiBoSo

Quote from: BerScott on April 19, 2014, 01:27:15 PM
I'm actually working on a track and I wanted to add it envmaps. At first time I thought that I was implementing them the wrong way, but seems that envmaps+bumpmaps make the TrackEd to crash.

Does it work in Map Viewer?
Could you please upload the MAP file that causes the crash?
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

BerScott

Yes, Map Viewer crashes too. But it only crashes when a bump map is added in the *.shd file. Env+Specular work without no problem.

Here is the map uploaded: http://www.mediafire.com/download/wus21nihcm25516/map_envmap_bump_fail.rar

BTW, I'm trying to tune the bump/specular maps for the asphalt shaders, but seems like the specular has no effect, instead of it is like a fresnel shader is working and the shineness doesn't change if I modify the specular texture. The shineness value seems to modify only the "fresnel" effect.

Not sure if it is helpful, but here is the Windows 7 report for the TrackEd:

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: tracked.exe
  Application Version: 0.0.0.0
  Application Timestamp: 532dfbdd
  Fault Module Name: nvoglv32.DLL
  Fault Module Version: 9.18.13.3523
  Fault Module Timestamp: 5315b3b9
  Exception Code: c0000005
  Exception Offset: 00c39ebe
  OS Version: 6.1.7601.2.1.0.256.48
  Locate ID: 3082
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


And for Map Viewer:

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: mapview.exe
  Application Version: 0.0.0.0
  Application Timestamp: 531124ba
  Fault Module Name: nvoglv32.DLL
  Fault Module Version: 9.18.13.3523
  Fault Module Timestamp: 5315b3b9
  Exception Code: c0000005
  Exception Offset: 00c39ebe
  OS Version: 6.1.7601.2.1.0.256.48
  Locate ID: 3082
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

PiBoSo

Quote from: BerScott on April 20, 2014, 07:49:29 PM
BTW, I'm trying to tune the bump/specular maps for the asphalt shaders, but seems like the specular has no effect, instead of it is like a fresnel shader is working and the shineness doesn't change if I modify the specular texture. The shineness value seems to modify only the "fresnel" effect.

If bump is used, the specular map is in the alpha channel of the normal map.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

BerScott

Good to know! So what does specular map reference in the shd file then?

PiBoSo

Quote from: BerScott on April 20, 2014, 08:07:57 PM
Good to know! So what does specular map reference in the shd file then?

It is used in case there is no normal map.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

PiBoSo

Quote from: BerScott on April 20, 2014, 07:49:29 PM
Yes, Map Viewer crashes too. But it only crashes when a bump map is added in the *.shd file. Env+Specular work without no problem.

Here is the map uploaded: http://www.mediafire.com/download/wus21nihcm25516/map_envmap_bump_fail.rar

Thank you.
Bug fixed.
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

BerScott

Thank you too :)

The tracks could look fantastic with water places with bump+envmaps and animated textures :D