#Object in renderteture has a red tint, or sometimes is completely red.

1 messages · Page 1 of 1 (latest)

gaunt badger
gaunt badger
#

in the asset browser, they are normal

turbid lynx
#

i wonder if the items are receiving bad light probes / reflection probes

gaunt badger
#

how would i check that?

turbid lynx
#

don'tdestroy the instance when you're done and see if it looks weird

gaunt badger
#

Okay I didn't destroy the instance, and it's still showing up strange

#

Also when i keep the gameobjects enabled it still sometimes shows up strange

#

it seems to happen every other time i start the game

#

so it's like Correct, Incorrect, Correct, Incorrect it's still unpredictable

#

this is what they look like when correct

turbid lynx
gaunt badger
#

trying to reproduce the issue is difficult

charred whale
# gaunt badger

have you try to make the object material unlit? if its unlit and still tinted red, then its sure there is something wrong in the capturing process

gaunt badger
charred whale
#

should be here, try changing from standard to unlit

gaunt badger
#

ot sure if it's the right shader or not

charred whale
#

that should do, at least now we know that the problem is not in the rendering to texture part
do you have any lights that only affect UI layer?

gaunt badger
#

Shader.Find("Unlit/Texture")
Also my wholeUI is on the default layer

#

I'll let you know if the colors break again using that shader and it being on the ui layer

turbid lynx
#

I know that you can tell a camera to render a single scene. Perhaps you can load these items into a scene that contains nothing but a single light?

gaunt badger
#

ok so i haven't seen "Unlit/Texture" get strange colors yet so that's good i think

turbid lynx
#

did you change the item's material, or did you change the material used in the UI?

gaunt badger
#

I only added this, i didn't change the default materials in inspector. (since these are instantiated in code)

        MeshRenderer meshRenderer = instance.GetComponent<MeshRenderer>();
        meshRenderer.materials[0].shader = Shader.Find("Unlit/Texture");
        meshRenderer.materials[1].shader = Shader.Find("Unlit/Texture");```
turbid lynx
#

You probably still want to use a normal lit shader for the item. An unlit shader would neatly avoid this problem, but it'll look..well, unlit!

#

But if it looks okay, then go with it!

gaunt badger
#

question, how would i load two scenes at the same time?

#

or can i just add a light to the ui layer?

#

Yeah I either fixed it or it's still very inconsistent