Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,619 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Env Cube #31538
08/01/04 02:29
08/01/04 02:29
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Is possible to invert the "bmap_to_cubemap(mtl.skin1); " so it can be possible to apply the environment shader to a floor, or plan terrain??

Re: Env Cube [Re: MMike] #31539
08/27/04 18:03
08/27/04 18:03
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Please help me, is it possible to assign a shader effect To a Non Curved Surface??
Like those Shader of environmental Cube, don't work too fine on plane terrain...

Re: Env Cube [Re: MMike] #31540
08/27/04 22:43
08/27/04 22:43
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
You cannot map a cube map on a non-curved surface, but you can add a regular enviromental map (ie just clouds, or the ceiling texture of your level). It still looks pretty good.


--Eric
Re: Env Cube [Re: Nadester] #31541
08/28/04 00:56
08/28/04 00:56
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Really? How?? but does the texture move when my cam moves?? cause what i need to to is like reflexions, but that are on a image , like you look into ice plane, you can see the coulds, and that ..(I guess that is not ...)
Maybe, like you have a road , wet, and I want to Assign a reçlexion texture to the ground but just where the road has water, so i can see the a texture eg sky...
Take a look at those screen shots:


You can see the sky reflexions and some light, But all that is not real reflections, they are Textures that are scrolled when the camera view moves... and they use a alpha channel, so only some points are reflected.. Is this possible????
PLease.!

Re: Env Cube [Re: MMike] #31542
08/28/04 01:31
08/28/04 01:31
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Of course its possible. Just map it with the regular envmap effect, and instead of using cube+6 as the map name use cube. Thats basically how that effect is done. You'll have a single texture that scrolls with the camera on there, instead of a cube mapped. And, of course, that single texture can be clouds.


--Eric
Re: Env Cube [Re: Nadester] #31543
08/28/04 01:43
08/28/04 01:43
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
cube?? not the flag?ehhe
You mean just a normal texture ..?right?? thx

i did , and i got this:


My env shader is:



//bmap bmp_envcube2 = <skycubesun+6.tga>; //cube image
bmap bmp_envcube2 = <water_shader.tga>; //a normal texture 2d

// generate a matrix that transforms camera space back to world space
function mtl_env_view()
{
mat_set(mtl.matrix,matViewInv);
// reset the translation part of the matrix
mtl.matrix41 = 0;
mtl.matrix42 = 0;
mtl.matrix43 = 0;
}

function mtl_env_init()
{
bmap_to_cubemap(mtl.skin1);
mtl.event = mtl_env_view;
mtl.enable_view = on;
}

material mtl_envcube2 // environment cube
{
skin1 = bmp_envcube2;
event = mtl_env_init;
//skin1 = reptile; // set a reptile skin
effect=
"
texture mtlSkin1;
texture texSkin1;
matrix matMtl;
technique cubic_environment
{
pass p0
{
Texture[0]=<texSkin1>;
Texture[1]=<mtlSkin1>;
ColorArg1[0]=Texture;
ColorOp[0]=Modulate2x;
ColorArg2[0]=Diffuse;

ColorArg1[1]=Texture;
ColorOp[1]=AddSigned;
ColorArg2[1]=Current;

AddressU[1]=Clamp;
AddressV[1]=Clamp;
TexCoordIndex[1]=CameraSpaceReflectionVector;
TextureTransformFlags[1]=Count3;
TextureTransform[1]=<matMtl>;
}
}
";

}



action shaders_A6_envcube2
{
my.material = mtl_envcube2;
}

Re: Env Cube [Re: MMike] #31544
08/28/04 16:38
08/28/04 16:38
Joined: Jun 2004
Posts: 20
D
doc123 Offline
Newbie
doc123  Offline
Newbie
D

Joined: Jun 2004
Posts: 20
Hmm I have maybe a litte trick for you... you take a first map with a water shader like this:

bmap waterbump2 = <waterbump.bmp>;
bmap envspec2 = <sky1.tga>; // <skycube+6.tga>;
bmap base2 = <gradient.bmp>;

