Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, Quad), 935 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
grass problem? #271476
06/13/09 11:56
06/13/09 11:56
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
okay i have a grass alpha transparency script. Only problem is it has a clip range on it or something.the shader works when grass models are within a certain range/distance from the camera...
the models outside are clipped(sorta) theyre still theyre but its like a LOD has been added...I have no LOD's setup...so i dont understand why this is happening...
heres a picture of what im talking about

Code:
 

function init_mat_obj()
{	
	vec_set(mtl.emissive_blue,mat_model.emissive_blue);
	vec_set(mtl.ambient_blue,vector((d3d_fogcolor1.blue/2)+(mat_model.ambient_blue),(d3d_fogcolor1.green/2)+(mat_model.ambient_green),(d3d_fogcolor1.red/2)+(mat_model.ambient_red)));
	vec_set(mtl.diffuse_blue,mat_model.diffuse_blue);
	vec_set(mtl.specular_blue,mat_model.specular_blue);
	mtl.power = 0.3;//mat_model.power;
	mtl.albedo = 200;//mat_model.albedo;   
}




MATERIAL* mat_alphatrans_obj =
{

	event = init_mat_obj;

	effect = 
	"
	extern texture entSkin1;

	technique alphaTestMaterial
	{
		//				pass p0{
			//						
			//						zEnable = true;
			//						zWriteEnable=true;
			//						AlphaBlendEnable=false;
			//						alphaTestEnable=true;
			//						AlphaFunc=greater;
			//						AlphaRef=150;///////////////transparency threshold!
			//						cullMode=ccw;
		//				}
		
		
		pass p0
		{
			alphaBlendEnable = false;
			alphaTestEnable = true;
			zWriteEnable = true;
			AlphaRef=140;
		}
		pass p1
		{
			alphaBlendEnable = true;
			alphaTestEnable = false;
			zWriteEnable = false;
			zFunc = less;
		}
	}

	technique fallback
	{
		pass p0{
		Texture[0]=<entSkin1>;}
	}
	";
}




LINK:
Html:
http://s176.photobucket.com/albums/w172/boberic/?action=view&current=huh.jpg 


Last edited by not_me; 06/13/09 12:00.

-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: grass problem? [Re: not_me] #272185
06/16/09 20:37
06/16/09 20:37
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
*bump* anyone? it looks like its clipping off the alpha channel...

Last edited by not_me; 06/16/09 20:39.

-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: grass problem? [Re: not_me] #274906
06/29/09 06:33
06/29/09 06:33
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
*BUMP* is ther no one who can help me figure this out? I need a knight in shining armor...I've been trying for weeks to fix this. I cant wrap my brain around it...


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: grass problem? [Re: not_me] #276454
07/05/09 05:57
07/05/09 05:57
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
Is there no one that can help me solve this problem..??


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: grass problem? [Re: not_me] #276458
07/05/09 06:50
07/05/09 06:50
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Add mip map will help I guess... Use bmap_to_mipmap, sorry I forgot the whole code, but you can find it in the manual.

Re: grass problem? [Re: bart_the_13th] #284375
08/13/09 04:35
08/13/09 04:35
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
okay so i did some experimenting and found that its not the code for the grass. It has something to do wither with the multi terrain texturing script or the textures used....i dont know yet. still looking into it.


-Initiate Games
-Level designer

http://www.sckratchmagazine.com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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