Page 1 of 1

Trees!

Posted: Sat Dec 17, 2005 10:59 am
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 :)

Posted: Sat Dec 17, 2005 1:04 pm
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.

Posted: Sat Dec 17, 2005 7:09 pm
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

Posted: Sat Dec 17, 2005 7:41 pm
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?

Posted: Sat Dec 17, 2005 8:02 pm
by Conquistador
You could use makeColorKeyTexture() to make a certain color invisible on the leave texture in Irrlicht.

Posted: Sat Dec 17, 2005 8:47 pm
by krama757
I see, so you did the colorkeying in irrlicht ...good to know :)

Posted: Sat Dec 17, 2005 9:23 pm
by bitplane
has anyone here got a workflow for the exported x files from the old freeware treemagik? if so enlighten us please :)

Posted: Sat Dec 17, 2005 9:27 pm
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.

Posted: Sat Dec 17, 2005 9:34 pm
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.

Posted: Sun Dec 18, 2005 12:18 pm
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.

Hi

Posted: Sun Dec 18, 2005 2:49 pm
by r3i
Neutral, i0ve some problem with alpga channell...how define it??
I'tried with a gif but doesn't work properly :(

Posted: Sun Dec 18, 2005 3:01 pm
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.

Posted: Mon Dec 19, 2005 2:02 pm
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.