Gamestudio Links
Zorro Links
Newest Posts
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
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
4 registered members (AndrewAMD, 7th_zorro, VoroneTZ, HoopyDerFrood), 1,264 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Smee2.0 Glass shader problem #60491
12/13/05 10:27
12/13/05 10:27
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline OP
Member
zwecklos  Offline OP
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi all!
Ive worked out a nice glass shader with smee 2.0. It looks very nice and im very happy with it.
A little problem is, when I get close to a window that is next to another window, I get strange errors...



At this picture its still ok, but when I go a bit closer to the window the door suddendly disappears...



surely it has something to do with the shader, Ive got following code by smee:

WDL FILE:
Code:



// section: Images
// entry: mtlSkin0
bmap fenster_mtlSkin0 = <fenster_2fl_spec.tga>;
// entry: mtlSkin1
bmap fenster_mtlSkin1 = <specular_box+6.tga>;
// entry: mtlSkin2
bmap fenster_mtlSkin2 = <fenster_2fl_op.tga>;


material fenster
{
skin1 = fenster_mtlSkin0;
skin2 = fenster_mtlSkin1;
skin3 = fenster_mtlSkin2;

ambient_red = 187.764;
ambient_green = 187.764;
ambient_blue = 187.764;
diffuse_red = 255;
diffuse_green = 255;
diffuse_blue = 255;
specular_red = 0;
specular_green = 0;
specular_blue = 0;
emissive_red = 0;
emissive_green = 0;
emissive_blue = 0;
albedo = 49.805;
power = 0;



effect = "fen01.fx";
}

action SHADER_fenster_1
{
fenster1 = my;
fenster1.material = fenster;
}

starter init_fenster()
{
bmap_to_cubemap(fenster_mtlSkin1);
}




FX FILE
Code:
 

extern texture entSkin1;
extern texture entSkin2;
extern texture entSkin3;
extern texture entSkin4;
extern texture mtlSkin1;
extern texture mtlSkin2;
extern texture mtlSkin3;
extern texture mtlSkin4;

extern float4x4 matMtl;
extern float4x4 matViewInv;

technique fenster //Author: ME
{
pass p0
{
ZWriteEnable = true;
AlphaBlendEnable = true;
//TEXTURE STAGE [0]
Texture[0] = <entSkin1>;
}
pass p1
{
DestBlend = DestColor;
//TEXTURE STAGE [0]
Texture[0] = <mtlSkin1>;
TextureTransformFlags[0] = Disable;
//TEXTURE STAGE [1]
Texture[1] = <mtlSkin2>;
ColorOp[1] = Modulate;
TextureTransform[1] = <matViewInv>;
TextureTransformFlags[1] = Count3;
TexCoordIndex[1] = cameraSpaceReflectionVector;
//TEXTURE STAGE [2]
Texture[2] = <mtlSkin3>;
}
};




Does anyone know this problem? I would be very thankfull for a hint or a tip where I have to go to solve this problem.

cheers

Zwecklos

Re: Smee2.0 Glass shader problem [Re: zwecklos] #60492
12/13/05 18:05
12/13/05 18:05

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Since your post relates to SMEE 2.0, you will get a better feedback in the SMEE 2.0 forum in here:

www.smee2editor.com

Re: Smee2.0 Glass shader problem #60493
12/14/05 03:12
12/14/05 03:12
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
That's an engine issue, or issue with your PC, but not from SMEE. The generated shader is fine, it's a very standard effect. What video card are you running on? Version of A6?

Edit: Please post the contents of fen01.fx


--Eric
Re: Smee2.0 Glass shader problem [Re: Nadester] #60494
12/14/05 07:16
12/14/05 07:16
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
Quote:

...Edit: Please post the contents of fen01.fx



*g

he already did:)

Re: Smee2.0 Glass shader problem [Re: ello] #60495
12/14/05 11:17
12/14/05 11:17
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline OP
Member
zwecklos  Offline OP
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi thanks for the answers,
Im using A6 Pro 6.3 on a Gforce 6800 256MB on a Win XP Pro SP 2.
The shader has the same problems on a Radeon 9800 XT 256MB.

I dont know how to solve this problem, Im going to test a little more in Smee I hope to find a solution. I will tell you guys when I get it.

cheers

Zwecklos

Re: Smee2.0 Glass shader problem [Re: zwecklos] #60496
12/14/05 12:03
12/14/05 12:03
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline OP
Member
zwecklos  Offline OP
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Ive discovered that the problem only shows up when the entity behind the glass has a shader on it.
Maybe I did something wrong with my glass shader? I think it has something to do with the "cameraSpaceReflectionVector". With this I get the nice metal shining effect that is related to the camera view.
Another strange thing is, the problem only shows up when the camera is near a corner or near level blocks, Ive putted the door in the middle of a window and then it works fine. It seems that level blocks are related to this problem.

any ideas?

cheers

Zwecklos

Re: Smee2.0 Glass shader problem [Re: zwecklos] #60497
12/14/05 18:23
12/14/05 18:23
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Play with the settings on ZEnable and ZWriteEnable a little bit. This is probably your problem.

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: Smee2.0 Glass shader problem [Re: Rhuarc] #60498
12/15/05 11:01
12/15/05 11:01
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline OP
Member
zwecklos  Offline OP
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi Rhuarc,
I also thought that it has something to do with ZEnable/ZWriteEnable, I was playing around with those settings for hours.
Ive found another problem that maybe is related to the disapearing door problem.


At this picture I can see trough the glass and im able to see both door handles.



At this picture, the door handle on the other side of the door isnt visible.



Note that is the same model with the same shader only from a diffrent view. Its the same thing in 3dgs. Sometimes I can see both door handles and sometimes not, however it has something to do with the camera view on the model.

any ideas?

cheers

Zwecklos

Re: Smee2.0 Glass shader problem [Re: zwecklos] #60499
12/15/05 11:28
12/15/05 11:28
Joined: Sep 2005
Posts: 235
Switzerland - Zurich
sinnlos Offline
Member
sinnlos  Offline
Member

Joined: Sep 2005
Posts: 235
Switzerland - Zurich
Hi there...

im a friend of zwecklos...i want to give more information on the model:

-the model has a entskin1 with a diffuse map and in the alpha channel an opacity map.
-one mtlskin with a specular map (not grayscale- only an alphamap to define metal parts)
-and another mtlskin with the reflection map for metalparts (cubemap)
-on the UV-Map the glass parts share the same UV-Space... (is that maybe the problem?)
-the door is animated... since u only can see the back door handle through the not animated window-glas could that be the problem?

i hope this helps a little bit


Cheers

Sinnlos

Re: Smee2.0 Glass shader problem [Re: sinnlos] #60500
12/15/05 11:33
12/15/05 11:33
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
Quote:

im a friend of zwecklos..




how else could it be , what a funny community


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

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