I've written a fully working .x exporter, except for *1* stupid little thing that doesn't seem to make any sense at all :/
I'm using the MeshVertexColors{RGBA} chunk to define the color and *alpha* of each vertex in the mesh. The color shows up just fine (so I **KNOW** the data is getting into the engine), but the alpha just refuses to show itself.
This isn't the good old EntityFX(mesh,34) problem, and I've tried it in several different non-Blitz engines with the same result - color is there but alpha ignored.
On my quest for an answer I came upon this page :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_m/directx/direct3d/gettingstarted/direct3drendering/alphablending/vertexalpha.asp
that states:
Obviously, this is not something you can do in Blitz past EntityFX, but as I mentioned I'm trying to get it working in certain other engines as well.
What I'm really asking is :
a) Is there a way I can force DX (generally) into activating this render state for the given mesh by putting something in my .x file?
b) If not, what is the workaround? I'm pretty sure FredBorg has done it in Gile[s], so perhaps he might comment :) :) :)
c) If somebody could post (or send me) an ASCII .x mesh exported from Gile[s] that I can study that would be great - a single triangle would be ideal, provided it has vertex alpha on at least one vert.
I tried Ultimate Unwrap. It DOES export the alpha values, just like my exporter. And just like my exporter they don't show up :( This single glitch has cost me days.
I'm using the MeshVertexColors{RGBA} chunk to define the color and *alpha* of each vertex in the mesh. The color shows up just fine (so I **KNOW** the data is getting into the engine), but the alpha just refuses to show itself.
This isn't the good old EntityFX(mesh,34) problem, and I've tried it in several different non-Blitz engines with the same result - color is there but alpha ignored.
On my quest for an answer I came upon this page :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_m/directx/direct3d/gettingstarted/direct3drendering/alphablending/vertexalpha.asp
that states:
To enable vertex alpha, set the device's render state RenderStates.DiffuseMaterialSource to ColorSource.Color1 so that the Microsoft® Direct3D® runtime takes the diffuse value from the diffuse color rather than the material.
Obviously, this is not something you can do in Blitz past EntityFX, but as I mentioned I'm trying to get it working in certain other engines as well.
What I'm really asking is :
a) Is there a way I can force DX (generally) into activating this render state for the given mesh by putting something in my .x file?
b) If not, what is the workaround? I'm pretty sure FredBorg has done it in Gile[s], so perhaps he might comment :) :) :)
c) If somebody could post (or send me) an ASCII .x mesh exported from Gile[s] that I can study that would be great - a single triangle would be ideal, provided it has vertex alpha on at least one vert.
I tried Ultimate Unwrap. It DOES export the alpha values, just like my exporter. And just like my exporter they don't show up :( This single glitch has cost me days.