Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 May 2013
Offline Last Active Jun 25 2013 04:04 AM

Posts I've Made

In Topic: Voxel Terrain Performance (rendering)

19 June 2013 - 03:57 PM



I'm actually using C# with XNA. It doesn't support Geometry Shaders. Thanks though.

In Topic: How to sort array of tiles by direction character faces

19 June 2013 - 03:51 PM

@Paradigm Shifter


Thank you. That's exactly what I wanted and it's working great.

In Topic: Procedural Terrain and Biomes

20 May 2013 - 04:32 PM

I'm horrible with explaining things, but I'll try.


I'm using value noise with about 4 octaves as my mask. I then set a biome up by specifying values for it's own noise call with what I'm calling a location value and an impact value. Per biome, I take (fImpact - abs(fMask - fLocation)) / fImpact. That gives me a scaling percentage of the biome's "strength" around the fLocation value.


If my location was .2 and my impact was .15, with noise scaling from 0 to 1, it'd look like this:


Mask - Biome Strength

0.10 - 0.33

0.15 - 0.67

0.20 - 1.00

0.25 - 0.67

0.30 - 0.33


I then call the noise function for said biome, multiply it by the biome strength, and add that to my total height multiplier. Once I've ran through each biome (only calculating the noise call for that biome if the strength is >0), I take that sum and multiply it by the max height of my terrain to get the height of that point.


I'm also storing per point on the heightmap what biomes played a part in that point in descending order so that I can use those values for details of the terrain (trees, sand, snow, or whatever else).


It certainly wouldn't be difficult to scale up the strengths to ensure 100% contribution based on how many biomes played a part at that point, but I'm pretty happy with the results I'm getting with a pretty even spread at the moment (with only a little overlap).

In Topic: Procedural Terrain and Biomes

19 May 2013 - 05:54 PM

Sorry FLeBlanc, that's a bit too advanced for me. If I get something working in a much larger scale, I'll probably come back to this some day, but I'm betting that'll be a while.


I went ahead with the weighted approach Kylotan, which is exactly as my code showed above, but I did it in a much more elegant manner. I now have a single function to create biomes and another to draw upon them as needed.


I'm having a few speed issues at the moment (more like over optimizing issues on my end, lol), but if I get past them I might throw a screenshot out later in case anyone is curious what I'm tinkering with.


Thanks for the help!