Your procedural tree/plant seeding technique?
2 posters
Blokworld :: Development :: Information
Page 1 of 1
Your procedural tree/plant seeding technique?
Hi slaihne,
Does blockworld also use a procedural plant seeind technique on the world? If so can you please a bit explain your technique?
Does blockworld also use a procedural plant seeind technique on the world? If so can you please a bit explain your technique?
raistlinthewiz- Posts : 5
Join date : 2012-03-07
Re: Your procedural tree/plant seeding technique?
If you're talking about the grass plains, then yes it does do that procedurally.
Basically, i have a number of 'plant' tables. Off hand, i think i have 1000 values in each table. The tables are filled with plant block values, dependent on what type of terrain they are meant to cover.
So, the table(s) that cover desert have about 10 'dry plant' blocks in there first and 990 empty spaces following that. The grass area tables have 1000 'green grass' blocks in there. I have several variations of each plant, so i use these. EG, the grass table has 1000 grass blocks but the first 100 are version 1, the second 100 are version 2 etc. The versions are slightly different colours and slightly different heights. This serves to make the plains looks a bit more organic.
It's not working 100% atm, there's loads of stuff not showing correctly.
Now, i use a procedural system to generate the landscape types. This gives me 'contours' as such. These contours split the landscape into several coarse types (grass, desert, mountain, plains, swamp etc) but also split each coarse type into 10 sub-types. One type is always beside two definate others (pretty much). You will not see mountains directly encroaching on swamps.
This image should illustrate it...
Each colour represents a "type", and each shade (from black to full brightness) represents a sub-type.
Now, i know that, for the desert type, on one side it will have the tropical type and on the other it will have the dry plains type. The tropical type is bordering the high subtype of the desert while the dry plains are bordering the low subtype. So, for the desert type i have 10 tables as detailed above. They are mostly the same, but in table 0 and 1 i put a few "dry plains" type things and in table 8 and 9 i put a few "tropical" type things. This helps the transition look a bit better and also, as you can see from the image, the contours aren't smooth in the first place.
For each vertical column of blocks i use the type, plus the subtype to get the table i will be using. Then i calculate a "random" value generated from the coords and use this to reference into the table.
This allows me to 'fade' from one landscape type into another, but it is a pain to set up initially It also allows me to have 'fields' of poppies in amongst the grass (i set a couple of the grass tables to have loads of poppies in them while leaving the others just grass).
I hope you followed all that.
Basically, i have a number of 'plant' tables. Off hand, i think i have 1000 values in each table. The tables are filled with plant block values, dependent on what type of terrain they are meant to cover.
So, the table(s) that cover desert have about 10 'dry plant' blocks in there first and 990 empty spaces following that. The grass area tables have 1000 'green grass' blocks in there. I have several variations of each plant, so i use these. EG, the grass table has 1000 grass blocks but the first 100 are version 1, the second 100 are version 2 etc. The versions are slightly different colours and slightly different heights. This serves to make the plains looks a bit more organic.
It's not working 100% atm, there's loads of stuff not showing correctly.
Now, i use a procedural system to generate the landscape types. This gives me 'contours' as such. These contours split the landscape into several coarse types (grass, desert, mountain, plains, swamp etc) but also split each coarse type into 10 sub-types. One type is always beside two definate others (pretty much). You will not see mountains directly encroaching on swamps.
This image should illustrate it...
Each colour represents a "type", and each shade (from black to full brightness) represents a sub-type.
Now, i know that, for the desert type, on one side it will have the tropical type and on the other it will have the dry plains type. The tropical type is bordering the high subtype of the desert while the dry plains are bordering the low subtype. So, for the desert type i have 10 tables as detailed above. They are mostly the same, but in table 0 and 1 i put a few "dry plains" type things and in table 8 and 9 i put a few "tropical" type things. This helps the transition look a bit better and also, as you can see from the image, the contours aren't smooth in the first place.
For each vertical column of blocks i use the type, plus the subtype to get the table i will be using. Then i calculate a "random" value generated from the coords and use this to reference into the table.
This allows me to 'fade' from one landscape type into another, but it is a pain to set up initially It also allows me to have 'fields' of poppies in amongst the grass (i set a couple of the grass tables to have loads of poppies in them while leaving the others just grass).
I hope you followed all that.
Slaihne- Posts : 264
Join date : 2011-03-17
Age : 57
Blokworld :: Development :: Information
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Fri Jul 01, 2016 7:25 am by croxxx
» Source?
Thu Jul 12, 2012 9:55 am by raistlinthewiz
» Version Available (Take 2)
Sat Jun 09, 2012 3:23 am by kamild1996
» Terrain Rendering Bug
Thu May 17, 2012 8:07 am by sackboy789
» Mystery Block!
Thu Mar 29, 2012 4:42 am by Corvin73
» Your procedural tree/plant seeding technique?
Sat Mar 24, 2012 3:10 am by Slaihne
» Voxeliq project
Wed Mar 07, 2012 4:25 am by raistlinthewiz
» What is a Tech-Test?
Wed Jan 18, 2012 12:32 pm by joeydmars
» Images
Fri Jan 06, 2012 6:02 am by croxxx