The effect is generated using custom shaders so it takes advantage of the GPU’s power. The only time the CPU is involved is generating seeded permutation tables on startup, which only happens once per seed because it’s cached. The full effect involves using 3 layers of materials which might be a lot for low-end GPUs but I have had no performance issues with it. You can also only use 1 layer and tweak the settings to make it run faster on mobile for example.
I don’t plan on making a web demo because the contents can easily be decompiled.
Hi- looks great from the preview. I have a few questions:
Is it VR friendly? How about mobile VR? How much control over the nebula creation is there? Is it totally randomized? I have a 3d shape I’d like to create a nebula out of. Is this possible? Doesn’t have to be perfect, just roughly within the blob. How about multiple blobs within blobs? Thanks!
It is definitely VR friendly! I was using Space Graphics Toolkit nebulas but it wasn’t good enough for my VR game and looked ugly in VR which is why I made this.
There are settings for controlling nebula generation. Later I’ll upload the README.pdf included in the asset which details how to customize it.
It was originally intended to be on an inverse sphere but technically you can put it on any mesh, later I’ll test it on different meshes and take screenshots of the results.
What exactly did you have in mind for using blob meshes instead of the Inverse sphere?
I was thinking that a blob mesh could have thicker bits of clouds, based on heavier geometry (instead of a uniform sphere). So if I wanted an area with heavy clouds, I’d put in more polys, but keep large areas of simple polys for a clearer space. In that way I’d be able to control the shape of the nebula. Is that how it works, or is it more procedural?
Oh I see. That approach is not nearly as efficient as letting the shader handle it. The shader procedurally generates regions with varying density (There are thick/thin regions). You can actually explore the nebula by either moving around or changing the offset to discover different mixtures of color and density. Not only that but you can tweak various settings to get the look your are aiming for.
This initial release of Procedural nebula takes a more artistic than scientifically accurate representation of nebulae. Some regions of the generated nebulae do look similar to real life nebulae but don’t contain some of the complex structures like crab nebula for example. It does have a layers that simulate simple emission/reflective/dark nebulae though. Future versions may include more complex structures eventually.
The video shows flying through the nebulae. But keep in mind the 3D noise is sampled along an inverse sphere at a fixed distance from the player. Which makes it appear like you are flying through the nebulae. This process is already fairly expensive for the GPU so sampling the noise for the entire inside of the sphere would be orders of magnitude more expensive.