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,484 guests, and 6 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 2 of 2 1 2
Re: Double-sided Shaders / 2-sided normal [Re: xXxGuitar511] #155591
09/30/07 08:36
09/30/07 08:36
Joined: Sep 2007
Posts: 658
germany
Tiles Offline
User
Tiles  Offline
User

Joined: Sep 2007
Posts: 658
germany
Many thanks for your help. Brings me a few steps further now. But still doesn't work. I surely did something wrong.

Okay, the FX file and its code is clear. I don't think i did something wrong here.

But in which WDL file comes the upper code? I have written it into a file called culloff.wdl for now.



Then i have included this file into my main WDL file.



Now i have given my destination object the No_culling action.



But when i start it i get errors:



Last edited by Tiles; 09/30/07 08:37.

trueSpace 7.6, A7 commercial
Free gamegraphics, freewaregames http://www.reinerstilesets.de
Die Community rund um Spiele-Toolkits http://www.clickzone.de
Re: Double-sided Shaders / 2-sided normal [Re: Tiles] #155592
09/30/07 18:34
09/30/07 18:34
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
You didn't do the action properly. Try this:

Code:

material mat_twoside
{
effect = "twoside.fx";
}

action No_culling
{
my.material = mat_twoside;
}



Last edited by xXxGuitar511; 09/30/07 18:35.

xXxGuitar511
- Programmer
Re: Double-sided Shaders / 2-sided normal [Re: xXxGuitar511] #155593
10/01/07 07:00
10/01/07 07:00
Joined: Sep 2007
Posts: 658
germany
Tiles Offline
User
Tiles  Offline
User

Joined: Sep 2007
Posts: 658
germany
Many thanks. Now it works

Next is to get rid off of the wrong Z-ordering problem ...


trueSpace 7.6, A7 commercial
Free gamegraphics, freewaregames http://www.reinerstilesets.de
Die Community rund um Spiele-Toolkits http://www.clickzone.de
Re: Double-sided Shaders / 2-sided normal [Re: Tiles] #155594
10/01/07 11:59
10/01/07 11:59
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hi,

Quote:

Next is to get rid off of the wrong Z-ordering problem



You could use the Improved Overlay material from the wiki.

Re: Double-sided Shaders / 2-sided normal [Re: Fenriswolf] #155595
10/01/07 12:13
10/01/07 12:13
Joined: Sep 2007
Posts: 658
germany
Tiles Offline
User
Tiles  Offline
User

Joined: Sep 2007
Posts: 658
germany
I could. And i have. Just to find out that it kills my soft transitions of my alphachannel. Now that looks crap ...

Besides the fact that it didn't change my Z- ordering problems. Strange but true


trueSpace 7.6, A7 commercial
Free gamegraphics, freewaregames http://www.reinerstilesets.de
Die Community rund um Spiele-Toolkits http://www.clickzone.de
Re: Double-sided Shaders / 2-sided normal [Re: Tiles] #155596
10/01/07 14:44
10/01/07 14:44
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
...Whats it for? Hair?

If so, I have some code I could post for you. What you do is render the backfaces first, then render it again with the front faces. Rendering it once won't blend properly...


xXxGuitar511
- Programmer
Re: Double-sided Shaders / 2-sided normal [Re: xXxGuitar511] #155597
10/01/07 16:35
10/01/07 16:35
Joined: Sep 2007
Posts: 658
germany
Tiles Offline
User
Tiles  Offline
User

Joined: Sep 2007
Posts: 658
germany
It's mainly for vegetation like this trees. This shot is from my rendersoftware:



As you can imagine, looks not this good when the branches in the back are rendering in front of the trunk


trueSpace 7.6, A7 commercial
Free gamegraphics, freewaregames http://www.reinerstilesets.de
Die Community rund um Spiele-Toolkits http://www.clickzone.de
Re: Double-sided Shaders / 2-sided normal [Re: Tiles] #155598
10/01/07 17:59
10/01/07 17:59
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Same concept as my hair shader. Here's something similar, not sure if it's right. If it doesn't work, then I'll post the actual code.

NOTE: For the FX file

Code:

technique twoside
{
pass p1
{
// Render back faces
cullmode = cw;
alphaBlendEnable = true;
alphaTestEnable = true;
zWriteEnable = true;
}
pass p2
{
// Render front faces
cullmode = ccw;
alphaBlendEnable = true;
alphaTestEnable = true;
zWriteEnable = true;
}
}




xXxGuitar511
- Programmer
Re: Double-sided Shaders / 2-sided normal [Re: xXxGuitar511] #155599
10/02/07 07:13
10/02/07 07:13
Joined: Sep 2007
Posts: 658
germany
Tiles Offline
User
Tiles  Offline
User

Joined: Sep 2007
Posts: 658
germany
Now we have a winner. This works perfect. Many thanks


trueSpace 7.6, A7 commercial
Free gamegraphics, freewaregames http://www.reinerstilesets.de
Die Community rund um Spiele-Toolkits http://www.clickzone.de
Page 2 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