#105531 - Uncle Vig - Mon Oct 09, 2006 10:25 am
Hello,
I'm looking for a way to make a 3d object semi-transaprent. It seems that is possible using POLY_ALPHA but I get really bad results.
Thanks in advance.
#105616 - HyperHacker - Tue Oct 10, 2006 5:34 am
Are you using the right blend function?
_________________
I'm a PSP hacker now, but I still <3 DS.
#105632 - Uncle Vig - Tue Oct 10, 2006 10:54 am
You mean enable GL_BLEND ?
#105694 - omaremad - Wed Oct 11, 2006 2:58 am
You need the right poly ID's same poly ID's cant blend together
#106128 - Uncle Vig - Sun Oct 15, 2006 4:31 pm
So what I have to do is simply affect a different Id's for each poly using : POLY_ID(id) ?
Is it possible to have a simple exemple ?
#111358 - Uncle Vig - Tue Dec 05, 2006 8:24 pm
* Bump * (I was out there for a while)
I'm still lost with all alpha, poly id, blend commands...
So here's a couple of question :
* To make an object tranparent, do I need a texture format like A3I5 ?
* What is the poly id ? Is is a kind of depth sorting or priority ?
* What is the poly alpha ? Is it the transparent value of a poly ?
* What about the blend functions ?
Thanks in advance, and sorry If my questions looks like a list ...
#111411 - HyperHacker - Wed Dec 06, 2006 9:22 am
I have no experience with 3D on the DS, but here's how glBlendFunc works on just about everything.
_________________
I'm a PSP hacker now, but I still <3 DS.
#111453 - Payk - Wed Dec 06, 2006 6:49 pm
* To make an object tranparent, do I need a texture format like A3I5 ?
Well u could use this textureformat in order to get certain parts of a texture semi-transparent. And that even with different factors. If you simply want to make an entiry object transparent you dont need that.
* What is the poly id ? Is is a kind of depth sorting or priority ?
PolyID seems to be used for the rasterengine. It can be used to give objects outline borders or to have some semi transparent layers behind each other. In first case its not an piority. In second case i guess its like that (not 100% sure...but i used it for that too. just forget about that)
* What is the poly alpha ? Is it the transparent value of a poly ?
POLY_ALPHA(10) is more transparent then POLY_ALPHA(30).
0 is invisible and 31 isnt transparent. The values between them are transparent values. With that fmt-makro you can simply make all following polys semitransparent without using a texture like A3I5.
* What about the blend functions ?
well glblend must be enabled. the rest i didnt touched.
There is one example with a cube , where one side is semitransparent. U may watch this in devkit examples. Its a NeHe example (NeonHelium)
#111614 - Uncle Vig - Fri Dec 08, 2006 11:00 am
Thanks Guys,
Blending now works correctly ;). I've tried outlines too, and it's correct no problem.
Just a thing or two :
* is there an order to draw polygons (nearest after/before ), because sometimes it looks quite ugly ?
* Altough when using poly_alpha with a different alpha (15), the object is always on front of all others, is that right ? (other object are left with an alpha of 31)
#111618 - Payk - Fri Dec 08, 2006 1:53 pm
well if you use more objects behind each other , all semitransparent u need polyID so that the raster engine knows how to merge the pixels.
If u blend one mesh and have that feeling it looks wrong (the backside overlaps the fronside or something) use culling.
This is a nice bug i noticed on FF3 when enemys disappear. they didnt used culling when blending them (n00bs :) )
Anyway...its too bad that polyID has that many functions...somtimes u dont want a outlineborder but the things needs a different polyid because otherwise it would cause blending bugs...
To the renderdirrection: I tried it out and it didnt made any difference for me. But still i render nearest first, just to be sure.