Sign in to follow this  
Zeraan

Creating a noise texture with pre-defined values [Need help with kriging algorithm]

Recommended Posts

Zeraan    317
I'm working on a 4x space game called Beyond Beyaan. I added nebula field as a "obstacle map", the more dense it is, the slower the ships will be traveling through it. I tried to make the stars and black holes to have an impact on how the nebula field is generated, but it don't look "natural". I'm currently using what's called "square/diamond" approach, and I put in values of star's "nebula density" at their locations, then proceed to generate the field. This is what it looks like:
[img]http://i18.photobucket.com/albums/b102/Zeraan/nebulafinal.png[/img]


You can see the square artifacts, and how the black holes just add splotches to the map. What I want to achieve is having black holes pull up the density near them, but yet making it look organic and natural, instead of looking like weeds in the galaxy map. Something that looks like this: [url="http://www.imagenesygraficos.com/desktop-wallpapers/pic-de-nebula-tarantula-wide-field-image_id-6725"]http://www.imagenesy...d-image_id-6725[/url]

I'm trying to find a better algorithm for my purposes, but I don't see anything that allows me to put in pre-defined values at different locations, then generate the noise map from that. I'm not very experienced with noise maps, so any help will be appreciated!

Share this post


Link to post
Share on other sites
zacaj    667
You could try using Kriging ([url="http://the-witness.net/news/?p=345"]http://the-witness.net/news/?p=345[/url]) on the black holes, and adding other random control points for the field. Ive never actually used it, but it seems like it would work...

Share this post


Link to post
Share on other sites
robotichrist    193
[quote name='zacaj' timestamp='1306268454' post='4815286']
You could try using Kriging ([url="http://the-witness.net/news/?p=345"]http://the-witness.net/news/?p=345[/url]) on the black holes, and adding other random control points for the field. Ive never actually used it, but it seems like it would work...
[/quote]

That's a neat trick!

Share this post


Link to post
Share on other sites
Zeraan    317
[quote name='zacaj' timestamp='1306268454' post='4815286']
You could try using Kriging ([url="http://the-witness.net/news/?p=345"]http://the-witness.net/news/?p=345[/url]) on the black holes, and adding other random control points for the field. Ive never actually used it, but it seems like it would work...
[/quote]

That looks like something that I want. I researched into the algorithm for this process, and found this page: [url="http://spatial-analyst.net/ILWIS/htm/ilwisapp/kriging_algorithm.htm"]http://spatial-analy...g_algorithm.htm[/url]. However, it looks a bit complicated.

I think I understand how semi-variogram works mathematically, but I don't understand what the variables are for. Well, more specifically, what are nugget, sill, and range? From range, I assume it's the distance between the output pixel and the point containing a pre-defined value? But what about sill and nugget, where do they get their values from (I know it's user defined, but what kind of data do they need?)

After the semi-variogram value is calculated for each point connecting to the output pixel, I form a matrix with all the values that I've calculated? Then multiply it with a 1 x n matrix containing each point's weight, then perform some kind of calculation to factor in all the values into one value for the output value?

I'm pretty sure that if the explanations used simpler terms, I'd be able to grasp it better. Anyone familiar with this process?

Edit: Found this article: [url="http://www.nbb.cornell.edu/neurobio/land/oldstudentprojects/cs490-94to95/clang/kriging.html"]http://www.nbb.cornell.edu/neurobio/land/oldstudentprojects/cs490-94to95/clang/kriging.html[/url]

According to that article, Sill is the maximum variogram value, range is the maximum distance where the variogram value plateaus, and nugget is the "error margin". I use a range of 5 to 100 for nebula density, so does variogram values have a correlation to each point's "weight" or is it just arbitary?

I still don't quite get how to do the matrix/adding all the weights from all points within range in ordinary kriging process.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this