Textured Mesh Transparancy
Blitz3D Forums/Blitz3D Beginners Area/Textured Mesh Transparancy
| ||
I have looked and searched through these forums and tried just about everything, but my simple little quad mesh, created with max, exported to UltimateUnwrap3d, saved as b3d, will not show the transparent background. I used .png created with paintshop pro and photoshop with an alpha layer background, tried bmps created with both programs. Tried texturefilters, alpha commands, but no matter what I cant get it. Can someone please assist me with this one? heres the code that loads the mesh... Shdw = LoadMesh("Media/Models/Quads/Quad1x1.b3d") ;Shdw = LoadMesh("Media/Models/Quads/Quad1x1wBMP.b3d") ;EntityFX Shdw,1+32 ;Need fullbright to stop any lighting reflections and alpha to mask ;EntityFX Shdw,1 ;EntityAlpha Shdw,.70 ;TextureFilter "Quad",2 PositionEntity Shdw,EntityX(Sphere,True),EntityY(Sphere,True)-45,EntityZ(Sphere,True) The first loadmesh line is the mesh with a .png texture the second one loads the mesh with a .bmp texture Thanks for any tips here! |
| ||
Ok, using an older program, I used the same exact texture but loaded it onto a blitz3d created quad with this code...ShdwTex = LoadTexture("Shadow.png",2) ;Used flag 2 for alpha And the texture shows the transparency correctly. Im gonna mess around some more, maybe try loading the texture onto the max created mesh quad through blitz3d and see what happens... |
| ||
Well that worked... overriding the default texture that gets loaded with the loadmesh command, with the loadtexture and entitytexture commands allows the transparency to show. Heres the code... Shdw = LoadMesh("Media/Models/Quads/Quad1x1.b3d") ShdwTex = LoadTexture("Shadow.png",2) ;Used flag 2 for alpha EntityTexture Shdw,ShdwTex ;Shdw = LoadMesh("Media/Models/Quads/Quad1x1wBMP.b3d") ;EntityFX Shdw,1+32 ;Need fullbright to stop any lighting reflections and alpha to mask ;EntityFX Shdw,1 ;EntityAlpha Shdw,.70 ;TextureFilter "Quad",2 PositionEntity Shdw,EntityX(Sphere,True),EntityY(Sphere,True)-45,EntityZ(Sphere,True) That texture I'm loading there is the same texture used on the model itself in Max. So I guess I'm reduced to loading textures manually, took me over 5 hours to get this to work, lol. |
| ||
you may also use the texturefilter command: texturefilter "",9 or 2 mesh=loadmesh("xyz.3ds) texturefilter "",9 you may set it to 9 after loading since these are the defaults. |
| ||
BTW strange, I think UU should support alpha. It would of course be nice to have certain surfaces with individual ALpha etc. settings! You should try 32 Bit TGA textures for the alpha stuff. |
| ||
Thanks for the info there JFK, I did use TGA alpha'd texture in my trials there since that was the only format that photoshop would save as with an alpha setting. Still trying to understand what photoshop is doing, lol. But the TGA texture worked also. |