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 3 of 3 1 2 3
Re: Sky entities & clip_far [Re: EvilSOB] #391218
01/09/12 13:49
01/09/12 13:49
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
It is definately being clipped by the spacedome when intersecting
Code:
if(key_space) { vec_fill(SpaceDome.scale_x, 10); } else { vec_fill(SpaceDome.scale_x, 1); }







"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] #391220
01/09/12 14:05
01/09/12 14:05
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
What is the diameter of SpaceDome? (INCLUDING scaling)
It should be just under clip_far*2...





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

Joined: Oct 2008
Posts: 513
currently diameter of spacedome is 5000 (with spacebar pressed 50000)
clip_far default value is 50000.

But keep in mind this is just a test to get it working. I'm not sure yet what size I will need for spacedome when it works with the complete script (a complete solar system) 1star + orbiting planets & moons. And that is the minimum, depending on the speed results I get, I am initially aiming at anything between 7 and 15 solar systems at once (so you can visually see the next solar system (or at least the star) closest in each direction from your current solar system).

Initially this was all planned around sky entities (for the dome and surrounding stars), but since they dont work properly I might have to re-think my concept. Any ideas?

EDIT:
So far I see no advantage between using sky entities and normal ones. This concept came to me when realizing the potencial of sky entites' special behaviours, but during this conversation I have realized several things...
1- Sky entities do get clipped by clip_far
2- Sky entities are not centered around the view
3- Sky entities are not rendered behind the other entities (and can clip them)

So none of the "special" properties of sky entites actually work... And who knows what other things I will discover that don't work as the manual states. So far it seems they behave exactly the same as normal entities. The only difference seems to be they have a flag that does not do anything?

Last edited by Carlos3DGS; 01/09/12 14:42.

"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] #391226
01/09/12 14:42
01/09/12 14:42
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Does the texture of your sky entity contain an alpha channel? If so, does removing it help you fix the problem?


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

Joined: Oct 2008
Posts: 513
Opened the skin again in photoshop and saved as a .dds
selecting this option:
DXT1 RGB 4 bpp | no alpha

Would that do it for eliminating the alpha channel? (I have not worked much with them yet)

Then opened my model in med , skin settings, chose the new texture, saved model.

If that was the correct process... Then it had no effect, the planet's land gets clipped by the spacedome just like before.


"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] #391228
01/09/12 15:07
01/09/12 15:07
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
You do realize that clip_far is the RADIUS, versus the entities DIAMETER?
So clip_far must be just more than HALF the entities diameter...
So even when youve got the spacebar pressed, the sky-entity is clipping them off at HALF the clip_far...

So to get the SkySphere to behave 'right' with a clip_far of 50,000 the SkySphere needs a diameter just over 10,000.
All you need to do is reset the SkySphere scaling just after setting the clip_far.
"vec_fill(SkySphere.scale_x, camera.clip_far / SkySphere_mdl_diameter * 0.95);" should do it.

As for the advantages of a sky-entity (versus a sky-sprite), I cant actually see any...
Back when I used it, I was using JUST a model, not a SKY entity. Just doing the same thing.
Who knows... maybe its broken. I would guess using models for a sky is pretty unusual.

As for what else the manual gets wrong, just look at the "Blame the manual" forum.
Its usually got something going on in there... So its far from perfect.


But dont JUST listen to me, for god sake! Listen to anyone else who posts in
this thread too, and wait a few more days. The answer is potentially one person away.
If you still dont get any joy, post a query in the "Ask the developers" forum...

Best of luck...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Sky entities & clip_far [Re: EvilSOB] #391230
01/09/12 15:10
01/09/12 15:10
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Just as a test, make it NOT a sky-entity, and set its size with
vec_fill(SkySphere.scale_x, camera.clip_far / SkySphere_mdl_diameter * 0.95);

And see how much of a difference it makes...


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

Joined: Oct 2008
Posts: 513
vec_fill(SpaceDome.scale_x, (camera.clip_far / 5000 * 0.95));
seems to not work for me, but I'm working on it though.

Nevermind, I just forgot to comment out "if(key_space) { vec_fill(SpaceDome.scale_x, 10); } else { vec_fill(SpaceDome.scale_x, 1); }" in the main loop.


I tried creating it as a normal entity and observed the following changes:
-spacedome now also clips water at the same distance as land (expected, no new issue since fixing spacedome size for land also does it for water now)
-spacedome looks ugly because its getting illuminated by sun (too bright in some places, too dark in others. Could probably be fixed with some flags or material).

I see no advantage to using sky entities if the only difference is some sort of UNLIT flag... Either I am doing something terribly wrong, or sky entities are terribly broken as they seem to do nothing they are supposed to

Last edited by Carlos3DGS; 01/09/12 15:45. Reason: scale_x

"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 3 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