Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PSSM glitch (see attached GIF) #361

Closed
ohlidalp opened this issue Aug 5, 2015 · 26 comments · Fixed by #2876
Closed

PSSM glitch (see attached GIF) #361

ohlidalp opened this issue Aug 5, 2015 · 26 comments · Fixed by #2876

Comments

@ohlidalp
Copy link
Member

ohlidalp commented Aug 5, 2015

This issue occurs on DirectX when vehicle uses a specular map. See this workaround.

pssm-glitch

RoR 0.4.5 test build 5
Map: auriga http://www.rigsofrods.com/threads/104845#post1183749
Vehicle: Gavril MZ2R http://www.rigsofrods.com/threads/74698
System spec: http://pastebin.com/n1xmWegF
RoR.cfg: http://pastebin.com/XgvxKRtu
RoR.log: http://pastebin.com/d17hjDU4

@Max98
Copy link
Member

Max98 commented Aug 5, 2015

08:59:39: Parsing script DepthShadowmap.material
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(387)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(390)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(435)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(439)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(473)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(476)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(535)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(539)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(387)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(390)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(435)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(439)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(473)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(476)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(535)
08:59:39: Compiler error: reference to a non existing object in DepthShadowmap.material(539)

There is no such file in test build 5. :/

@Max98
Copy link
Member

Max98 commented Aug 5, 2015

Can you try downloading test build 5 from the thread: http://www.rigsofrods.com/threads/119110-Test-Build-Rigs-of-rods-0-4-5-0-dev?p=1385090&viewfull=1#post1385090

And try again. If you updated an older test build using the updater, that might be the problem, because the updater does not check for old unused and conflicted files. I will work on that soon.

@ohlidalp
Copy link
Member Author

ohlidalp commented Aug 5, 2015

What I did:
0. Context: The PC had 0.4.0.7 installed.

  1. Downloaded TB5 (separate directory) and ran it (shadows disabled)
  2. Ran updater from TB5 directory, just to see if it also overwrites/updates RoR.cfg
  3. Enabled PSSM in RoRConfig and ran RoR. The above bug manifested.

I suppose the problem is this line in RoR.cfg:

Resources Path=d:\software\rigsof~1.7\resources\

This line comes from 0.4.0.7 installation.

I tried renaming the Documents/RoR04 to see how TB5 behaves without it.

  • RoR.exe: Crashes with error message "RoR.cfg not found"
  • ror-updater.exe: After selecting "Repair", aborts with message "Something bad happened"

It appears there is no way to execute TB5 right: without prior 0.4.0.7 installation, you don't launch at all, but with it, you start with invalid resources location.

@Max98
Copy link
Member

Max98 commented Aug 5, 2015

The updater still doesn't do anything to document files, that will be coming into the next version. Let's try something. Rename Documents/RoR04 back to it's original name, download only the updater (http://www.rigsofrods.com/threads/120032-Testing-Purposes-Updater-V2), and update your 0.4.0.7's installation. If it goes as planned, it should work correctly.

Could you also post the updater's log? That shouldn't happen. It's updater_log.txt in the game's root.

@ohlidalp
Copy link
Member Author

ohlidalp commented Aug 5, 2015

Updater log from TB5 download
Log: http://pastebin.com/GMJfQRg2

Standalone updater + RoR 0.4.0.7 installation:

@Max98
Copy link
Member

Max98 commented Aug 5, 2015

Does the glitch happens only in the MZ2? I see that it is loaded before the base resource in the logs and it's also unpacked.
Can you try an other vehicle?

@Speciesx
Copy link
Contributor

Speciesx commented Aug 5, 2015

This glitch happens with every Gavril car, MAN TGX (on rims), Volvo VHD and 1st Generation BlueBird

@Max98
Copy link
Member

Max98 commented Aug 6, 2015

@Speciesx Are you also using an AMD gpu?

@Speciesx
Copy link
Contributor

Speciesx commented Aug 6, 2015

Yes.

@ghost
Copy link

ghost commented Aug 7, 2015

This is kind of like #345 .

@Max98
Copy link
Member

Max98 commented Aug 8, 2015

So this seems like it's affecting only AMD/ATI users. :/ Need to take a deeper look into it.

@DirtGamer301
Copy link

Not sure, but might it be a managedmaterials bug as the glitch did not appear at managedmaterial vehicles for me (tested DAF Semi and a yellow trailer) and non-managedmaterials vehicle (Land Rover Defender 90)? Or, to be more specific, a bug of reflections? I just tested with the (yes, banned) Chevrolet Silverado as it has a shiny body but non shiny interior, and the exterior bugs but the interior doesn't.

Edit:
Just noticed something:
how to reproduce:
-go ingame, open 4 Bus Follow AI map
-press esc, press back to menu, go into N-Labs 0.4
-Choose 49 Ford

After doing this, the vehicle will not be shiny, but self-shadows work without glitch!

(Removed stolen content screenshot)
screenshot_2
screenshot_3
screenshot_4

@Max98
Copy link
Member

Max98 commented Aug 10, 2015

@DirtGamer301 You can't be serious. #57

@DirtGamer301
Copy link

Whops, didn't see the connection... Atleast it proves the reflection thing :)

@Max98 Max98 added bug and removed invalid labels Aug 13, 2015
@Max98
Copy link
Member

Max98 commented Aug 13, 2015

I might need to take a look into this on ogre's forum.

@ohlidalp ohlidalp added this to the 0.4.8 milestone Jan 11, 2017
@Speciesx
Copy link
Contributor

Speciesx commented Mar 3, 2017

ror_2017_03_03_21_36_35_184
ror_2017_03_03_21_43_53_622

With my new Radeon RX 480 i don't get the PSSM glitch anymore.

@DarthCainRor
Copy link

I get this issue on my Nvidia GeForce gtx 1070, but I didn't on my GTX 550.

@ghost
Copy link

ghost commented Jun 21, 2017

It appears the glitch only happens if the material has a spec file.

@ohlidalp
Copy link
Member Author

@Michael10055 Can you tell me more? How/where did you come to this conclusion?

@ghost
Copy link

ghost commented Jun 21, 2017

No spec file -> No glitches

AudiWheel       mesh_standard  Quattro_Wheel.png  -
Quattro_Body   mesh_standard Audi_coupe_2048_red.png -

screenshot_2017-06-21_09-35-07_1

Spec file -> Glitches

AudiWheel       mesh_standard Quattro_Wheel.png Quattro_Wheel_s.png
Quattro_Body mesh_standard Audi_coupe_2048_red.png Audi_coupe_s_2048.png

screenshot_2017-06-21_09-37-07_1

This would explain why submesh vehicles are unaffected.

@ohlidalp
Copy link
Member Author

ohlidalp commented Jun 21, 2017

@Michael10055 Thanks, interesting! I'll check out what it does on my system. What's your hardware/rendersystem?

@ghost
Copy link

ghost commented Jun 21, 2017

@only-a-ptr GTS 360M (old, I know) + DirectX.

@fidoj
Copy link
Contributor

fidoj commented Jun 24, 2017

this happens with direct x. opengl is stable

@ghost
Copy link

ghost commented Oct 28, 2017

For anyone having this problem a workaround would be to comment/remove this line.
Doing this will cause vehicles to not receive shadows though, which I don't care too much about myself.

@ohlidalp
Copy link
Member Author

Removing from v0.4.8 - time is up, and let's port to OGRE 1.10+ first.

@tritonas00
Copy link
Collaborator

tritonas00 commented Mar 30, 2022

Shadows/Materials will be redone in OGRE 13. Also classic materials (nice metal) don't have the issue, because they don't receive shadows.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants