Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 996 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
TreeCreator - Easy to use wood-generator & exporter #286776
08/27/09 10:15
08/27/09 10:15
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
Hi guys,

I always wanted to contribute something useful to our community and so I've been working on a project during the past few weeks. It is called "TreeCreator" and allows you to create almost any number of trees on a terrain. The generation process is based upon a random value - so no matter how often you start the generation process with the same settings, the results will never look the same. You may restrict the areas trees are placed at by using a "vegetation map" and several other settings (please refer to the "README.txt" for more information).

Here are some screenshots of TreeCreator (tried to use the img-tags but it didn't work for some reason... just click the links!):

http://www.letsshareit.net/files/5/overview.bmp
Shows an overview of a terrain with 1500 trees generated upon it. Definitly one for the highlight reel wink

http://www.letsshareit.net/files/5/road.bmp
Have a close look at the road: Not a single tree is placed upon it - thanks to the vegetation map.

http://www.letsshareit.net/files/5/selected_tree.bmp
Before exporting, you may select every single tree by left-clicking on it. You may change his scale and position or entirely delete it if you wish.

http://www.letsshareit.net/files/5/exported.bmp
This is a screenshot of my current project in which I use TreeCreator as a tool for generating woods. Just to proof that the export function works wink


So, finally, the download-link for TreeCreator:

http://www.letsshareit.net/files/5/TreeCreator.zip



Notes:
I'm still a beginner in 3DGS. Therefore, this is a beginner's project - so don't expect too much and be patient, please.
This is kind of a alpha-version of TreeCreator. Some features are not implemented yet and it still needs a real graphical user interface... But it works laugh
Don't bother with the folder name which says "TreeCreator 3.0". I only called it "3.0" because it is my third attempt to script this.
I could only test TreeCreator on a high-end PC. If your framerate breaks down, reduce the number of your trees and use LOD. Please let me know the average number of trees your PC can handle before the framerate breaks down.
Please read the "Known bugs and other issues" section in the README before posting a question. Maybe you'll find your answer there.
If you imported a vegset-file into your project, compilation time will increase significantly. That is because the compiler checks every line of the vegset - and there are a LOT of them in it. I still have to find a proper solution for this.
In order to move a selected tree, hit the following keys:
[j]/[n]: Move up/down
[k]/[m]: Move left/right
[l][,]: Move forward/backward

Last edited by Alan; 08/27/09 10:19.
Re: TreeCreator - Easy to use wood-generator & exporter [Re: Alan] #286827
08/27/09 16:54
08/27/09 16:54
Joined: Dec 2007
Posts: 706
Schortens Germany
Landixus Offline
User
Landixus  Offline
User

Joined: Dec 2007
Posts: 706
Schortens Germany
can you make the screens in JPEG?

I try it out.


My Blog German: http://blog.quakeit.de/
www.quakeit.de ||
Airfix Game in Cooperation with:
www.3drt.com
Models Levels and Textures
Re: TreeCreator - Easy to use wood-generator & exporter [Re: Landixus] #286833
08/27/09 17:34
08/27/09 17:34
Joined: May 2008
Posts: 257
D
djfeeler Offline
Member
djfeeler  Offline
Member
D

Joined: May 2008
Posts: 257
good job

Re: TreeCreator - Easy to use wood-generator & exporter [Re: djfeeler] #286852
08/27/09 20:12
08/27/09 20:12
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
@Landixus: I tried uploading a .jpg format screenshot. When I implemented it into the [img] tag, no picture was shown at all... It would appear that my uploader and the forum software are somehow incompatible.

@djfeeler: Thanks ^^

Re: TreeCreator - Easy to use wood-generator & exporter [Re: Alan] #287122
08/30/09 09:03
08/30/09 09:03
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
No further comments about it?

Re: TreeCreator - Easy to use wood-generator & exporter [Re: Alan] #287313
08/31/09 11:27
08/31/09 11:27
Joined: Dec 2007
Posts: 706
Schortens Germany
Landixus Offline
User
Landixus  Offline
User

Joined: Dec 2007
Posts: 706
Schortens Germany
No time to test it laugh
Or to use it in my Project.


My Blog German: http://blog.quakeit.de/
www.quakeit.de ||
Airfix Game in Cooperation with:
www.3drt.com
Models Levels and Textures
Re: TreeCreator - Easy to use wood-generator & exporter [Re: Landixus] #287354
08/31/09 15:29
08/31/09 15:29
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi Alan!

I downloaded your work and tried tcmain.c
It's great work...how many hours?
Now I know why your eager to get comments. wink

A few rapid questions :

1) How close to a tree must we be to select it?
2) Is there another way of exiting the game other than the X?

