Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 793 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Shadows on terrain? #104482
12/30/06 21:47
12/30/06 21:47
Joined: Aug 2005
Posts: 155
USA San Diego CA
Scramasax Offline OP
Member
Scramasax  Offline OP
Member

Joined: Aug 2005
Posts: 155
USA San Diego CA
Can models cast shadows on terrain, or other models?


www.moxiefish.com George Lancaster
Re: Shadows on terrain? [Re: Scramasax] #104483
12/30/06 21:50
12/30/06 21:50
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Can you read the manual, please?

No offense. But it's really all answered in there


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Shadows on terrain? [Re: Thomas_Nitschke] #104484
12/30/06 22:20
12/30/06 22:20
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
yes and no

Re: Shadows on terrain? [Re: Damocles] #104485
12/30/06 22:30
12/30/06 22:30
Joined: Aug 2005
Posts: 155
USA San Diego CA
Scramasax Offline OP
Member
Scramasax  Offline OP
Member

Joined: Aug 2005
Posts: 155
USA San Diego CA
I used:
var shadow_stencil = on; in the main script,
and turned on cast on my terrain (mdl) generated using icex2, but no shadow.

PS(turned on shadow on the test entity)


www.moxiefish.com George Lancaster
Re: Shadows on terrain? [Re: Scramasax] #104486
12/30/06 23:28
12/30/06 23:28
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
There should be no need to set "cast" on the terrain entity. If I'm not completely mistaken, "cast" prevents stencil shadows from being rendered onto an object, thus everything should work just fine if you simply disable that flag...


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Shadows on terrain? [Re: Thomas_Nitschke] #104487
01/01/07 19:36
01/01/07 19:36
Joined: Aug 2005
Posts: 155
USA San Diego CA
Scramasax Offline OP
Member
Scramasax  Offline OP
Member

Joined: Aug 2005
Posts: 155
USA San Diego CA
Has anyone gotten a shadow to cast using the ice X editor?

Could it be this script that iceX generates?

Code:
  
