Objects disappear when i move Camera (no clipping issue)

Hi, I am using URP and have updated my Materials to Simple Unlit.

When I now move my camera, some objects of my scene disappear. I can only make them appear if I find a sweet spot in the world for my camera or disable and enable the game object again.

This does also apply in game mode so I would have to disable and enable my object at runtime to get it working. Its obviously no camera clipping (my settings are 0.01 near, 1500 far)

So I suspect that’s some kind of shader issue. How can I fix this?

1 Like

If it weren’t for disable/enable fixing the issue, I’d say it could be frustum culling and incorrect mesh bounds. I’ve had that issue before with objects disappearing while still half-visible in the camera. It might be worth trying RecalculateBounds (in particular with any custom or modified meshes), i.e. GetComponent().sharedMesh.RecalculateBounds();

1 Like

Thanks but depending on my Cameraposition, I would have to call this on every Object in the Game. I have found a position where everything works and since my camera isn’t really moving, I hope I am good.

I had this exact same problem with URP and Unlit materials. For me, it was occurring for things that I was scaling or particle effects. I think it has something to do with renderbounds not getting recalculated properly. I took me a really long time and a lot of trial and error before I figured out a solution. I found two actually.

Solution 1) This solution ONLY works if you’re not using Hybrid Renderer V2 (which doesn’t support mobile shaders). Change the shader from “Universal Render Pipeline/Unlit” to “Mobile/Particles/Additive”. For whatever reason, the mobile shader still works in URP projects and doesn’t have the disappearing problem.

Solution 2) On your material settings in the Inspector, change Advanced/Priority to 50. Honestly I’m still not sure why this makes a difference, but it worked.

2 Likes

it has something to do with a wrong pivot of the mesh your trying to render, so if the “wrong pivot” of this object falls behind the camera`s renderview, then the object simply gets treated as no longer importent to be rendered.
either you fix the objects pivot in blender or maya or “if its not a problem to render this object when the camera doesnt look at it”
—>select the obejct select the mesh renderer and thick the box where it says “update when offscreen”

15 Likes

for me problem (with problematic meshes) was solved by unchecking “Dynamic Occulusion” box

4 Likes

Where is that tick box?

It’s so objects behind other objects are culled. If it’s unchecked you still have frustum culling (when mesh bounds are outside of the camera’s view).

Edit: never mind, I’m dumb - I thought it said “what” not “where” :roll_eyes:

2 Likes

For me unity was setting simple as default settings, this was triggering LODs to not appear, raising default quality stopped lods culling.

Thank you soooooo much, I’ve been struggling for hours with a first person view disappearing every time i played a run animation. Updating when offscreen fixed it and it now works perfectly fine. Thank you!

1 Like

Facing same issue here. Object disappear when I look at them, and reappear when I look away…

I think i got the same issue and found the problem origin and the solution, but the original question is not quite precise to be sure that’s the same problem, so i gona explain a bit.

if you’r using a skinnedmesh renderer, so that Unity does not have to calculate if the object (with mesh animation, or in my case bones modifications) is in the camera view, he use a boundary box that should contain entirely the mesh and all animations, no any point should be out of this during all animations of this object. Then unity calculate if the bundary box is in view instead of entire mesh.

i think this box is preacalculated on standrads meshes and scale with objs if needed.

you can find, in the SkinnedMeshRenderer component the setting to modify this box, this is called Bounds.
you can check “update when offscreen” too but not optimal.

2 Likes

Found the issue!
I needed to re-bake all occlusion!

I had simply fix my issue, selecting “Update When OffScreen”
My object not seen if i look closer not depends on scene or game window8983198--1236199--Ekran görüntüsü 2023-04-30 200512.png

1 Like

[quote=“EthemKrg, post:14, topic: 796930, username:EthemKrg”]
I had simply fix my issue, selecting “Update When OffScreen”
My object not seen if i look closer not depends on scene or game window
[/quote]Thank You very MUCH. It’s very helpful!!!

Hi, first sorry for bad english. Latino here. I dont know how present this issue is for you. But I just fight whit it and it was in Fallout 4. I had a mod installed called Immersive Cleaning. This mod was causing this exact same problema. So I dont know if this is relevant to you but I had a bad time with it and unistalling that mod was what it resolved it for me. I dont know if Fallout 4 runs whit anything from Unity but I find that interesting enough to comment it here. Take care

For Me Unchecking Dynamic occlusion solved the issue