Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,343 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
SCENE Flag #272754
06/19/09 16:36
06/19/09 16:36
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
I am trying to draw a textured sky sphere at an infinite distance. The model I am using is textured and has inward facing normals.

The example from the manual does not seem to work at all, the view seems frozen and the models texture covers everything
else.

Code:
ENTITY* skyMountain =
{
  type = "mountainsphere.mdl";
  layer = 3; 
  scale_x = 0.25; 
  flags2 = SCENE | SHOW;
}



I tried adding the SKY flag; "flags2 = SKY | SCENE | SHOW;". This does draw the model, but not at an infinite distance as it still suffers from clipping at clip_far.

I also tried using ent_createlayer() in various combinations with the same results.


Not two, not one.
Re: SCENE Flag [Re: Grafton] #272755
06/19/09 16:39
06/19/09 16:39
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Probaly it disappears by clip_far because it's a model.

Re: SCENE Flag [Re: Cowabanga] #272756
06/19/09 16:49
06/19/09 16:49
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
Thats the problem! The SCENE flag is suppose to ignore the z-Buffer and draw the model behind everything else, so clip_far should not make any difference, but it does.


Not two, not one.
Re: SCENE Flag [Re: Grafton] #273243
06/22/09 07:50
06/22/09 07:50
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
As the manual says, the SCENE flag draws an infinite z value into the z buffer. This has nothing to do with clip_far, which is the maximum distance of an object to be rendered. The SCENE flag does not affect clip_far.

For an object to become the sky, the SKY flag must be set. In your code above you have a view entity at an infinite z distance. The difference between a sky and a view entity is that the sky entity is rendered in the background, the view entity is rendered in the foreground of a view.

I hope this helps.

Re: SCENE Flag [Re: jcl] #273316
06/22/09 13:18
06/22/09 13:18
Joined: Jun 2005
Posts: 656
G
Grafton Offline OP
User
Grafton  Offline OP
User
G

Joined: Jun 2005
Posts: 656
Thanks Jcl, I misunderstood the examples intent.


Not two, not one.

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