2 registered members (TipmyPip, 1 invisible),
18,758
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
Expert
|
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
|
|
|
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
Serious User
|
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
Senior Expert
|
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
Serious User
|
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,
|
|
|
|