Hello guys,
Well, I was wondering (and I think this forum is the best place to ask such a question) if it was possible to apply a texture with transparency on an OBJ 3D file loaded with the PSPGU library.
Let's say it it is just a cube.I know how to print texture on it.But if the texture (a PNG) is totally transparent, will I be able to see thru the cube ? Or it won't work properly and I need to do something before - Or it is impossible ?
Thanks a lot for clarify this problem for me,
Oby.
Alpha texture on a 3D object with PSPGU library
-
- Posts: 87
- Joined: Thu Oct 01, 2009 8:43 pm
Hi,
yes - if the texture is fully transparent you can view through. But there are some contraint. You really need to pass the far awy object - the once beyond the cube first, and than the cube...
If you wont to make the cube transparent like glass you should first render the backfaces with eg. sceGuFrontFace(GU_CW) and than the fron faces with sceGuFronface(GU_CW).
Regards
yes - if the texture is fully transparent you can view through. But there are some contraint. You really need to pass the far awy object - the once beyond the cube first, and than the cube...
If you wont to make the cube transparent like glass you should first render the backfaces with eg. sceGuFrontFace(GU_CW) and than the fron faces with sceGuFronface(GU_CW).
Regards
Nah, I would save the 2 pass technique for a single pass and just disable backface culling for objects with transparent textures.And, Yes for transparency you do need to do z ordering as in, render furthest items first. However this is slightly slower since data needs to be overwritten in the z buffer. So I would make some hybrid organization code that shoots rays through our current object so that it only renders objects behind it before it, and then the rest in the opposite order.anmabagima wrote:Hi,
yes - if the texture is fully transparent you can view through. But there are some contraint. You really need to pass the far awy object - the once beyond the cube first, and than the cube...
If you wont to make the cube transparent like glass you should first render the backfaces with eg. sceGuFrontFace(GU_CW) and than the fron faces with sceGuFronface(GU_CW).
Regards
Code: Select all
.øOº'ºOø.
'ºOo.oOº'
Thanks a lot for your replies guys !
Well, in fact I am making a 3D racing game in C/C++ and I've finished to model all the 3D objects.But I have some low-polygon trees that I created on this principle : Its just a plane with a tree texture which has a transparent background.
In my game, I use the trees to make the landscape nicer.Behind the trees, the only object there can be is the skybox because they are on the top of a mountain.
So I will render the skybox and then, the trees.
Thanks again for your help.
Well, in fact I am making a 3D racing game in C/C++ and I've finished to model all the 3D objects.But I have some low-polygon trees that I created on this principle : Its just a plane with a tree texture which has a transparent background.
In my game, I use the trees to make the landscape nicer.Behind the trees, the only object there can be is the skybox because they are on the top of a mountain.
So I will render the skybox and then, the trees.
Thanks again for your help.