godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.22k stars 20.23k forks source link

Strange 2D in 3D behavior #13987

Closed djrm closed 6 years ago

djrm commented 6 years ago

Operating system or device, Godot version, GPU Model and driver (if graphics related): master 5938466c848becb269f002191901487135e39ce3

Issue description:

edit: the regular sprite3d problem was solved.

using a viewport texture in a sprite3d fills the sprite3d with solid black, it was working before, but the produced image was SRGB,

the sprites3D still are SRGB

as shown here

screenshot from 2017-12-04 18-30-38

the top left is from a viewport container,

the center is a sprite3d with texture set from viewport

the right is a regular sprite3d

Steps to reproduce:

Link to minimal example project:

vp_test_2.zip

reduz commented 6 years ago

A MeshInstance with a QuadMesh works fine, so it's probably related to some setting in the 3D sprite materials:

https://github.com/godotengine/godot/blob/master/scene/resources/material.cpp#L1552

That mentioned, this will most likely not work with a Sprite3D without a material override, because you need to force the "albedo as RGB" property of the material for it to look good.

djrm commented 6 years ago

@reduz i tested with a material override and directly setting the albedo texture, and it still the same, do you think it really is a sprite3D material issue.

djrm commented 6 years ago

@reduz i tested with a material override and directly setting the albedo texture, and it still the same, do you think it really is a sprite3D material issue.

Th0rDaW commented 6 years ago

Confirming this issue. First everything seems to be working fine. 2017-12-08-202016_1600x900_scrot But on launching: 2017-12-08-203107_1600x900_scrot

In different approaches using Sprite3D, MeshInstance, ViewportContainers and changing materialoverride/srgb/albedo-settings i still get the same result. BUT, the buttons are still clickable =)

same thing on changing or reloading the scene and sometimes getting: ERROR: get_size: Condition ' !vp ' is true. returned: Size2()

reduz commented 6 years ago

I just can't figure out what's wrong with this, it doesn't make any sense.