Mesh Tree - Alpha Demo Released
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
Mesh Tree - Alpha Demo Released
The alpha demo of my tree generation code is just released (Win32 exe).
I haven't included the source code yet as it requires some cleaning. It will come soon.
http://www.goutte-d-eau.org/sputnick/og ... e_Demo.zip
You will need a 32bits HardwareBuffer capable graphic card with at least 64Mb to display the most complex tree definition (32Mb is enough for some simple trees).
I did not have time finally to work on a full GUI include all the main parameters of the code, so the interface is very basic and is fully Ogre based. More complex GUI will come when CEGUI 1.0 will be released.
Use the arrow keys to orbit the camera around the tree and Pg_Up / Pg_Dn to zoom in/out.
1 to 6 let you choose between 6 tree definitions.
Changing "Seed" or "Leaves Alpha" requires regenerating the tree (hit the corresponding [1-6] key to validate your settings).
So, the next big step will be to generate texture map based on the complex geometry to rebuild simple tree meshes with LOD.
- Sput
I haven't included the source code yet as it requires some cleaning. It will come soon.
http://www.goutte-d-eau.org/sputnick/og ... e_Demo.zip
You will need a 32bits HardwareBuffer capable graphic card with at least 64Mb to display the most complex tree definition (32Mb is enough for some simple trees).
I did not have time finally to work on a full GUI include all the main parameters of the code, so the interface is very basic and is fully Ogre based. More complex GUI will come when CEGUI 1.0 will be released.
Use the arrow keys to orbit the camera around the tree and Pg_Up / Pg_Dn to zoom in/out.
1 to 6 let you choose between 6 tree definitions.
Changing "Seed" or "Leaves Alpha" requires regenerating the tree (hit the corresponding [1-6] key to validate your settings).
So, the next big step will be to generate texture map based on the complex geometry to rebuild simple tree meshes with LOD.
- Sput
- tuan kuranes
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
- Contact:
-
- Kobold
- Posts: 27
- Joined: Thu Oct 21, 2004 12:32 pm
Wow!! This is very impressive indeed, nice work.
Dont know if you knew about it, but I did notice a few leaves remaining in view at the top tip of the trees when you completely lower the alpha value.
When you manage to generate the texture maps for LOD, this will be an amazing tool!
What also about model levels of LOD, would this possible? Im thinking that the jump from high res model to a billboard may be quite noticeable if done fairly close up, and since these trees are very detailed, having a few of them in a scene will mean you will be forced to swap to billboard sooner rather than later.
How do you define the type of tree? Would it be possible to supply custom parameters easily in order to design your own tree type?
Anyway, great work!
Dont know if you knew about it, but I did notice a few leaves remaining in view at the top tip of the trees when you completely lower the alpha value.
When you manage to generate the texture maps for LOD, this will be an amazing tool!
What also about model levels of LOD, would this possible? Im thinking that the jump from high res model to a billboard may be quite noticeable if done fairly close up, and since these trees are very detailed, having a few of them in a scene will mean you will be forced to swap to billboard sooner rather than later.
How do you define the type of tree? Would it be possible to supply custom parameters easily in order to design your own tree type?
Anyway, great work!
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
Not working here either on MOBILITY RADEON 9000. I've checked with some older compiled debug versions I have here. It seems to come from the Vertex Color addon in the VertexData definition as it was working before. I'll do some test at home and provide a patch for OpenGL. I have a leak when running in OpenGL in: Ogre::GLTextureManager::createtuan kuranes wrote:(nice on directx but don't display anything under OpenGL under ati RADEON 9600 4.10)
Thankstuan kuranes wrote:I've seen much worse looking modeled trees !!
I've noticed it, but had no time to investigate really. It does not appear for all seeds and not for all tree definitions. I'm pretty sure it is coming from a error in the index offset for the Vertex Color data. Some more debugging needed.robin_3d wrote:Dont know if you knew about it, but I did notice a few leaves remaining in view at the top tip of the trees when you completely lower the alpha value.
The plan is not to display these high res models at all. They will only be used to generated low polygon LOD tree textures and billboards. But the idea is to have this tool to generate an endless types of texture depending on the user's needs. The max LOD tree should have around 600 triangles, min one will be a billboard.robin_3d wrote:Im thinking that the jump from high res ...
There is a list of about 60 parameters that define a tree (level of subbranches, number of branches at each level, angles, ...). These parameter will be included with the next version of the GUI.robin_3d wrote:How do you define the type of tree?
Have a look at the link in my other post for more details.
http://www.ogre3d.org/phpBB2/viewtopic.php?t=6220
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
alpha demo patched
The demo has been patched and can be downloaded.
OpenGL is fully working now.
Feel free to comment the demo.
Enjoy
- Sput
OpenGL is fully working now.
Feel free to comment the demo.
Enjoy
- Sput
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
-
- Google Summer of Code Student
- Posts: 1005
- Joined: Wed Jan 08, 2003 9:15 pm
- Location: Lyon, France
- x 49
- Contact:
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- SpannerMan
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
- Contact:
- PeterNewman
- Greenskin
- Posts: 128
- Joined: Mon Jun 21, 2004 2:34 am
- Location: Victoria, Australia
- Contact:
- monster
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
- Contact:
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
Thanks everyone.
I'm using DX9c SDK. I guess DX9c runtime is needed then.
If you don't want to upgrade, it should work fine in OpenGL (although the rendering is a little bit different than D3D9).
BTW, the weeping willow tree doesn't look very real. This is normal as the pruning code is not finished and not used. Pruning is needed to shape some of the trees like the weeping willow. This will be in the next release, along with a CEGUI interface to play with all the parameters.
- Sput
I'm using DX9c SDK. I guess DX9c runtime is needed then.
If you don't want to upgrade, it should work fine in OpenGL (although the rendering is a little bit different than D3D9).
OK, I'll do this.mac wrote:You can remove the files ogre.cfg and ReferenceAppLayer.dll from the zip.
BTW, the weeping willow tree doesn't look very real. This is normal as the pruning code is not finished and not used. Pruning is needed to shape some of the trees like the weeping willow. This will be in the next release, along with a CEGUI interface to play with all the parameters.
- Sput
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
regen speed
Switching between trees regenerates an entirely new tree structure on the fly.thegame wrote:switching between tree types is a tad slow
Some trees can have more than 5'000 branches and 80'000 leaves.
Each segment of the branches and each leaf have a position and a quaternion that need to be recalculated.
That's quite a lot of data to process.
Then everything is packed into a nice Ogre mesh.
Personally, I'm quite impressed by the speed I got here.
- Sput
- DWORD
- OGRE Retired Moderator
- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
shadows
Shadows are a problem. I don't think it would be a good idea to implement stencil shadows as it would definitely kill the perf and then it would probably be even better to use a ray tracer.
Currently a very simple algorithm is implemented to fake self-shadowing:
Leaves near the trunk are darker than the ones on the outside of the tree (except for simple level2 trees like the Palm tree).
But I need to admit that the effect is not that visible, although it does increase realism a little bit.
I could add some specular effect to increase the contrast.
- Sput
Currently a very simple algorithm is implemented to fake self-shadowing:
Leaves near the trunk are darker than the ones on the outside of the tree (except for simple level2 trees like the Palm tree).
But I need to admit that the effect is not that visible, although it does increase realism a little bit.
I could add some specular effect to increase the contrast.
- Sput
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
- Borundin
- Platinum Sponsor
- Posts: 243
- Joined: Fri Oct 03, 2003 5:57 am
- Location: Sweden
- x 2
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
You'd need to use texture shadows - stencil shadows won't work on alpha-blended objects like the leaves. Texture shadows can work quite well on objects like these, although with the number of polys involved it'll still be quite expensive.
Is there any scope for reducing the poly count by pre-baking multiple leaves into a single texture? Right now every leaf is a quad I think, which is pushing the tri count up pretty high. Looks gorgeous though
Is there any scope for reducing the poly count by pre-baking multiple leaves into a single texture? Right now every leaf is a quad I think, which is pushing the tri count up pretty high. Looks gorgeous though
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- spookyboo
- Silver Sponsor
- Posts: 1141
- Joined: Tue Jul 06, 2004 5:57 am
- x 151
- Contact:
- Sputnick
- Greenskin
- Posts: 110
- Joined: Wed Sep 08, 2004 11:49 pm
- Location: Lausanne, Switzerland
That's definitely the goal. But for the second part of project.Kencho wrote:Is there any chance for dynamic LOD?
I'll try it, if I can find some free time.sinbad wrote:You'd need to use texture shadows
That's correct, every leaf is a quad (no culling). Ok for packing leaves but then I loose the orientation of each leaf. Anyway, that's what is intended be done for the LOD trees, but at branches and subbranches level.sinbad wrote:reducing the poly count by pre-baking multiple leaves
- Sput