Iris2.de

Iris2-Forum
It is currently Tue Mar 19, 2024 4:44 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Tree generation
PostPosted: Fri Sep 05, 2008 6:59 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
i played around with our caduntree integration.

Image
Image

Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 7:45 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
hmm, i think the stem-branch connections and the roots look very unnatural. we might be better off with a few hand-made tree-models if that problem cannot be solved with cadunetree =(


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 8:00 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
There are a lot of parameters. I think you can vary this one also :-).

But one problem is not solved. How do we integrate them?

Generate a stem mesh and let leaves being billboards?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 11:13 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
too keep performance reasonable, the leafs cannot turn to the camera (unless with some shader), as that would require a seperate scenenode for each leaf, or updating the geometry on the cpu and transferring to vram every frame, consuming a lot of bandwidth (which i suspect to be a bottleneck already), so no standard billboards.

Currently it'd be possible to add them as polygons using gfx3d:SetSimpleRenderable,RenderableBegin,RenderableVertex etc (search code for examples on how to use them)
(later we could even add something to add polylists to a fastbatch directly)
If it is already possible to list the leaf-positions with lua, that is even possible without changing c++ code.

I just want to avoid putting that much effort in it if cadunetree is not good enough for iris.
Sure it can generate a large variety of trees and plants, but since we're short on vram, we won't exhaust that potential anyway, and if the branch-connections and roots look so bad, i don't really see the point.

There might be many parameters, but are they enough to make the branch-connections look good ? are there some examples of tree's made with cadunetree where this looks better ?

the branch-connections are probably just a texture-issue, but then again, cadunetree doesn't help with texturegeneration/mapping .

is it possible to export the cadunetree tree's to ogre.mesh ?
it might be possible to export a few and then tweak them a bit to look more natural.


Last edited by ghoulsblade on Fri Sep 05, 2008 11:28 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 06, 2008 3:27 am 
Offline

Joined: Sat Apr 01, 2006 10:53 pm
Posts: 63
Location: AL, USA
wow those trees look really cool :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 06, 2008 5:13 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
no. it's a library. no export. there exists two api calls:

/// Creates mesh from previously generated data using grow(...)
/// @param geom - pointer to ManualObject, which is for now used for generating mesh
void createGeometry( Ogre::ManualObject* geom );

/// Creates billboard leaves from previously generate data
/// @param set - pointer to BillboardSet, which will hold every leaf.
void createLeaves( Ogre::BillboardSet* set );

and leaves are billboards. i dont know how to make them turn to cam with a shader. but should be possible.

few trys:
Image
Image

Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 06, 2008 11:57 pm 
Offline

Joined: Sat Apr 01, 2006 10:53 pm
Posts: 63
Location: AL, USA
looks much better sience :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 12:28 am 
Offline

Joined: Wed Aug 13, 2008 12:42 am
Posts: 6
Looking good!

I donno about that whole leaf facing issue - I just had fun spawning about 10000 particle billboards with point rendering (always faces camera) - and while the fps gets terrible if you are right up near one of the emitters (2000/s) mostly with blending the native res textures.

However, if you step back the mipmap samples take over and the fps shoots up to max even while spinning the camera etc.

Now, I'd say a pretty detailed forest would use about 800 billboards for the trees (since the LOD seems to decrease the count pretty low for trees a few tiles away), most of the time there isnt too much blending going on. I really cant see it doing too much damage and would certainly be worth testing before going for fancy VS methods.

But as I have said before, I find iris speed problems to be independant of gpu options. My rig is nearing on 3 years old too...

X1900XT at stock, Opteron 170@ 2.5ghz, 2gb ddr400


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 21, 2008 2:17 am 
Offline

Joined: Wed Aug 13, 2008 12:42 am
Posts: 6
Hey, been pretty busy of late - Exams at the moment, and for the next month and a biut, so I cant really dedicate much time to art and such, but when I get back in Oct I should be able to fill up a lot of the missing particle effects - I have them all saved, but they're messy and need to package the textures etc.

However, since this is about tree's, I was looking for some c++ snippets and instead stumbled onto this page : http://dryad.stanford.edu/

I quite like this editor, besides the fact that it looks pretty damn cool, it's very functional and I like the somewhat abstract tree browser. Tho its buggy as hell and I doubt performance would like the models it exports, I still think its worth a look at :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group