this is facts that i found regarding to your question about cockpit view mode's transparent texture. my answers is
possible with some exceptions so far. what i've been found is the facts that gp4 using z-buffer technique for rendering transparent texture. this is doesn't mean you just simply adjust the alpha part of the texture because z-buffer technique using alpha part of
diffuse color from the material for this purpose. z-buffer also require alpha blending should be enabled during render stage.
for clarity, i try to describe how gp4 works to rendering transparent texture for 3d shapes. first, gp4 detect any shapes with material's diffuse alpha value is 1.000 (opaque), then render the shapes. second, gp4 detect any shapes with material's diffuse alpha value is less than 1.000 (non-opaque), then render the shapes. the code logic is similar like this:
--- code ---
// enable alpha blending for current render stage
set alphablend true
// render any opaque objects
for loop = 1 to numobjects
begin
if (object[loop].material.diffuse.alpha = 1.0000)
then render(object[loop].mesh)
end
// render any non-opaque objects
for loop = 1 to numobjects
begin
if (object[loop].material.diffuse.alpha < 1.0000)
then render(object[loop].mesh)
end
// disable alpha blending
set alphablend false
--- code ---
the code logic above commonly used in directx programming to render any shapes which contains opaque and transparent objects. unfortunately, i found a fact that .gp4 format does not store alpha part of diffuse color in material properties. the alpha part for diffuse color is assigned from within the gp4 codes. this is a code logic i found in gp4 codes which modify the material properties for
z_cockpit_visor object for all car shapes:
--- code ---
if (object[loop].name = 'z_cockpit_visor'
then
begin
object[loop].material.diffuse.red = 1.0000
object[loop].material.diffuse.green = 1.0000
object[loop].material.diffuse.blue = 1.0000
object[loop].material.diffuse.alpha = 0.3000
end
--- code ---
i refer to
z_cockpit_visor object because this is one of car shape's object that i know produce transparent texture while rendering. now i hope you understand why transparent texture is so difficult to produce by just changing any values in .gp4 file. the transparency part in material also does not affect to car shapes (it is perhaps for track shapes).
now we talk about the possibilities for applying transparent texture to any shapes. earlier in this topic i said
"possible with some exceptions". i experimenting in .gp4 file for car shapes by swapping 'z_cockpit_visor' object name with another, i.e. 'upper_rear_wing' object name. this produce the upper rear wing shape becoming transparent with a small shade (but the texture seems changed). i realize the cockpit visor is still transparent but no shade anymore just completely 100% transparent (this effect must be seen toward car direction). this result make me think that transparent texture is possible to be applied but i don't know if it just produce 100% transparent or we can control the amount of shade from texture's alpha part. i'm sure this is not just limited to car shapes but must also be done with cockpit shapes.
and one thing that could be important. gp4 always using 'visorspecmap.tex' texture to combine the way z-buffer produce transparent shape during alpha blending stage. if i remove this texture assignment from 'z_cockpit_visor' object (from within gp4 codes) then cockpit visor rendered as 100% opaque texture.
in other thread you were said about transparent driver's view helmet visor. this visor can be viewable transparent by adjusting the alpha part of the texture because helmet visor is not part of 3d shapes. helmet visor is simply 2d sprite texture drawn by directdraw engine, not by direct3d engine. controlling transparent texture in sprite texture is far easier than in 3d environment. however, too many sprites drawn on your screen my drops your PO.
and here some terms in this topic that perhaps you or anyone does not perfectly clear. z-buffer is special buffer controlled by 3d engine (in this subject refer to directx and graphics driver) to emulate depth of 3d environment mapped to 2d monitor screen. cockpit visor is a small windshield located near steering-wheel. another terms i've been used is beyond the scope of this topic, but feel free to ask.
ps;
if i found some new interesting, i'll inform you to this forum.
ch88rs,
madman
In reality, doesn't matter who's
right but most important is who's
left.