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

Started by
2 comments, last by Zeraan 12 years, 11 months ago
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:
nebulafinal.png


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: http://www.imagenesy...d-image_id-6725

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!
Advertisement
You could try using Kriging (http://the-witness.net/news/?p=345) 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...

You could try using Kriging (http://the-witness.net/news/?p=345) 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...


That's a neat trick!

You could try using Kriging (http://the-witness.net/news/?p=345) 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...


That looks like something that I want. I researched into the algorithm for this process, and found this page: http://spatial-analy...g_algorithm.htm. 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: http://www.nbb.cornell.edu/neurobio/land/oldstudentprojects/cs490-94to95/clang/kriging.html

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.

This topic is closed to new replies.

Advertisement