Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, Ayumi, VHX, monarch), 1,161 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Komisches Problem mit Alpha Textur #368838
04/28/11 19:59
04/28/11 19:59
Joined: Apr 2011
Posts: 5
Germany
Braindrain85 Offline OP
Newbie
Braindrain85  Offline OP
Newbie

Joined: Apr 2011
Posts: 5
Germany
Hab n Problem mit meinem Charakter Model.

Wenn ich eine 32 Bit TGA drauflege dann erscheint es so komisch durchsichtig. Mit ner 24 Bit Textur funktionierts.
Aber ohne Alpha sehn die Haare scheiße aus. Weiß jemand ne Lösung?

http://img695.imageshack.us/i/rrhy.jpg/

Re: Komisches Problem mit Alpha Textur [Re: Braindrain85] #368843
04/28/11 20:24
04/28/11 20:24
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
Z-Sorting...

du brauchst mal eine "Alpha Test Material" oder auch "improved Overlay" genannt... weise dieses mal deinem Model zu, dann sollte es funktionieren.

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=CCW; // CCW or None

			ColorArg1[0]=Texture;
			ColorOp[0]=Modulate2X;
			ColorArg2[0]=Diffuse;
		}
	}
	technique fallback{pass p0{}}
	";
}

action vegetation //diese Action deinem Model geben.
{
	my.transparent=off;
	my.flare=off;
	my.material=mtl_vegetation;
}


Gruß Sebastian

Edit: Schönes Model ! finde die Version mit den "Glupschaugen" aber auch ganz schön tongue

Last edited by rvL_eXile; 04/28/11 20:25.

Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: Komisches Problem mit Alpha Textur [Re: rvL_eXile] #368923
04/29/11 15:42
04/29/11 15:42
Joined: Apr 2011
Posts: 5
Germany
Braindrain85 Offline OP
Newbie
Braindrain85  Offline OP
Newbie

Joined: Apr 2011
Posts: 5
Germany
Super, danke! Funzt perfekt. laugh Hab nur AlphaBlendEnable auf True gesetzt.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1