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
3 registered members (Ayumi, NewbieZorro, TipmyPip), 13,887 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 4 1 2 3 4
Re: Z-Order problems [Re: JetpackMonkey] #75341
06/14/06 21:04
06/14/06 21:04
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
ever tried the alpha/z material i posted at the very beginning of this thread? --> edit: ah, ic you use EXTRA, so this possibly works only for comm and pro.

Re: Z-Order problems [Re: broozar] #75342
06/15/06 05:31
06/15/06 05:31
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
if you use a model with multiple textures and only one texture has an alpha channel then the whole model with all of its parts gets treated as transparent. couldn't this be the reason?

Re: Z-Order problems [Re: broozar] #75343
06/15/06 06:16
06/15/06 06:16
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
I'm quite sure this is how it works. Use the material DaBro0zar posted. Theres also this if your models transparency is messed up within, usually this is used on your vegatation and the such:

Code:
 
function mtl_plants_int
{
mtl.ambient_red = 220;
mtl.ambient_green = 220;
mtl.ambient_blue = 220;

mtl.diffuse_red = 50;
mtl.diffuse_green = 50;
mtl.diffuse_blue = 50;

mtl.emissive_red = 10;
mtl.emissive_green = 10;
mtl.emissive_blue = 10;

mtl.specular_red = 0;
mtl.specular_green = 0;
mtl.specular_blue = 0;

mtl.albedo = 2;
mtl.power = 0;
mtl.skill1=pixel_for_vec(vector(120,0,0),0,8888); // the first value in the vector is the threshold
}

material mtl_plants
{
event=mtl_plants_int;
effect=
"
texture entSkin1;
dword mtlSkill1;
technique vegetation
{
pass p0
{
Texture[0]=<entSkin1>;
ZWriteEnable=true;
Zenable = true;
AlphaBlendEnable=false;
AlphaTestEnable=True;
AlphaRef=<mtlSkill1>;
AlphaFunc=Greater;
CullMode=CCW; // CCW or None

ColorArg1[0]=Texture;
ColorOp[0]=Modulate2x;
ColorArg2[0]=Diffuse;
}
}
technique fallback{pass p0{}}
";
}




But be wary, if A7 turns out to be DX10 based, FFP will be ommited. In this case you can always set it directly in your shaders:

Code:
 technique t0
{
pass p0 //colormap
{
AlphaBlendEnable=true;
//zwriteenable= true;
zenable = true;
//FogEnable=true;
VertexShader = compile vs_1_0 vs_main0();
PixelShader = compile ps_1_0 ps_main0();
}
}



You'll find that due to A6 being slower when theres multiple entities present, your going to have quite big models. Since transparency is based on origin, this causes some problems(because your ground is multitextured). That's why you need to use some of this code from time-time.

Also, you'll find that once the origin of your models pass your clip ranges, the entire model dissapears! This is really annoying, due to it I have to keep the cliprange high all the time(since roadway is one model, can't split it up or their will be many seams in 3dgs, possibly due to the 1quant inaccuracy I think, cause they are no seams in 3ds Max). Hopefully this will change sometime soon, Octree may solve both problems(will split models to take advantage of Octree, and no more inaccuracy)...

camera.clip_near = 25;
Camera.clip_far = 70000;//150000


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Z-Order problems [Re: JetpackMonkey] #75344
06/15/06 08:04
06/15/06 08:04
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Jetpack_monkey: There's maybe either something wrong with your models, or it's a bug in Gamestudio.

I suppose that you are using 6.40.5. Make sure that the background object is intransparent. Check the DDS texture. Only the DXT1 format is intransparent. All other formats have an alpha channel. As a test, apply a PCX or BMP texture that is certainly intransparent. If this does not solve the problem, please post again.

Re: Z-Order problems [Re: jcl] #75345
06/15/06 10:27
06/15/06 10:27
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Hi all, and thanks for your feedback

Jcl: I've tried both dds dxt1 and bmp for the non-transparent objects, but nothing changes.

Ventilator: these are all single-textured objects.

DaBrooz: Up until today I have been using Extra-- so materials would not help. However I just bought Commercial. After I get it installed I will post if it changes things.

UPDATE: I also tried a piece of new clean geometry with the same texture map on it, and the same problem happens with that too, so it's unlikely that it's the geometry. As I am updating to Commercial sometime today, it will be interesting to see if this phenomenon is an Extra-only problem.

Last edited by Jetpack_Monkey; 06/15/06 11:52.
Re: Z-Order problems [Re: JetpackMonkey] #75346
06/15/06 14:50
06/15/06 14:50
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Try using a BMP or TGA file without alpha channel once to possibly rule out a DDS issue. If you still get it, try making a smaller, simpler test level that has the same symptoms and upload this test level somewhere so it can be tested and looked at by other users.

Since the sort order is dependent on the position of the camera from the origin (quoting from above), and that your screenshots don't show the debug panel so the positions are not known, could you post the screenshots to show the position of the camera?


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Z-Order problems [Re: ulillillia] #75347
06/15/06 14:52
06/15/06 14:52
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Ulillillia: Thanx, but see my last 2 posts! Already tried the different formats

I'll make a little jr. test level though.. good idea

yours,

Re: Z-Order problems [Re: JetpackMonkey] #75348
06/15/06 14:58
06/15/06 14:58
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
The test level doesn't need to be advanced, just enough so that the problem can be replicated and/or seen by others.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Z-Order problems [Re: ulillillia] #75349
06/15/06 20:32
06/15/06 20:32
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
I think we've gotta bug!

When the MDL has the transparent texture as an EXTERNAL texture, the problem happens. Not when it's internal. There ya go, one fresh and delicious bug for the bug bbq!

If you cannot reproduce this (conitec) I can provide you with the mdl and external texture.

Re: Z-Order problems [Re: JetpackMonkey] #75350
06/16/06 07:04
06/16/06 07:04
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Which MDL do you mean - the tree or the background object? If that one contains an external transparent texture, the reason for the problem is clear.

Otherwise it could indeed be a bug. But the external texture alone can not be a reason for the problem. You can send the project to the support - please not only the model but a level where the problem is visible. I'll be away the next 10 days, but I'll look into it after my return. The address is support1(at)3dgamestudio(dot)com.

Page 2 of 4 1 2 3 4

Moderated by  old_bill, Tobias 

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