getting a bit irreated

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

getting a bit irreated // Archive: Tech Forum

1  |  

Post by rjeff // Jan 1, 2008, 9:43am

rjeff
Total Posts: 1260
pic
Ok..I am sure this is easy to do..I just can't seem to get my mind around it, and the TS manual is not very good at describing anything in detail. I have a ivy leaf. I want to put it on a plane and make it do that alpha channel thing you can do to make a lot of them. I have tried everything I know and can't get it to work. What I have done so far is.. 1. I scanned the leaf in and now have a green leaf with a black bgk. Now I assumed since black was supposed to be transparent in TS that I could apply that to the transparency map in the color shader and apply it and all I would have is the leaf showing..howerver I appplies the black bkg with the leaf.

Post by Liger ZERO // Jan 1, 2008, 10:10am

Liger ZERO
Total Posts: 124
pic
From the screen shot it looks like the transparency map is completely white. For the transparency map you want the green leaf area white and the area black. Here's an example of a texture and transparency map.

Post by rjeff // Jan 1, 2008, 10:35am

rjeff
Total Posts: 1260
pic
Ya know Liger...I put a map in there, but it won't hold in there.

Post by spacekdet // Jan 1, 2008, 10:50am

spacekdet
Total Posts: 1360
pic
Mini-tut located here. (http://mywebpages.comcast.net/spacekdet/masktut/)
Uncheck 'flt' in the alpha map properties, this will keep the edges of the mask crisp and avoid the dreaded 'halo'.
Use area render or render scene to check transparency effects.
Your lights will also need transparent shadows if you want correct shadowing (i.e., a shadow of the leaf, not the shadow of the whole plane)
What format is your alpha map texture?

Post by Liger ZERO // Jan 1, 2008, 10:51am

Liger ZERO
Total Posts: 124
pic
It might be the format of the image. Try and use bitmap(.bmp) for the image. Thats what I like to use for my maps.

Post by Emma // Jan 1, 2008, 11:13am

Emma
Total Posts: 344
pic
All Images I used in below material settings are .JPG, that should work too


- used Punched Lozenge metal

- then changed the images

- then assigned to a plane


perhaps you try that way again, mabe something got mixed up during your material creation process.

Post by rjeff // Jan 1, 2008, 11:17am

rjeff
Total Posts: 1260
pic
Thanks for the help..I figured out my issue...

Post by rjeff // Jan 1, 2008, 11:19am

rjeff
Total Posts: 1260
pic
update..I still get the halo effect even with the transparent shadows on.

Post by jayr // Jan 1, 2008, 11:36am

jayr
Total Posts: 1074
pic
rjeff, post the textures you're using here so people can try them, they might be able to work out whats going on then.

Post by kena // Jan 1, 2008, 11:40am

kena
Total Posts: 2321
pic
How strange that you should be doing a leaf :D

I did a tutorial on just that subject.

go here:

http://forums1.caligari.com/truespace/showthread.php?t=2252

Post by rjeff // Jan 1, 2008, 2:59pm

rjeff
Total Posts: 1260
pic
Thanks for the help...I will check out that tut kena. I did a render against a bkg and did not get the halo..if I just render against blue I do..so maybe that is it.

Post by Cthulhu // Jan 1, 2008, 6:21pm

Cthulhu
Total Posts: 48
Man, this is one of the oldest problems people have with the material editor, and a good case for why it should be updated for better ease of use.


I made a shader a while back for ShaderMagic that allows you to use just one image for the color and transparency, and you can specify a color to make transparent. You can get it here:


My shader page. (http://home.comcast.net/~ian_kirkley/3d/pages/files.htm)


It's on the first page, bottom right corner (texture_shaders.zip)


I think the one you might want is called Texture Tweaker U. Just load ShaderMagic for color and transparency, then load Texture Tweaker U in both. If I remember correct, if you open your leaf image in one shader (color), it should automatically populate in the other (transparency). You can then set the Clip Color and threshold to knock out the black background of your leaf. This shader works really well if you have a large clean image to work with. Smaller images tend to cause haloing around the transparent areas.

Post by Tiles // Jan 1, 2008, 9:42pm

Tiles
Total Posts: 1037
pic
Halo problem will always appear where there is a gradient transparency, the background colour* is different than the content and/or the background of your scene.

*I mean the parts of the picture that are set to transparent by the black alpha channel part. Remove the alpha channel and you will notice what part i mean :)

The transparency works by greyscale. Now think about a red background at your leaves texture. And think about something like Antialias. This makes a gradient transparency at the border. Maybe just two pixels width. But that's enough to create your described halo effect. Red halo in my case then.

And that's why also the shader from above will fail. You surely have an antialiased border, and so the halo onboard.

Two solutions for this. Use sharp corners for your content, like your leaf. Keyword Sprite rendering. With sharp border the background colour will simply not bleed into the border. Or use a colour that is either nearly equal to the background of your scene, or nearly equal to the colour of your content.

Means for your leaf either green like the leaf. Or blue like your background. Sure, both methods are hell of work with a still antialiased picture. But that's the only way to get rid off of the halo effect.

And untick FLT as suggested :)

Post by TheWickedWitchOfTheWeb // Jan 2, 2008, 4:43am

TheWickedWitchOfTheWeb
Total Posts: 858
pic
One thing that will cause the halo effect is if the transparancy map is in jpg format due to the artifacts you get around the edges with jpg. Try to use tga, bmp or other supported lossless compression formats instead.


If you trans/alpha map is in jpg format, try to clean up the edges in your paint program and re-save it in one of the supported lossless formats to get rid of the halo.

Post by tscorpio // Jan 2, 2008, 5:32am

tscorpio
Total Posts: 84
For what it's worth, I always use TGA & Tiff's whenever doing transparency.

I especially like TGA because you can have the mask and texture within the same file.

Post by rjeff // Jan 2, 2008, 10:38am

rjeff
Total Posts: 1260
pic
Ok here is the look I am giong for..now this is just temp..I am giong to scan several sizes and shapes then I am gioing to photo the vine so I can get a sense of how it grows. If anybody wants the leaf images you can have them when I get all of the scanned.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn