3 registered members (AndrewAMD, VoroneTZ, 1 invisible),
1,529
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
TGA problem with tree model
#65044
02/26/06 19:03
02/26/06 19:03
|
Joined: May 2005
Posts: 107 Latvia
raymich
OP
Member
|
OP
Member
Joined: May 2005
Posts: 107
Latvia
|
hey everybody i searched whole 3dgs websites, everybody simply says: use TGA, use TGA 32 bit or add new aplha layer i did that all, but nothing helps, TGA images just gets yellow or inverted, but not transparent. This is my tree model with simple BMP and opacity flag, pff the tree itself is "cut" in peaces, but there is no black color there! and leaves are black greened *this is the best result i could get, cuz as i said TGA doesnt work i have 3dgs a6 and my videocard is ati x600 here's an image: ![](http://www.raymix.net/sigs/alpha.JPG)
|
|
|
Re: TGA problem with tree model
[Re: raymich]
#65045
02/26/06 19:14
02/26/06 19:14
|
Joined: Oct 2003
Posts: 2,628 IL,US
FeiHongJr
Expert
|
Expert
Joined: Oct 2003
Posts: 2,628
IL,US
|
I think this is a sorting issue. You have to use the code on the wiki for improved overlay to get rid of this. The wiki link is on the bottom of the page. User/pass is right in the picture ![](/ubbthreads/images/graemlins/wink.gif) Its under programmersDataBase>shaders scroll down to fixed-function effects its the first one in that catagory.
Last edited by FeiHongJr; 02/26/06 19:17.
|
|
|
Re: TGA problem with tree model
[Re: FeiHongJr]
#65046
02/26/06 19:21
02/26/06 19:21
|
Joined: May 2005
Posts: 107 Latvia
raymich
OP
Member
|
OP
Member
Joined: May 2005
Posts: 107
Latvia
|
thanks i will check it out so i decided to post my TGA results (before i check FeiHongJr's link) this is 32-Bit tga pictures (tree and leaves merged) with extra alpha channel (from conitec's user manual's guide) ![](http://www.raymix.net/sigs/tgaalpha.JPG) and this is my leaves 32-bit TGA with extra layer (50% opacity and black/default). I am using Photoshop CS2 ![](http://www.raymix.net/sigs/leaves.JPG)
|
|
|
Re: TGA problem with tree model
[Re: raymich]
#65047
02/26/06 19:34
02/26/06 19:34
|
Joined: May 2005
Posts: 107 Latvia
raymich
OP
Member
|
OP
Member
Joined: May 2005
Posts: 107
Latvia
|
this is 32-bit TGA version with no extra alpha channel i am just confused what to do i am making this tree in 3dsmax and then exporting to 3ds format, wich i am importing into med and saving as mdl. What am i doing wrong? ![](http://www.raymix.net/sigs/tganoalpha.JPG)
Last edited by raymich; 02/26/06 19:35.
|
|
|
Re: TGA problem with tree model
[Re: raymich]
#65048
02/26/06 19:44
02/26/06 19:44
|
Joined: Mar 2005
Posts: 969 ch
Loopix
User
|
User
Joined: Mar 2005
Posts: 969
ch
|
Use this (material)action for your tree (place your tree a little above the ground...it will stick into the ground automaticaly): Code:
function mtl_vegetation_init { vec_set(mtl.emissive_blue,mat_model.emissive_blue); vec_set(mtl.ambient_blue,mat_model.ambient_blue); vec_set(mtl.diffuse_blue,mat_model.diffuse_blue); vec_set(mtl.specular_blue,mat_model.specular_blue); mtl.power=mat_model.power; mtl.albedo=mat_model.albedo; mtl.skill1=pixel_for_vec(vector(128,0,0),0,8888); // the first value in the vector is the threshold }
material mtl_vegetation { event=mtl_vegetation_init; effect= " texture entSkin1; dword mtlSkill1;
technique vegetation { pass p0 { Texture[0]=<entSkin1>; ZWriteEnable=True; AlphaBlendEnable=False; AlphaTestEnable=True; AlphaRef=<mtlSkill1>; AlphaFunc=Greater; CullMode=None; // CCW when sigle sided polys, or None when double sided polys
ColorArg1[0]=Texture; ColorOp[0]=Modulate2X; ColorArg2[0]=Diffuse; } } technique fallback{pass p0{}} "; }
action tree {
my.material=mtl_vegetation; vec_set (temp, my.pos); temp.z -= 10000; trace_mode = ignore_me + ignore_sprites + ignore_models + ignore_you; my.z -= trace (my.pos, temp) + 10; // set the correct height (the bottom of the model will sink 10 quants into the soil).
}
|
|
|
Re: TGA problem with tree model
[Re: Loopix]
#65049
02/26/06 19:56
02/26/06 19:56
|
Joined: May 2005
Posts: 107 Latvia
raymich
OP
Member
|
OP
Member
Joined: May 2005
Posts: 107
Latvia
|
ok, so this is results with all types of TGA using: wiki's code: ![](http://www.raymix.net/sigs/tgaalltests.JPG) and your code: ![](http://www.raymix.net/sigs/tgaalltests2.JPG) could that be a problem that i am exporting from 3dsmax8 to 3ds file?
Last edited by raymich; 02/26/06 19:57.
|
|
|
Re: TGA problem with tree model
[Re: raymich]
#65050
02/26/06 20:10
02/26/06 20:10
|
Joined: Jun 2005
Posts: 4,875
broozar
Expert
|
Expert
Joined: Jun 2005
Posts: 4,875
|
Quote:
could that be a problem that i am exporting from 3dsmax8 to 3ds file?
possibly. max5 didnīt export the alpha channel, even if you checked the necessary box. i suggest you reload the skin in MED (just med->skin editor->import->your tga) and it should work.
|
|
|
Re: TGA problem with tree model
[Re: raymich]
#65052
02/26/06 20:31
02/26/06 20:31
|
Joined: Jun 2005
Posts: 4,875
broozar
Expert
|
Expert
Joined: Jun 2005
Posts: 4,875
|
Quote:
yeh, but then i will need to realign every face.
wrong you donīt need to re-skin it. just to reload the texture.
|
|
|
Re: TGA problem with tree model
[Re: broozar]
#65053
02/26/06 21:00
02/26/06 21:00
|
Joined: May 2005
Posts: 107 Latvia
raymich
OP
Member
|
OP
Member
Joined: May 2005
Posts: 107
Latvia
|
ok, reloading skin helped me to get this far the tree u see is with extra alpha layer (black 50%) and there is another one invisible without extra layer, just RGB still doesn work ![](/ubbthreads/images/graemlins/laugh.gif) basicly what happens is, it removes few spots of my tree, wich isnt black actually and leaves stays untouched.. there is 2 tga pictures merged together, but now after reloading skin its one, but still doestn work ![](http://www.raymix.net/sigs/reloaded.JPG) and this is look from my photoshop, as you can see, black is at 0,0,0 0,0,0 ![](http://www.raymix.net/sigs/ps.jpg)
Last edited by raymich; 02/26/06 21:02.
|
|
|
|