View Full Version : StromekVFX - new, clean edition of old tree generator
Petr Schreiber
19-04-2007, 08:37
Hi,
as the spring comes, there is lot of growing vegetation, which is inspiring :D
Previous tree generator was quite random, and did not give always tree like results.
I have completely rewritten the code, so here is my script.
Parametrization randomness is slightly pushed to produce monster trees now using SPACEBAR, but when you have idea of tree you want to create, you can put your data on input and it will look like tree, monsterisation factor was reduced a lot, at least I hope ;D
Hope you will like it,
Petr
P.S. Yes, and alpha masked leafs are here !
Thats excellent it really looks like a Tree and the lighting was very realistic. :)
Michael Hartlef
19-04-2007, 10:10
Cool it looks very interesting.
ErosOlmi
19-04-2007, 10:32
SuperDuper!
Can I make an exe for distribution purpose? ;)
Ciao
Eros
Petr Schreiber
19-04-2007, 18:42
:)
thanks !
Eros, sure you can ;) !
Bye,
Petr
Petr, I don't know what to say. Your previous tree generator was cool and the code a mystery no matter how long I looked at it. But this version is the best tree generator I have seen. It is so fast and makes awesome looking trees. I think this kind of programming is like a holy grail as a test of one's skills. It takes so much knowledge coming together in so many ways to pull something like this off. I will consider myself a programmer when I can write something like this. FANATASTIC is all I can say for now!!!
Petr Schreiber
20-04-2007, 09:48
Hi kryton,
thanks !
When I will have more time I will write article around this miniscript, you will be surprised how little number of preconditions leads to generating a tree !
Bye,
Petr
Thanks Petr, I will study this code when have more time to concentrate. Thanks again, great job!!
Petr Schreiber
03-05-2007, 15:08
Hi,
the article is out, please visit http://psch.thinbasic.com/.
just browse to "Articles" and select "Growing trees"
Bye,
Petr
ErosOlmi
03-05-2007, 16:22
Thanks Petr.
http://www.donationcoder.com/Forums/bb/index.php?topic=8330.new#new
ErosOlmi
03-05-2007, 17:59
Hi all,
what about some new options to this fantastic script:
save to M15 format
load from M15 format
make a forest, I mean generate more than one tree at the same time
create some 3D background landscape.
And just for starting ...
Michael Hartlef
03-05-2007, 18:15
Very good written Petr!
Petr Schreiber
03-05-2007, 18:19
Hi Eros,
lot of interesting ideas !
I am now prepairing new thinEdge ( quite ready ! ) with one feature which could come handy - if object is mapped, or partially mapped using TGA, you can preview it with alpha masking right in thinEdge.
So trees could be exported as model even with leafs.
I have to do intensive testing and optimisiation still :) ...
But at least branches for now should not be so deadly hard, I will try...
Bye,
Petr
Petr Schreiber
03-05-2007, 18:19
Thanks Mike :)
Petr
Macros The Black
01-03-2009, 11:53
Is there anyway to increase the amount of leaves without increasing the levels?
Petr Schreiber
01-03-2009, 12:28
Welcome to the forums :),
well, in later phases, instead of scientifically correct leaf growth I picked approach of using "leaf bushes".
See attached picture. It is based on using huge "leafs" with multiple leafs in one texture.
The script I took screen from is quite messy, if there will be interest I can clean it up and publish.
Petr
Macros The Black
03-03-2009, 05:24
Hi again
I have messed around with the tree script and tried to put a user interface to it, nothing complicated just canvas and a close button.
I am trying to keep the functionality of the original script while having a user interface but keep having trouble with the textures,
and new trees.
I have got it working to the point where it all loads and the first tree is created, even managed to get the resizing of the window working, but then things turn pear shaped.
The textures on the tree are ok but
the textures also seem to be display on screen as images and they keep flashing.
new trees cannot be generated because pressing space bar closes the app for some reason.
The close button works but thats about it.
I have tried to work through my script and figure this out but cannot figure out whats going wrong and where.
So now i scream for help
.........HHHHHEEEEEELLLLLLLPPPP!!!.......
before my brain ceases to function due to :violent:......lol.....
Could you look at my script and maybe see if you can point me in the right direction?
Thanks in advance for any time you put into sorting out my mess.
Petr Schreiber
03-03-2009, 08:00
`Here is working version of the script ( needs textures from original ),
there were just few mistakes:
- creating display list before binding TBGL
- binding canvas during resizing again and again
- loading textures each time image is rendered
- swapping frame two times, each time with different content
- canvas bigger than dialog
- creating display list each time image has to be displayed
- space closes app because you handled all button clicks to kill dialog + buttons had focus
I attach possibly fixed version, must go out now :)
Petr
Macros The Black
03-03-2009, 10:22
Thanks, :occasion:
That is great
it has shown me exactly where i have gone wrong.
Thinbasic with TBGL rules. :eusaclap:
I have learnt more using this language in one week than what i have learnt using c++( :grrrr:)
for months(and getting nowhere :unguee:)
Keep the development going
TBGL can only get better and better
ErosOlmi
03-03-2009, 12:10
Thanks Macros The Black.
Of course thinBasic cannot be comparable with and any C/C++ compiler. Different kind of programming, different targets of programmers.
For sure we try to be simple, productive and (as far as we can) compatible with MS documentation.
Ciao
Eros
Petr Schreiber
03-03-2009, 18:46
Macros,
thanks for the nice words, I hope to see some nice scripts from you soon :)
Petr