Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Sky entities & clip_far #391110
01/08/12 16:09
01/08/12 16:09
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
I am trying out sky entities for the first time. I made a simple sphere, uv mapped it, created a texture, and inverted normals of the faces so they point inwards (this is a space scene, with stars/nebula/galaxies painted on it). For some reason part of the sphere is getting clipped as if it was too far away.



At first I thought it might have something to do with clip_far, but I read in the manual that sky entities never get clipped...
Quote:
Particles will be clipped at half the clip_far range. Sky entities and sky blocks are never clipped.


this is how I declare my space sky sphere thing in my script:
Code:
ENTITY* SpaceDome =
{
  type = "SpaceDome.mdl"; // sphere model with inverted normals
  flags2 = PASSABLE|SKY|DOME|SCENE|SHOW; // space scene model flags to dome/sky/etc...
  layer = 3;
  scale_x=100;
  scale_y=100;
  scale_z=100;
}



Does anyone know what I am doing wrong?

Last edited by Carlos3DGS; 01/08/12 16:56. Reason: added picture

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Sky entities & clip_far [Re: Carlos3DGS] #391139
01/08/12 21:38
01/08/12 21:38
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
This should be a box, not a dome, right? What happens if you set your flags to "SKY | CUBE | SHOW" ?


Always learn from history, to be sure you make the same mistakes again...
Re: Sky entities & clip_far [Re: Uhrwerk] #391160
01/09/12 01:42
01/09/12 01:42
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
It is not a cube, it is a giant sphere. But I tried it anyway with "SKY | CUBE | SHOW" flags just in case, same results though. It seems like the furthest parts just get clipped away.


Thanks for trying to help though, any help is welcome.


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Sky entities & clip_far [Re: Carlos3DGS] #391162
01/09/12 01:45
01/09/12 01:45
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Tried increasing camera.clip_far?


Always learn from history, to be sure you make the same mistakes again...
Re: Sky entities & clip_far [Re: Carlos3DGS] #391163
01/09/12 01:52
01/09/12 01:52
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Just to make sure you guys know what I am working with, here is a snapshot of the object I am trying to use for the sky (viewed in the model editor).

Originally Posted By: Carlos3DGS
...I made a simple sphere, uv mapped it, created a texture, and inverted normals of the faces so they point inwards (this is a space scene, with stars/nebula/galaxies painted on it). For some reason part of the sphere is getting clipped as if it was too far away...



"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Sky entities & clip_far [Re: Carlos3DGS] #391165
01/09/12 02:01
01/09/12 02:01
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Btw. You're doing bad things. PASSABLE and SHOW belong to flags, not to flags2. Is that maybe the solution to your problem?

The correct flags2 for this situation would be "SKY | SCENE | SHOW". Sorry, thought you had a box in the first place.

Last edited by Uhrwerk; 01/09/12 02:26. Reason: SHOW is actually flags2. Sorry about that.

Always learn from history, to be sure you make the same mistakes again...
Re: Sky entities & clip_far [Re: Uhrwerk] #391166
01/09/12 02:05
01/09/12 02:05
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Originally Posted By: Uhrwerk
Tried increasing camera.clip_far?

That is what I first thought, but some sections of the manual about clip_far made me want to try to avoid it (keep in mind the size of the sphere I am using is massive).
Quote:
Both parameters influence the resolution of the Z buffer, whose range is between clip_near and clip_far. Today, 3D cards normally have 24 bit z buffer resolution. If the clip_near to clip_far ratio exceeds this resolution, sorting errors will become visible on the screen.
Example:
camera.clip_near = 5; // allows to go very close to objects
camera.clip_far = 10000; // reduce clip_far for preventing sorting errors


Another part of the clip_far section of manual made me think I could get this to work withought needing to increase clip_far
Quote:
Particles will be clipped at half the clip_far range. Sky entities and sky blocks are never clipped.

This last quote from the manual makes me think I am just doing something wrong, and it is not really working as a sky entity?




"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Sky entities & clip_far [Re: Uhrwerk] #391167
01/09/12 02:22
01/09/12 02:22
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
Tried it with only SKY|SCENE|SHOW but got the same results:


I also commented out some scale lines I had in there to leave it at a bare minimum
Code:
ENTITY* SpaceDome =
{
  type = "SpaceDome.mdl";
  //flags2 = PASSABLE|SKY|DOME|SCENE|SHOW;
  //flags2 = SKY|CUBE|SHOW;
  flags2= SKY | SCENE | SHOW;
  layer = 3;
  //scale_x=10;
  //scale_y=10;
  //scale_z=10;
}


I even tried commenting out the "layer=3" line to see if that was causing any problems.
It seems I have no idea what is wrong, and am just shooting blindly at whatever moves...


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Sky entities & clip_far [Re: Carlos3DGS] #391168
01/09/12 02:28
01/09/12 02:28
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Take another random shot into the dark...

"sky_clip=0;"


[fingers crossed]


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Sky entities & clip_far [Re: EvilSOB] #391173
01/09/12 02:46
01/09/12 02:46
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
I tried adding sky_clip=0; behind my level_load(NULL); instruction but it didn't fix it:




I have also tried increasing clip_far and that seems to fix it... But this means it not actually acting as a sky entity since they are not supposed to get clipped away?

I can zoom out extremely far now before it starts to get clipped away but...
Code:
camera.clip_far*=100;


I am not comfortable with this workaround since it means it is not really working like a sky entity, I am still trying to get it to work withought the clip_far workaround.


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Page 1 of 3 1 2 3

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