0 votes

Hi all,
Can any one pinpoint to what might cause my scene to display / render differently between the IDE and the actual Run ?

First screen shot ( https://ibb.co/eZaAEa ) from IDE : all nodes are rendered correctly :
Render IDE ok

Second screen ( https://ibb.co/mC3afF ) from run-time execution, some nodes (the 2 far walls) render incorrectly, while other nodes are correctly rendered.

enter image description here

asked Jul 8, 2017 in Engine by GameVisitor (814 points)
edited May 26, 2019 by GameVisitor

1 Answer

+1 vote
Best answer

My guess is that you enabled ambient light in your editor but have no ambient light in the scene.
You can do this by adding a WorldEnvirnment node to the scene and enable ambient light within.

See http://docs.godotengine.org/en/stable/learning/features/lighting/lighting.htm (near the bottom)

Another reason for different rendering could be the set up of the camera (i.e. view range) but this is not the case here I think.

answered Jul 8, 2017 by wombatstampede (3,185 points)
selected Jul 19, 2017 by GameVisitor

Thx for ur feedback, the main root node of my scene is a WorldEnvironment.
The camera also have its own WorldEnvironment as environment property.

(I know they are different coz the one of the camera has the background as light green as u can see in the screens, whereas the main WorldEnvironment default to the black color).

-Enabling : Ambient light, Glow, or HDR in root WorldEnvironment scene has not effect at all.
-Enabling : Ambient light, Glow, or HDR in camera's WorldEnvironment has not the desired effect, (of showing the correct rendering while running). Also it generates some kind of "vertical bluriness" as u can see in this new screen (https://ibb.co/kKPFxv): melted effect

Btw, i did read this link : http://godot-es-docs.readthedocs.io/en/stable/learning/features/lighting/lighting.html

before posting but it couldn’t help me :(

Avoid adding a World Environment to the Camera for now. That will just make things more complicated (WE in Camera should override WE in scene but it just makes it more complicated for now).

Usually, I use a Spatial as root node and the World-Environment as one of its child nodes. But that shouldn't make a difference imho.

What to do:
#1 Switch off the standard lighting in the 3D view of your editor (Uncheck the checkbox under the "View" menu item in the Editors 3d View)

#2 Check in your World Environment that the ambient lighting is enabled.
#3 Check that it has a bright color (white). Ambient Lighting with Black won't help much.
#4 Increase the Energy to 3 or 4. Your scene should get much brighter in the editor (and on runtime). You can reduce the Energy again later.

If all that doesn't help. I'd need to have a look at the project to help more. Perhaps you could upload a stripped down version of your project somewhere.

Indeed, following ur detailed steps showed my problem (std light of IDE). Thx for that :-)

However, now, even though at runtime my scene is illuminated it has this "vertically melted" effect (sorry can't describe it better in words)

Here is a screen, hope it explains better ( https://ibb.co/cu34hv ).

PS: If i disable "Ambient light" of WE, the "melting effect" disappear but then my walls aren't rendered correctly.

Could this be due to a camera settings (keep Ascpect, far, near...) or something related to the project as a whole (vsyn. stretch aspect, stretch mode...) ?

Is absolutely difficult for me to tell from that single screen shot what is wrong or how it should look like.

You could play a bit with the texture (repeat?) and material flags.
You could add a (test-) camera with default settings and make that current (for test purposes)

Where these planes imported from a 3D-Editor (Blender)? If yes, you could check the face normals and enable the split to tris on export.

I tried even without a texture, and the scene also looked melted down (only when ambient light of WE was on). A new test cam did not help either.

Nothing is imported from an editor trying to build everything from Godot using test cubes (stretched for walls).

In all cases, i upload my project to this link code if u care to have a look.
the password is simply test123456.

Thanks in advance.

Problem in your project is the node2d your gui elements.
You made a Node2D as parent for your Controls. This lets somehow the display/stretch-settings of your project go crazy.

Use a "Control" instead of node2d as parent in the 2d_gui (sub)scene. And before adding the childs controls/labels, set it to your viewport size. (Anchor Begin,Begin,End,End, Margins all 0).

You can remove the "viewport" there IMHO.

Thanks a lot for taking the time of opening the project and looking deeper for the issue.
I followed your steps as described and recreated the (sub)scene from scratch, removed all node2D however same result. (If ambient light of WE is on, scene is melted, else scene displays fine).

In case you can still have alook, here is my update code-updated

:-(

Change the stretch-mode in the project settings from "viewport" to "2D".

That should do it. (If not I'll reupload your project for demo)

Setting the stretch mode to "2D" generally is a good idea IMHO....

See here:
https://godotengine.org/qa/1084/resolution-strech-mode-2d-vs-viewport

...but I absolutely don't know why your "melting" was triggered by enabling ambient lighting.

Amazing ! Solved finally and learned some new stuff along the way.
Many thanks #wombatstampede

:-)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.