Simul Support ExchangeCategory: CloudsCubemap Skydome at Runtime?
Raymond Lin asked 3 years ago

On the docs it says on lower performance machines the sky can be baked to SkyDomes through a blueprint. Could someone tell me how to do this in Unity? Preferably at runtime. My game has a flying and an FPS part, so I would like to bake a SkyDome when the player gets off the plane to save resources and resume a volumetric cloud system when they take off. Is this possible?
Thanks in advance!

Chris_Simul Staff replied 3 years ago

Hi Raymond – As mentioned – this is possible via unreal’s blueprint system. I am not particularly versed in unity’s systems for this. An alternate to using this unreal would be to use a scene capture cube with its output to a render target, and then from there write the information to a render target – and save that render target out to a texture which can be used on a sky sphere – which is essentially what the blueprint is doing, and should be able to be replicated within unity with a bit of engine knowhow creating what is essentially a HDRI for the skydome.
So yes this would be possible as could create the texture upon loading the level and have it assigned to a skydome with trueSKY visibility unticked, then once entering the plane hiding the skydome and reenabling trueSKY.

Raymond Lin replied 3 years ago

Yes indeed it can be done. At least in theory (haven’t tried it yet). For anyone else wondering how to do it, use Camera.RenderToCubemap and then use the cubemap generated in HDRI Sky for HDRP or normal skybox for Standard RP.