Download

Need advice on creating realistic clouds to fly through

Hello!

Long story short, I’m working on a project that has a scene where the player will at some point fly through a layer of clouds. Currently I’m substituting for a technical artist, so it’s fallen on my shoulders to implement them (I’m a software engineer, so this is not something I usually do). I’ve been reading up on particle effects in UE4, and one thing I keep noticing is all the talk about performance considerations with sprite-based particle emitters with translucent materials.

Considering the fact that on a Rift device the scene will basically be rendered twice, I have some serious concerns regarding the possible performance hit. There’s a lot of work to be done if I want to stay above 75 FPS while going through a huge cloud of particles.

So, my question to you, guys: I took the P_cloud actor from official Content Examples and played around with it. Having a bunch of them in the scene without Rift costs me at least 25 FPS on a low-end system (Core i5, GeForce 230 GT - this is one of the requirements for the project, to run on low-end systems at 75 FPS and above). Switching to GPU Sprites and reducing the global spawn rate scale made things a bit better, now I get frames at under 33 ms. But still, inside the Rift it will probably take a huge FPS hit regardless. What would be the best way to go about creating volumetric (I guess that’s the proper term) clouds for the Rift?

In this case it might be worth evaluating trueSKY.

Yes, I have looked into that. Unfortunately, a paid plugin is not an option on this project, at least for now.

I don’t want to sound rude… but I don’t think it is possible to get VR running on that kind of low-end equipment at 75fps. I have doubts that you could even put a self-illuminated card and have that work in VR on that. At least assuming you’re building in UE4. Maybe if you were custom coding some trickery.

well, this project is being made to be distributed in malls and movie theaters where they have dedicated Rift stations. I’m not the one making the calls on these decisions, unfortunately. I do realize it’s a lost cause, but I have a task so I make due.

anyway, don’t fixate on my hardware for now, assuming some abstract target PC, is there another way of making realistic clouds? or is particles the only way?

simpaltone, sorry to be harsh, but you’re riding a dead horse. get out of the project or make sure the hardware uses the OCULUS MINIMUM requirements for CV1 (GTX 970, core i5!).

Doing VR bad is really bad for those who use it.

However, this guy has made volumetric clouds in the engine: https://www.youtube.com/watch?v=1Y4jhVeiQKc
no idea if they work in the rift, though.

Just to throw out a crazy idea, I wonder if you could get anything good using stereo sprites. There are plenty of limitations but if you can live with them (which depends largely on what you’re trying to achieve), it can be a good way to encode a lot of interest and depth in a way that requires fewer resources. To fabricate some numbers, perhaps instead of needing 10 sprites to represent one particular cloud maybe you could get away with 2, or even 1 under some circumstances. Just a thought. Good luck!

thanks for all the suggestions, guys :slight_smile: I’ll be looking into stereo sprites.

Maybe try having the stereo sprites/billboards start fading out with distance once you are within a radius of them.

I’ve found that wrapping a bunch of spherical shells around the camera and putting a 3d noise material on them gives much better performance than particles. But you’re not going to get anywhere close to 75 FPS on the system you describe unless you write a custom shader that can fake that effect.https://youtube.com/watch?v=9nb4WUZldqo
https://youtube.com/watch?v=SrY4GbO8QoA

That looks awesome xnihil0zer0. Mind showing how that’s set up? I’m guessing my Gear VR won’t even try to render that at any frame rate but I’d be curious to see if it can work at all.

I get a black screen when I try to preview it in mobile/html5 so I doubt it will work on a Gear VR. This setup will get you pretty much the same effect as the first vid, except I used a custom simplex shader there.

7f9a50700c31be7124e5e59664bf3aedea7df333.jpeg

Using 4 levels of noise instead of the default 6 looks and performs better with the built in noise node.

c0f468c1f8fe85f7ec1a5e33d362ec0c2702ac0b.jpeg

This can just be added to the character of the first person template. The static mesh component is just a sphere model with the above material applied. Set world rotation and location nodes are hooked up to the tick. On an R9 280x I generally use between 70 and 200 for the number of meshes variable, depending on the complexity of the material.

lemme know if you have any questions.

edit:In the material, with the default noise node, space around worldpos 0,0,0 is occupied by clouds for several thousand world units at that scale. So don’t be surprised if the screen starts out white, you just have to move out of it, or offset it in the material. I use jetpack controls, so I forgot how slow walking out of it can be.

Awesome, thanks for sharing that xnihil0zer0. I’ll have to try it out soon, I’m still really new to UE4 though so I don’t know my way around too well yet.

I did a quick experiment last night with stereo clouds. I rendered out a quick and dirty stereo cloud in Blender and put it on a stereo material, which I applied to a billboard material as a sprite, and also tried applying it to a box. The sprite with default settings is weird since it follows your head in all rotational axes, so if you tilt your head sideways all the clouds tilt too, pretty cheesy. I’ll need to learn more about billboards and sprites in UE4.

Below is the material in case anyone is interested.

stereo material.png

The cloud I made was very quickly thrown together, I’m pretty sure it’s the worst cloud in the history of clouds, so my apologies for that, but I’ll upload it here at least as an example of a texture that works with the above material. I haven’t tried adding the fade-out as you get close, right now you just fly through it and it disappears. I put a number of them in a project and there’s no judder on the Gear VR though.

(removed because it was so lame, see edit at bottom)

I actually have several stereograms of real clouds I made from video I shot out an airplane window that look super cool in 3D, but they’re not well-suited for this particular application sadly. (They’re hyperstereo so the depth is really accentuated, a cloud that’s a mile deep looks like it could fit in your hands. Slapping it on one of these materials as-is is a recipe for a headache though. Maybe with some adjustment…) Maybe if I get some time tonight I’ll tweak one of them to work well in this application.

Edit: That cloud was too embarrassing to leave alone. I’m attaching a couple of better clouds. Applying the first one to a sprite or a quad and flying through a bunch of them actually looks pretty awesome in-game and flying through them isn’t that bad even without fading out as you get close, though I think that would look better. The sprites still rotate with my head if I tilt it, which is weird, but that’s left as an exercise for the reader. :wink:

fcd713dbb1adaf51ddd7dccb5c20b92e01655a87.jpeg
cloudrendertest3.jpg