applying HDR makes the meshes black sometimes
Asked Answered
H

9

0

Does anybody encountered this problem? when I apply an hdr to a WorldEnvironment, sometimes all the meshes show black when I run the game. see sample 1 and sample 2 .but when I am on the 3d viewport it shows just fine. this only happens on panorama sky, and the problem shows up randomly, so I don't know when it will happen. I tried all the things that I could possibly do, including:

  • adding the world enviromnent with the hdr to root node, then removing the default one on project settings
  • using a different hdr image
  • applying the world environment file to the camera
  • keeping the default environment file and making a new one

but it still the same. the only one that works is to reset the world environment, and reapply it again, but its a pain to do it that way. I'm still new to godot and 3d game development in general.
this is the platform im using:
OS: Ubuntu 20.04.4 LTS x86_64
GPU renderer: Mesa Intel(R) HD Graphics 505 (APL 3)
godot version: v3.5-rc6_x11.64
godot renderer: GLES3

Hypertonic answered 27/7, 2022 at 18:32 Comment(0)
M
0

You got any lights in your scene? The editor viewport can have a 'preview light' so you'd see things even when you haven't added any lights yet, but that light will not show up in game runtime.

Molecular answered 27/7, 2022 at 19:43 Comment(0)
H
0

Molecular its another problem with directional light though. sometimes the shadow is darker than usual for the player, but no shadows on terrain, as you can see in the image

Hypertonic answered 27/7, 2022 at 21:10 Comment(0)
M
0

Surface/mesh self shadowing and cast shadows are 2 different processes. It looks like you don't have shadow casting enabled or it's out of shadow casting bounds perhaps?

Molecular answered 27/7, 2022 at 23:26 Comment(0)
H
0

Molecular sorry, still new to this. where can i find those two?

Hypertonic answered 28/7, 2022 at 15:6 Comment(0)
M
0

Mesh self shadowing is just up to the shader/material. Cast shadows are a lamp/light setting.

Molecular answered 28/7, 2022 at 16:57 Comment(0)
H
0

Molecular yep. its all enabled.


I've tried different versions, specifically 3.2.4-rc5, 3.4.4-stable and 3.5-rc6 just to see what it looks like, but still its giving me same result. I might try 4.0 alpha as well

Hypertonic answered 28/7, 2022 at 19:16 Comment(0)
M
0

make sure to look through this article in the docs:
https://docs.godotengine.org/en/stable/tutorials/3d/lights_and_shadows.html

Molecular answered 28/7, 2022 at 19:54 Comment(0)
H
0

Molecular I've checked that one as well. So to make sure I didn't accidentally enabled something, I tried to make a new test project with 3.5-rc6. after saved the project,I tried to exit and reopen the game engine to see if the same problem shows up again, and it did.

I then tried the same exact process on different version, (4.0 alpha). I saved the test project, exit and reopen that game engine version, and it works as expected.

Sooooo I could say this could be a bug on version 3?

EDIT:
I guess I gonna need to convert all my work to 4.0 alpha then

Hypertonic answered 28/7, 2022 at 21:14 Comment(0)
M
0

Hypertonic Sooooo I could say this could be a bug on version 3?

Could be, but some of the intel integrated gpu's didn't really have a very good openGL support. So could be your GPU drivers too. 4.0 is Vulkan only for now.

Molecular answered 28/7, 2022 at 22:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.