function mtl_ffpwater2_1()
{

///////////////////////////////////////////////
// Lets make it scroll in some direction
//

mtl.skill1 += time;
mtl.matrix41 = floatd(mtl.skill1,4000);


}

function mtl_ffpwater2_init()
{

mtl.matrix11 = float(1.6);
mtl.matrix22 = float(0.8);

bmap_to_mipmap(mtl.skin1);
bmap_to_mipmap(mtl.skin2);
bmap_to_mipmap(mtl.skin3);

bmap_to_normals(mtl.skin1,0.5);

//bmap_to_cubemap(mtl.Skin2);

mtl.event = mtl_ffpwater2_1;

mtl.enable_view = on;

}


material mtl_ffpwater2
{
skin1=waterbump2;
skin2=envspec2;
skin3=base2;

event = mtl_ffpwater2_init;

effect = "

matrix matMtl;

texture mtlSkin1;
texture mtlSkin2;
texture mtlSkin3;

technique makewater2
{

pass p0
{

Texture[0] = <mtlSkin3>;

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

AddressU[0]=Clamp;
AddressV[0]=Clamp;

ColorArg1[0] = Texture;
ColorOp[0] = modulate;
ColorArg2[0] = diffuse;

alphaop[0]=selectarg1;
alphaarg1[0]=texture;

texcoordindex[0]=1;


Texture[1] = <mtlSkin1>;

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

ColorArg1[1] = Texture;
ColorOp[1] = bumpenvmap;
ColorArg2[1] = current;

TextureTransformFlags[1] = Count2;
TextureTransform[1] = <matMtl>;
Texcoordindex[1]=1;


Texture[2] = <mtlSkin2>;

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

AddressU[2]=Clamp;
AddressV[2]=Clamp;

ColorArg1[2] = Texture;
ColorOp[2] = Add;
ColorArg2[2] = Current;


TextureTransformFlags[2] =count3 | projected;

texcoordindex[2]= cameraspaceposition | 1; // For cubemap use: cameraspacereflectionvector

}

}

technique fallback { pass p0 { } }

";
}



action ffp_water2 {

my.material = mtl_ffpwater2;
}

than... you take a 2nd map (model not textur or skin) over that an on all zone you want show the water reflection you must paint the skin black ... than you make this 2nd model as "overlay" in WED an that its can look like this...

with a street 2nd map its looks better...

an sry for my english ^^

Last edited by doc123; 08/28/04 17:11.
Re: Env Cube [Re: doc123] #31545
08/29/04 22:19
08/29/04 22:19
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Thx for the tips, but i dind't underdtand the (model not texture) thing...
can you explain it a bit more?..
And the ski1.tga is a 2d texture?

Re: Env Cube [Re: MMike] #31546
08/29/04 22:57
08/29/04 22:57
Joined: Jun 2004
Posts: 20
D
doc123 Offline
Newbie
doc123  Offline
Newbie
D

Joined: Jun 2004
Posts: 20
okay .. you take copy at first the skript from me... than you need some texture maybe like this:
gradient.bmp
sky1.tga
waterbump.bmp
and this put you in the where you have your gamedir... than you include the skript in the game/level and than you make two terrainmodel one with the street texture and one with what do you want or leave it black on this black model you do the skript.
The streetmodel you must prepare for overlay effekt you do a blackarea for all you want so see the env effekt...
finally you go in the WED and put the two terain models in it. the Streetmodel over the black terrain. than you activate overlay by the steet model and the action ffp_water2 by the black model ... than build the level an if you make it good this maybe look like my picture or better ^^.... I hope now you understand it..

Re: Env Cube [Re: doc123] #31547
08/30/04 01:15
08/30/04 01:15
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
I see.. but That is a bit.. desnecessary don't you think?
I guess my card doesn't support it.. GEFORCE FX 5600 MB.. weird..
I can play all kind of shaders, ... its a shame A6 can't produce software shaders..

And what about this image??


Does anyone knows.. why it get like that??? When on non shperical surfaces?

Last edited by Unknot; 08/30/04 09:05.
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | 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