Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Terrain disappearing at certain camera angles #441079
05/12/14 02:45
05/12/14 02:45
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
My terrain will randomly disappear when my cameras orientation and position is in certain places or angles. Could this mean there is a problem with my terrain? Too big?


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Terrain disappearing at certain camera angles [Re: Stansmedia] #441080
05/12/14 02:57
05/12/14 02:57
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
I should also mention im using the "fx_modelTex3Nm" 3 texture terrain shader with normal mapping. Having a look in wireframe, its not that the terrain is disappearing, but the lights are randomly loosing there influence on the textures. But even with the shader off, same thing.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Terrain disappearing at certain camera angles [Re: Stansmedia] #441082
05/12/14 07:25
05/12/14 07:25
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
the light problem can ccme from the fact Sun is always the last dynamic light out of the 8 available, and this shader uses only the 1st 3 as I remember. you can define the actual number of light affecting a terrain chunk by iLights.

I had disappearing terrain only 2 times: 1) when scaled a terrain of a wmb level after, and 2) when applied a clipped or not check.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Terrain disappearing at certain camera angles [Re: sivan] #441083
05/12/14 08:02
05/12/14 08:02
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Weird thing: If 3 lights aren't on it at all times, it disappears too smirk


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Terrain disappearing at certain camera angles [Re: Stansmedia] #441084
05/12/14 08:34
05/12/14 08:34
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
the demo works fine with less ligths but that uses a model not a terrain...

I know PASS_SOLID is set for the material, but try it to replace the last line of calcLightFalloff in the shader with return(float4(0,0,0,1)); to not to be transparent but intransparent black. you can also add an AlphaTestEnable = false; to both "pass one"-s in the end. moreover I don't know why ZWriteEnable is needed there.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Terrain disappearing at certain camera angles [Re: sivan] #441097
05/12/14 21:58
05/12/14 21:58
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Are your level bounds big enough? Set this after level load:
Code:
level_ent.min_x=-500000;
level_ent.min_y=-500000;
level_ent.min_z=-500000;
level_ent.max_x=500000;
level_ent.max_y=500000;
level_ent.max_z=500000;


Re: Terrain disappearing at certain camera angles [Re: oliver2s] #441179
05/15/14 02:01
05/15/14 02:01
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Well, it stays lit as long as the two dynamic lights are shining on it. I have the sun turned off so I think that irritating it.. It doesn't want to react to spotlights tho, just renders as omni. Has anybody implemented spotlights into it? Or is it not easy/possible.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Terrain disappearing at certain camera angles [Re: Stansmedia] #441212
05/15/14 12:51
05/15/14 12:51
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
imo it's only for point lights, spots are a bit more difficult, but sorry I've never used them only saw e.g. in the Sponza demo (find in Showcase section).


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Terrain disappearing at certain camera angles [Re: sivan] #441228
05/16/14 00:23
05/16/14 00:23
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
That sponza shader is awesome. It blows my mind that these resources are buried in here.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Terrain disappearing at certain camera angles [Re: Stansmedia] #441230
05/16/14 01:32
05/16/14 01:32
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
camera.clip_far = 500000; is an an alternate idea for Oliver2's suggestion laugh Although it seems to be a shader issue wink

Last edited by DLively; 05/16/14 01:33.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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