Game Development Community

Foliage images alpha?

by Dylan Jones · in Artist Corner · 12/29/2005 (6:00 pm) · 5 replies

When I make some foliage for me level and load one of the foliage plants.jpg that came with the demo they still have the black around them. They are square pictures with there plant with the black. How do I get it to show its aplha channel?


Thanks!

#1
12/29/2005 (6:38 pm)
When you say you load plants.jpg, are you loading it in engine or viewing it in an image viewer (a la Photoshop).

Regardless, I am pretty sure jpeg files don't support an alpha channel. Png's do however.
#2
12/29/2005 (6:46 pm)
I am viewing it in the engine. I guess I will make some pngs then! lol Thanks!
#3
12/29/2005 (7:56 pm)
I have a problem with foliage and pngs.
im using pngs, and transparency is working, for sure, but the foliage objects have a 1px line above them.
i know this issue from other objects like dts, and the solution there is to switch of tiling in the 3ds map editor, but this cant be done at the foliage replicator, for sure, because it uses just images.

so, perhaps someone can point me towards any solutions..
thx in advance.
ka
www.3dtowns.at
#4
12/30/2005 (9:51 am)
You could adjust the UV code in the engine, but that sounds more complicated then it is worth. I would alpha out the bottom 2 rows of pixels of the image. What is happening is those are wrapping around to the top of the poly, this is a common problem. If you need to you can adjust the ZOffset of the foliage to rest ~2 pixels lower in the ground.
#5
12/30/2005 (10:32 am)
Ohh, damn.. sure.. , thx for the trick. of such a thing i havent thought of.
ka
www.3dtowns.at