I noticed that:
1) your menu says i for up and u is for down.
I think you wanted u for up and i for down because that's the way it works wink

I'm going in deeper in the exploration of your work.
I thing I can use (the principal of) this in my application.
Let you know.

Ottawa laugh


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: TreeCreator - Easy to use wood-generator & exporter [Re: Ottawa] #287383
08/31/09 18:34
08/31/09 18:34
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I just had a look at it.
It works! laugh
You don't need to convert the terrain to a model and vice versa to scale the terrain.
There is a function to scale the terrain in the same window where you find the convert to model and such.

Re: TreeCreator - Easy to use wood-generator & exporter [Re: Pappenheimer] #287430
08/31/09 21:27
08/31/09 21:27
Joined: Oct 2007
Posts: 306
Austria
A
Alan Offline OP
Senior Member
Alan  Offline OP
Senior Member
A

Joined: Oct 2007
Posts: 306
Austria
Hey guys,

thanks for taking a look at it!

@Ottawa:
How many hours it took me to do this? Well, the third attempt I would say something between 5-10 hours, including a *lot* of testing and debugging. All three attempts together... I really can't remember, it has been a long time since attempt #2 xD
To your questions:
1) It is an odd restriction "mouse_ent" has. I intend to do the selection in a different way in the next release, but "mouse_ent" seemed to be the easiest way to get things to work for now.
2) Hm... I think there is no way to exit the program without clicking the "X"... good point, I'll include that as well!
And the "bug" you've discovered: whoops, I completely overlooked that one... The thing is: The movement using the keyboard as it is now is very un-intuitive. Originaly I planned to use the mouse to move a tree, like it is done in WED for example. But it proved not to be as simple as I thought so I put the keyboard movement in place for testing purposes so I've been obviously a little bit careless when creating those info-images... sorry about that.

@Pappenheimer: As far as I know you can subdivide a terrain in MED or change the number of its vertices horizontally and vertically and you may also "resize" it by entering new values for hight and length in quants - but you can *not* scale the terrain using a scale factor like you can do with a model (at least not with the "Change Terrain Size" command, but I can't see any other commands which look like they could do that in my "Edit" menue...) You could get the size of your terrain in quants, get the scale factor from WED, calculate the result and enter the new size in MED, but I think in this specific case it is easier to convert the whole terrain into a model, scale it, and convert it back to a terrain afterwards. Please let me know if I'm mistaken here...

@Everybody: Besides all the positive aspects of TreeCreator, I'm facing one major problem. The "vegset.c"-files are basically lite-c-files with thousands of lines in them (1500 trees generate way over 10.000 lines of code in the exported vegset) and the compiler checks *every* one of them (like it does with any ordinary lite-c-file) which causes way longer compilation times - most probably the largest draw-back of TreeCreator. What I need would be a sort of a command which tells the compiler that the "vegset.c" is something like an "external source of code" which does not have to be de-bugged and checked for errors like the rest of the files. Any ideas about that?


Alan

Last edited by Alan; 08/31/09 21:30.
Re: TreeCreator - Easy to use wood-generator & exporter [Re: Alan] #287501
09/01/09 04:33
09/01/09 04:33
Joined: May 2003
Posts: 567
Spain, Canary Islands
Felixsg Offline
User
Felixsg  Offline
User

Joined: May 2003
Posts: 567
Spain, Canary Islands
make a .txt file (a external data file)
where you put the data of the tree
and load by the main code
then are a external file

sorry by my english. I hope you understand
whats I mind.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1