I’ll admit I’m a reasonable newbie when it comes to shader programming, but I know just about enough to play around with stuff on the vertex/pixel shaders in CG to have a single animated texture made up from several different textures, blending textures and so forth to make custom rendering pipelines.
However I’ve come to a problem that has me stumped, partly because the maths is giving me a hard time to wrap my head around, but also because I can’t figure out what I should be doing programatically to achieve it!
I’m talking about doing general processing on the GPU (passing in a texture and treating it as an array, then rendering, passing out the texture as a result array).
My ultimate goal:
Animate Jupiter. As in the planet Jupiter. If you have a quick gander at The Wikipedia page for Jupiter you’ll find an animation that shows the surface is much like a liquid.
I am contemplating using a navier-stokes simulation on the GPU to emulate this sort of effect (a good guide on this can be found HERE in GPU Gems 1. However, I am majorly stuck.
I use Unity Pro, and the end result is strictly for one machine only so I don’t care about making it work for everyone in the universe (which helps!)
It’s part of an app I’m making for the school I work for, it effectively lets people surf around our solar system in 3D.
We have a stereoscopic screen that uses polarised filters. I’ve got this aspect of it working brilliantly (very easy in unity just having two cams eye distance apart), but now I’m trying to make my app look amazing, and I’m stuck with the magic bit of making Jupiter look stunning.
(To fully appreciate the results I’m aiming for, have a look at this youtube clip)
From what I gather, I need to pass in some data (via a float array stored in textures) compute the navier stokes stuff on the GPU and output the results onto a texture, then use the data in said texture to render my result (in my case onto a 2D texture that gets put onto a material onto the sphere that is Jupiter…)
I just don’t know where to begin in order to achieve this.
Help is muchly appreciated.