|
1 registered members (AndrewAMD),
599
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Sky entities & clip_far
#391110
01/08/12 16:09
01/08/12 16:09
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
OP
User
|
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... 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:
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
|
|
|
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
Expert
|
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: Carlos3DGS]
#391162
01/09/12 01:45
01/09/12 01:45
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
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]
#391165
01/09/12 02:01
01/09/12 02:01
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
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
OP
User
|
OP
User
Joined: Oct 2008
Posts: 513
|
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). 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 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?
|
|
|
Re: Sky entities & clip_far
[Re: Uhrwerk]
#391167
01/09/12 02:22
01/09/12 02:22
|
Joined: Oct 2008
Posts: 513
Carlos3DGS
OP
User
|
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
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...
|
|
|
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
Expert
|
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
OP
User
|
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... 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.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|