technique ffp_terrain_tex
{

pass P0
//////////////////////////////////////////////////////
//// Lets lay the first TEXTURE down. no alpha work
//// This will tile across the entire HMP
//////////////////////////////////////////////////////
{

alphablendenable=false;
alphatestenable=false;
//zenable=true;
//zwriteenable=true;

////////////////////////////////////////
// Stage 0
///////////////////////////////////////

TEXTURE[0] = <mtlSkin4>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;

zenable=true;
zwriteenable=true;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;


TEXTURETransformFlags[0] = Count2;
TextureTransform[0]=<matMtl>;
texcoordindex[0]=1;

COLORARG1[0] = TEXTURE;
ColorOp[0] = MODULATE;
ALPHAARG1[0] = CURRENT | ALPHAREPLICATE;
alphaop[0]=disable;

//////////////////////////////////////
//stage 1
//////////////////////////////////////

colorop[1]=disable;
alphaop[1]=disable;

}

pass P1
//////////////////////////////////////////////////////
//// Now we blend another TEXTURE using an alphamap
//// This TEXTURE will be blended
//////////////////////////////////////////////////////
{

//////////////////////////////////////
// Stage 0 - Setup the alphamap
//////////////////////////////////////

// We need to enable alphablending
alphablendenable=true;
srcblend=srcalpha;
destblend=invsrcalpha;

// AlphaTestEnable uses the AlphaRef and AlphaFunc to
// determine which pixels get drawn.
// In this case, anything greater that 0 will be drawn.
alphatestenable=true;
alpharef=0x00000000; //Reference Value
alphafunc=Greater; //Comparison Function

TEXTURE[0] = <entSkin1>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;

//
// We don't want the alphamap to tile
//
TEXTURETransformFlags[0] = disable;

texcoordindex[0]=0;

COLORARG1[0] = CURRENT;
ColorOp[0] = SELECTARG1;
ALPHAARG1[0] = TEXTURE | ALPHAREPLICATE;
alphaop[0]=selectarg1;

//////////////////////////////////////////////
// Stage 1 -- This is the TEXTURE to splat
//////////////////////////////////////////////

TEXTURE[1] = <mtlSkin1>;


// Zenable is supposed to default to true.
// This enables depth testing to determine what pixels
// are visible to the viewer

//zenable=true;
//zwriteenable=true;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;


TEXTURETransformFlags[1] = Count2;
TextureTransform[1]=<matMtl>;
texcoordindex[1]=1;

COLORARG1[1] = TEXTURE;
ColorOp[1] = MODULATE;
ALPHAARG1[1] = CURRENT | ALPHAREPLICATE;
alphaop[1]=disable;

///////////////////////////////////////////////
// Stage 2
///////////////////////////////////////////////
colorop[2]=disable;
alphaop[2]=disable;


}

pass P2
////////////////////////////////////////////////////
//// A ditto of Pass p1 but with different a different
//// TEXTURE and alphamap
///////////////////////////////////////////////////
{

////////////////////////////////////////
// Stage 0
////////////////////////////////////////

alphablendenable=true;
srcblend=srcalpha;
destblend=invsrcalpha;
alphatestenable=true;
alpharef=0x00000000;
alphafunc=Greater;

TEXTURE[0] = <entSkin2>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;


TEXTURETransformFlags[0] = disable;

texcoordindex[0]=0;

COLORARG1[0] = CURRENT;
ColorOp[0] = selectarg1;
ALPHAARG1[0] = TEXTURE | ALPHAREPLICATE;
alphaop[0]=selectarg1;

/////////////////////////////////////////
// Stage 1
/////////////////////////////////////////
TEXTURE[1] = <mtlSkin2>;

//zenable=true;
//zwriteenable=true;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;


TEXTURETransformFlags[1] = Count2;
TextureTransform[1]=<matMtl>;
texcoordindex[1]=1;

COLORARG1[1] = TEXTURE;
ColorOp[1] = modulate;
ALPHAARG1[1] = CURRENT | ALPHAREPLICATE;
alphaop[1]=disable;

////////////////////////////////////////
// Stage 2
////////////////////////////////////////
colorop[2]=disable;
alphaop[2]=disable;

} // End of Pass P2


pass P3
////////////////////////////////////////////////////
//// A ditto of Pass p1 but with different a different
//// TEXTURE and alphamap
///////////////////////////////////////////////////
{

////////////////////////////////////////
// Stage 0
////////////////////////////////////////

alphablendenable=true;
srcblend=srcalpha;
destblend=invsrcalpha;
alphatestenable=true;
alpharef=0x00000000;
alphafunc=Greater;

TEXTURE[0] = <entSkin3>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;


TEXTURETransformFlags[0] = disable;

texcoordindex[0]=1;

COLORARG1[0] = CURRENT;
ColorOp[0] = selectarg1;
ALPHAARG1[0] = TEXTURE | ALPHAREPLICATE;
alphaop[0]=selectarg1;

/////////////////////////////////////////
// Stage 1
/////////////////////////////////////////
TEXTURE[1] = <mtlSkin3>;

//zenable=true;
//zwriteenable=true;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;


TEXTURETransformFlags[1] = Count2;
TextureTransform[1]=<matMtl>;
texcoordindex[1]=0;

COLORARG1[1] = TEXTURE;
ColorOp[1] = modulate;
ALPHAARG1[1] = CURRENT | ALPHAREPLICATE;
alphaop[1]=disable;

////////////////////////////////////////
// Stage 2
////////////////////////////////////////
colorop[2]=disable;
alphaop[2]=disable;

} // End of Pass P3

pass p4
{
alphablendenable=true;
srcblend=zero;
destblend=srccolor;
//zenable=true;
// zwriteenable=true;
ditherenable=true;
COLORARG1[0] = DIFFUSE;
ColorOp[0] = Modulate2x;
ColorArg2[0] = Current;
alphaop[0]=disable;

Texture[1] = <entSkin4>;
magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;
COLORARG1[1] = TEXTURE;
ColorOp[1] = Modulate2x;
TexCoordIndex[1]=0;
TextureTransformFlags[1]=Count2;
TextureTransform[1]=
{
1.0,0.0,0.0,0.0,
0.0,1.0,0.0,0.0,
0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0
};
}
} // End of Technique




Thanx for any help in advance.


www.moxiefish.com George Lancaster
Re: Shadows on terrain? [Re: Scramasax] #104488
01/01/07 19:47
01/01/07 19:47
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Didn't you read my previous post? Why don't you try simply setting "my.cast = off" for the terrain?
Of course you may do whatever you want but if you already tried my advice, please leave a note here. I would feel a little less ignored


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Shadows on terrain? [Re: Thomas_Nitschke] #104489
01/01/07 20:36
01/01/07 20:36
Joined: Aug 2005
Posts: 155
USA San Diego CA
Scramasax Offline OP
Member
Scramasax  Offline OP
Member

Joined: Aug 2005
Posts: 155
USA San Diego CA
Oh I'm not ignoring you, it simply didn't work. I thank you for your help though.

Code:
  
action icx_terrain
{
my.material=mtl_terrain_multitex;
my.polygon=on;
c_updatehull(my,1);
my.cast =off;
}



I put two bipeds in and saw the shawdow casting on the other ped, but not on the iceX generated terrain.


www.moxiefish.com George Lancaster
Re: Shadows on terrain? [Re: Scramasax] #104490
01/02/07 02:45
01/02/07 02:45
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
I havent tried the iceX generated terrain yet,but since the shadow are cast
on other peds,so it seems it could be because the iceX terrain does not support
dynamic shadows...you could try using the A6 template multitexture terrain code and see if it works

Re: Shadows on terrain? [Re: zazang] #104491
01/03/07 16:57
01/03/07 16:57
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Scramasax: Hehe okay - just what I wanted to know. It's better to get feedback like "it didn't work" than getting no feedback at all. Most people want to know whether or not their advice was useful, including myself


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Page 1 of 2 1 2

Moderated by  HeelX, rvL_eXile 

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