Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 2610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:

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!

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!