• Problems with transparencies/alpha channels in tree foliage
    3 replies, posted
Me again – still having trouble with my tree model. Thanks to Snood_1990 for his help suggesting the "$nocull" "1" to fix my one sided faces; the texture is now showing on both sides. However, I’m still having trouble with my transparencies. Quick recap the tree just a trunk with a series of rectangular overlapping faces with foliage textured on them. In game with they look like this: [URL=http://s2.photobucket.com/albums/y31/john41/?action=view&current=newmodeltester0008.jpg][IMG]http://i2.photobucket.com/albums/y31/john41/th_newmodeltester0008.jpg[/IMG][/URL] It still needs some work but this is basically what I want it too look like. The foliage panels look too square and I was going to round them out and remove the black areas by adding an alpha channel and making all the black areas transparent. This is the result: [URL=http://s2.photobucket.com/albums/y31/john41/?action=view&current=newmodeltester0009.jpg][IMG]http://i2.photobucket.com/albums/y31/john41/th_newmodeltester0009.jpg[/IMG][/URL] [URL=http://s2.photobucket.com/albums/y31/john41/?action=view&current=newmodeltester0011.jpg][IMG]http://i2.photobucket.com/albums/y31/john41/th_newmodeltester0011.jpg[/IMG][/URL] As you can see the black areas are gone like I wanted but there is something seriously wrong with the tree’s foliage and I have no idea what it is. It’s also curious that its only happening to the leaves since the trunk appears unaffected. Here’s what the template of the texture looks like pre-alpha: [URL=http://s2.photobucket.com/albums/y31/john41/?action=view&current=Tree_gamma_old.jpg][IMG]http://i2.photobucket.com/albums/y31/john41/th_Tree_gamma_old.jpg[/IMG][/URL] This is what the vmt looks like: [code] "vertexlitgeneric" { "$basetexture" "models/BigTree1/Tree_gamma" "$nocull" 1 "$translucent" 1 }[/code] I’ve tried the suggested "alphatest" "1" but I saw no visible change in the transparencies. Anyone have any ideas?
I had the same problem with PKt's Vanilla Model. What you need to add is "$halflambert" 1 and maybe "$alphatest" 1 and remove "$translucent" 1
"translucent" messes with depth sorting, and is slower than alpha testing. You could also enable "alpha to coverage", it'll blur the edges of the texture and make it look less blocky (the "$AllowAlphaToCoverage" VMT parameter)
Thanks guys, that was indeed the problem here’s what they look like now: [URL=http://s2.photobucket.com/albums/y31/john41/The%20Genesis%20Project%20-%20Sonic%20Adventure%20Past%20Levels/?action=view&current=genesis_project_skybox_det0025.jpg][IMG]http://i2.photobucket.com/albums/y31/john41/The%20Genesis%20Project%20-%20Sonic%20Adventure%20Past%20Levels/th_genesis_project_skybox_det0025.jpg[/IMG][/URL] [URL=http://s2.photobucket.com/albums/y31/john41/The%20Genesis%20Project%20-%20Sonic%20Adventure%20Past%20Levels/?action=view&current=genesis_project_skybox_det0027.jpg][IMG]http://i2.photobucket.com/albums/y31/john41/The%20Genesis%20Project%20-%20Sonic%20Adventure%20Past%20Levels/th_genesis_project_skybox_det0027.jpg[/IMG][/URL] The edges are still a bit off, not sure what I can do about that apart from going in and adjusting it pixel by pixel. I appreciate your help.
Sorry, you need to Log In to post a reply to this thread.