I’m developing a VR game for native Quest2.
After searching a lot, I can’t find an answer for my question, I’ll try to make it simple:
Limitations of Quest2:
Can’t use post processing effects/materials
Can’t use HDR
Question: I’m trying to achieve the cheapest way to make distance fog. All the gameplay is inside an arena in the centre of the map, so the distance from the player to the Scenery outside the arena is always virtually the same, so there’s no need for dynamic fog that updates with the player position.
My question is: Is there any way to bake the fog overlay in a new UV layer?
The same way as I have a pass for baked light, I would have a pass for the fog.
I was thinking about using pixel depth calculated between the object and a stactic point in the middle of the arena, but I’m afraid that’s not the optimal way for something that theoretically is so cheap.
I hope I’m not over complicating, I’m new in unreal engine, these are conclusions from all the research I made in the topic.
complex issue. i can picture that. a nice visual thing. hardware fogging and all the passes are always camera dependent. i feel like this gotta be managed on the asset level.
you could change all the materials and use world position offsets to do the distance math from the center of the arena, in the materials and do the fog color blend.
the smarter solution would be to get the full arena with all the props into into a modelling tool and bake the distance from the center into a floating point value per vertex or the vertex color. excuse me being a technical guy. you probably don’t understand this. but this is the cheapest and most performant way you can do that.
rest of a vis tech babble…
doing it in engine would require a global shader function in the core shaders. “do the distance math from the center and apply fog color”. can be done per vertex or per pixel. per vertex is cheaper. with some custom tool code in the engine you could maybe achieve the vertex color thing, same math, could support instancing if you deliver vertex colors per instance or bake the fog ontop of the lightmaps or into a seperate texture layer. but… that’s a deep rabbit hole too.