Trees!

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Trees!

Post by krama757 »

How do you guys make trees?

I know many people use giles and 3D studio max but what about us people who dont have the expensive software? Ofcourse, if you want to make forests our of it you also need some low poly stuff.

I was trying to use pngs with 3ds models, but the transparency doesnt show up. Do I need to manually texture within irrlicht to do this?

Well thanks for any suggestions you give me. I shall continue the hunt :)
Arboretum

Post by Arboretum »

I have Gile[s] and needed some time to get the trees display halfway decent. The problem was that it does not display it properly if you lightmapped them. Somebody said that you could use vertexcolors instead, but it doesn't get exported. So leave the damn tree unlighted and use dynamic lights with it. However, as its included in the export file i can't tell the right combination of format and irrlicht texture mode. But it should be relatively easy to figure it out, but if you lightmap the tree it will never work.
finger007

Post by finger007 »

Hi krama757,

last time I've used 'Arbaro' .
Its free. Only thing you have to experiment with the leaves. If you let it generate usual leaves you'll end up with a very nice tree, only drawback - it's nearly useless if you want to have more than it in real-time...looots of polys.
Make the leaves very big planes, let it generate only very few, export it and re-texture it in your favourite 3d-modeller (I used Blender).
As textures I tried .tga with some leaves and the rest transparent. Loaded and showed in Irrlicht quite well.
Oh - and used between 500 and 800 polys for each tree for getting an reasonable look.
If that's still too many for you I'd recommend 2 simple crossed planes with one tree mapped onto it or one plane as billboard.

This way is not as easy as with other Apps, but at least free ;)

Hope it helps you,
Alex
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Thanks guys.

How did you get the tree to have transparent leaves? Did you do it within irrlicht or did you somehow get it done outside and it just imported with the transparency?
Conquistador
Posts: 340
Joined: Wed Sep 28, 2005 4:38 pm
Location: Canada, Eh!

Post by Conquistador »

You could use makeColorKeyTexture() to make a certain color invisible on the leave texture in Irrlicht.
Royal Hamilton Light Infantry - http://www.rhli.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

I see, so you did the colorkeying in irrlicht ...good to know :)
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

has anyone here got a workflow for the exported x files from the old freeware treemagik? if so enlighten us please :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

@ bitplane

I use milkShape built-in plugin to load .X mesh , then I save it as .ms3d file and it works.

Right now I have problem with transparency :(

I use OpenGL but whatever transparency I set tree is always fully transparent.
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Milkshape eh, I have to try that.

By the way, didnt niko fix the openGL transparency bug in the latest release? I saw some thread on the forum talking about it.
neutral
Posts: 5
Joined: Sun Dec 18, 2005 11:59 am

Post by neutral »

I'm loading a couple of low poly test trees using .3DS format. Leaf texture is TGA with alpha channel. Then I manually set the material

treenode->setMaterialFlag(EMF_BACK_FACE_CULLING, false);
treenode->setMaterialFlag(EMF_LIGHTING, false);
treenode->setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL_REF);

Works with both D3D9 and OpenGL at the moment.
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Hi

Post by r3i »

Neutral, i0ve some problem with alpga channell...how define it??
I'tried with a gif but doesn't work properly :(
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

krama757 wrote:Milkshape eh, I have to try that.

By the way, didnt niko fix the openGL transparency bug in the latest release? I saw some thread on the forum talking about it.
He fixed part of it, but it's still there.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
neutral
Posts: 5
Joined: Sun Dec 18, 2005 11:59 am

Post by neutral »

r3i

GIF I think doesn't support alpha channels. You need to use an image format that supports RGBA (8 bits for red, green, blue & 8 bits for the alpha channel) that Irrlicht can also load.

I'm using TGA (Quake3 also used this).

How you create the alpha channel depends on your image editor. I'm using a very old copy of PaintShop Pro, but the GIMP will also allow you to make images with alpha channels.
Post Reply