Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyclones #3

Open
nicosalto opened this issue Jul 4, 2016 · 4 comments
Open

cyclones #3

nicosalto opened this issue Jul 4, 2016 · 4 comments

Comments

@nicosalto
Copy link

Hi,
I have to say this code is really cool and that's great that you are sharing it! Its really helpful to what iam trying to achieve.
Iam trying to create a planet of storms, meaning the planets is covered with storms and the clouds are moving different streams. Iam going in the right direction with your code but iam missing a part. I need to great big Cyclones that are occupying a big part of the planet. This is the look iam going for : http://la.climatologie.free.fr/cyclone/cyclone-ivan.jpg

Do you have an idea of what kind of algorithm i can use to create this and how i could integrate if with your curly Noise ? To me its important to marry both as it give this organic look.

@smcameron
Copy link
Owner

Well, if you can create a velocity field that makes a hurricane like that you should be able to superimpose it into the velocity field within curly vortex. The main thing to watch out for is that your hurricane velocity field should ideally have no sources or sinks. If that condition is not satisfied, then things will disappear into the sinks, and bare spots at the sources.

The other thing is if you're looking for white clouds and distinguishing between clouds and ground (as opposed to 100% clouds) then it get harder. One approach is to have the white clouds and also transparent portions. With that approach, and some other ideas, I have gotten results like this:

http://imgur.com/dYSyyVX
http://imgur.com/oVnKnzq
http://i.imgur.com/nKeDFrc.jpg <--- running swirliness algorithm too long
http://smcameron.imgur.com/all/

Is your use case 2D or 3D? If 3D, you may be interested in a couple presentations I have:
http://smcameron.github.io/space-nerds-in-space/gaseous-giganticus-slides/slideshow.html#1
(use arrow keys to navigate -- probably doesn't work well on mobile.)

https://smcameron.github.io/space-nerds-in-space/earthlike/example/slideshow.html#1
(again arrow keys to navigate, probably doesn't work on mobile)

There's also this, which may be of interest:
https://github.com/smcameron/space-nerds-in-space/blob/master/howto-generate-earthlike-planets.txt
which describes how to generate earthlike planet textures with clouds for my game Space Nerds In Space.

There has been some recent work to adapt the technique of using curl noise on a sphere to work on the GPU (not by me) described here: https://www.junkship.net/News/2016/06/09/jupiter-jazz

Another thought... I did ad some vortices into gaseous-giganticus with this commit:
smcameron/space-nerds-in-space@22b3701

You can see an example here:
http://imgur.com/RjHS1z1

Not exactly what you're going for, as the vortices are more circular like on Jupiter, not like earth style hurricanes, but you can see the technique of superimposing a vortex on an existing velocity field (though a little more complicated because it's in 3d on a sphere instead of in 2D).

Hope that is some help.

@smcameron
Copy link
Owner

BTW, I should add, if you're looking at the curlyvortexcubemap code -- I never really got the cubemap one to work right -- always discontinuities at the face boundaries -- I ended up doing it properly in 3D in C, in gaseous-giganticus.c over in my space-nerds-in-space repo.

@nicosalto
Copy link
Author

Thanks a lot for the complete answer.
Iam not looking for generating the ground floor actually, my idea is just to generate an animated cloud map and then take it to a 3d software such as maya to render a planet with Photoshop planets texture for the base planet layer. The cloud map will be used to create volume clouds.
You are referring to the code in space nerds in space which seem to be a more advanced version of this code ? I guess the vortices code is the way to start for me, i just need to implement it in processing as i want to work with this package to develop the look.

@smcameron
Copy link
Owner

I see. With a 2D solution, you may find some problems mapping onto a sphere, most typically, distortion at and near the poles. Perhaps you can live with the distortion, or avoid it by making your storms avoid the poles, mitigating by pre-distorting the 2D map to compensate, etc. For my application, the distortion was undesirable, so I ended up doing a proper 3D implementation, which is gaseous-giganticus.c in the space nerds in space codebase.

Generating realistic looking clouds is tough. The way I am doing it is cheating -- I take some cloud imagery from NASA over the pacific, slam it to grayscale, boost the contrast, esp. smashing the darks to black, treat the intensity as opacity, then sample this data in the same way as I sample the heightmap data in the "earth like planets" presentation I linked previously to spray some cloud samples onto a sphere. Then, I take that cloud cubemap and run it through gaseous giganticus a bit to make it a bit more swirly. That's the best thing I've been able to come up with so far, but it still feels like cheating to sample NASA cloud photos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants