DrawDistance for effects And planets
Moderators: winston, another_commander
DrawDistance for effects And planets
Could drawdistance be the same for Effects as for Planets ? and the planets/sun drawdistance be that of 1.84 instead of the currently 10 million KM. I cannot it seems be able to build it myself to test.
Currently the effects fall for the about 2.8 KM s draw distance for standard objects.
IMO effects should not suffer from this.
Planets in the current github build dissapear at 10 million km
I Tried simulating a real size sun but it gets into the front of planets when it should not
in 1.84, alternatively i could make all planets but the main one effects but that opens
a whole other set of problems .
Currently the effects fall for the about 2.8 KM s draw distance for standard objects.
IMO effects should not suffer from this.
Planets in the current github build dissapear at 10 million km
I Tried simulating a real size sun but it gets into the front of planets when it should not
in 1.84, alternatively i could make all planets but the main one effects but that opens
a whole other set of problems .
Bounty Scanner
Number 935
Number 935
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: DrawDistance for effects And planets
in 1.84:Effects cut of rendering at about 2.8 MKm. Even very large ones. oh well, should have made a video .
But in this case i made a very large sun and scaled it to apparent size.
The drawdistance for planets in 1.84 seems to be unlimited, not 10 MKm.
In 1.85 however it stops rendering at 10MKm
Bounty Scanner
Number 935
Number 935
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: DrawDistance for effects And planets
What is the exact version string of the nightly you use to test 1.85?
Re: DrawDistance for effects And planets
I downloaded the src via github applied pull request 153, then make debug = 0, like in the thread that was originally in the screenshots thread.another_commander wrote: ↑Fri Jan 13, 2017 1:36 pmWhat is the exact version string of the nightly you use to test 1.85?
video.
If i write Oolite.versionString it just writes 1.85
Bounty Scanner
Number 935
Number 935
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: DrawDistance for effects And planets
OK, what you have there is NOT 1.85 trunk. PR#153 has NOT been merged into the main source yet. Standard 1.85 trunk should behave exactly like 1.84 on planet draw distances. You can test by downloading the latest nightly binary from http://terrastorage.no-ip.info/oolite/status_win64.html and installing it in a clean folder.
Re: DrawDistance for effects And planets
still the same. effects cut of rendering at about 2.6... Se video.
Oh btw forgot to record, planets do cut off at10 MKm. I can make a new video of it if you like.
Edit, sry its actually less, at about 4.4 MKm.
https://www.youtube.com/watch?v=LRmVheh9erk
Oh btw forgot to record, planets do cut off at
Edit, sry its actually less, at about 4.4 MKm.
https://www.youtube.com/watch?v=LRmVheh9erk
Bounty Scanner
Number 935
Number 935
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: DrawDistance for effects And planets
Could it be the new atmosphere shader? Try this: In the 1.85 folder, go to Resources/Shaders and rename the file oolite-default-atmosphere.fragment to something else. This will force a fall-back to the previous (1.84) style of atmosphere rendering. Then repeat the test. Do planets still disappear at 4.4MKm?
Re: DrawDistance for effects And planets
Affirmative.. It is the planet atmosphere shaders that causes the planets to vanish, i can see all planets from very far out now. Currently viewing Jupiter from 0.26 AU or ca 39 MKm.another_commander wrote: ↑Fri Jan 13, 2017 8:32 pmCould it be the new atmosphere shader? Try this: In the 1.85 folder, go to Resources/Shaders and rename the file oolite-default-atmosphere.fragment to something else. This will force a fall-back to the previous (1.84) style of atmosphere rendering. Then repeat the test. Do planets still disappear at 4.4MKm?
So it is the shaders!. Does this complicate matters ?.
Bounty Scanner
Number 935
Number 935
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: DrawDistance for effects And planets
Although I don't understand why is it happening to you, you can try this change in the oolite-default-atmosphere.fragment file:
instead of last lines reading
Code: Select all
}
gl_FragColor = vec4(totalColor, newOpacity);
}
Code: Select all
} else {
discard;
}
gl_FragColor = vec4(totalColor, newOpacity);
}
My only bet is that something in this line doesn't pan out for what you're trying.
Re: DrawDistance for effects And planets
Thanks for the input, i tried that, but that does not "fix" it, it makes planets pop-vanish and pop-appear again, like here.Commander_X wrote: ↑Sat Jan 14, 2017 1:34 amAlthough I don't understand why is it happening to you, you can try this change in the oolite-default-atmosphere.fragment file:
instead of last lines readingtryCode: Select all
} gl_FragColor = vec4(totalColor, newOpacity); }
This should cut-off the last line outside the activation distance.Code: Select all
} else { discard; } gl_FragColor = vec4(totalColor, newOpacity); }
My only bet is that something in this line doesn't pan out for what you're trying.
https://youtu.be/3b93gSznkBA
Bounty Scanner
Number 935
Number 935
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: DrawDistance for effects And planets
The atmosphere effect seems to be behaving correctly, i.e. becomes transparent (newOpacity=0.0) a bit before the "central lighting" appears.
If I understood correctly, you scaled the planets way more than they are in the game. The shader uses the collisionRadius uniform (which should be the atmosphere's radius, because it is a sphere) in the calculations. If you didn't apply the right scaling to this entity as well, it might happen so that at higher distances the planet and atmosphere spheres have roughly (approximated) the same radius. What I'm trying to say is that if, e.g., the atmosphere_radius=planet_radius + extra, and not planet_radius * X%, then that "extra" could be your culprit.
Also your screen has an extra overlay (the yellow E:D like reticule) - do you get the same result without it present on the screen (say, if you look aft but you have it targeting something in front)?
I cannot say I've noticed this behavior in game, i.e. the planets "melt" nicely when small enough.
If I understood correctly, you scaled the planets way more than they are in the game. The shader uses the collisionRadius uniform (which should be the atmosphere's radius, because it is a sphere) in the calculations. If you didn't apply the right scaling to this entity as well, it might happen so that at higher distances the planet and atmosphere spheres have roughly (approximated) the same radius. What I'm trying to say is that if, e.g., the atmosphere_radius=planet_radius + extra, and not planet_radius * X%, then that "extra" could be your culprit.
Also your screen has an extra overlay (the yellow E:D like reticule) - do you get the same result without it present on the screen (say, if you look aft but you have it targeting something in front)?
I cannot say I've noticed this behavior in game, i.e. the planets "melt" nicely when small enough.
Re: DrawDistance for effects And planets
The Reticle is just a model effect vector().interpolated to about 50000 km from the player at any one time towards the target. It is working totally independant and will target anything. Even stations.Commander_X wrote: ↑Sat Jan 14, 2017 8:08 pmThe atmosphere effect seems to be behaving correctly, i.e. becomes transparent (newOpacity=0.0) a bit before the "central lighting" appears.
If I understood correctly, you scaled the planets way more than they are in the game. The shader uses the collisionRadius uniform (which should be the atmosphere's radius, because it is a sphere) in the calculations. If you didn't apply the right scaling to this entity as well, it might happen so that at higher distances the planet and atmosphere spheres have roughly (approximated) the same radius. What I'm trying to say is that if, e.g., the atmosphere_radius=planet_radius + extra, and not planet_radius * X%, then that "extra" could be your culprit.
Also your screen has an extra overlay (the yellow E:D like reticule) - do you get the same result without it present on the screen (say, if you look aft but you have it targeting something in front)?
I cannot say I've noticed this behavior in game, i.e. the planets "melt" nicely when small enough.
But, wouldn't
Code: Select all
discard
https://www.opengl.org/sdk/docs/tutoria ... iscard.php
Well, I went ahead and tested it with this instead
Code: Select all
else
{
newOpacity = 0.01;
}
All i then got was the atmosphere. The planet itself vanished, I then began thinking that maybe it is a sort of overflow as the distance is about that of an usigned 32 bit int.
Last edited by Frame on Sun Jan 15, 2017 12:28 am, edited 1 time in total.
Bounty Scanner
Number 935
Number 935
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: DrawDistance for effects And planets
Yup, that was the intention.Frame wrote: ↑Sat Jan 14, 2017 11:21 pmBut, wouldn'tTell it to render nothing ? as in being totally transparent thus behaving like expected.Code: Select all
discard
https://www.opengl.org/sdk/docs/tutoria ... iscard.php
As opposed to the git committed version of the shader, which is "rendering" totally transparent pixels once the distance to the atmosphere is greater than 12 times its radius, the "discard" change would abort processing altogether (also enhancing a bit the performance by not executing the last line _and_ presenting its output on the screen). The fact that this doesn't fix your problem but the absence of the shader does, it's the real mystery.
Re: DrawDistance for effects And planets
disregard my edit, your input came in between.Commander_X wrote: ↑Sun Jan 15, 2017 12:10 amYup, that was the intention.Frame wrote: ↑Sat Jan 14, 2017 11:21 pmBut, wouldn'tTell it to render nothing ? as in being totally transparent thus behaving like expected.Code: Select all
discard
https://www.opengl.org/sdk/docs/tutoria ... iscard.php
As opposed to the git committed version of the shader, which is "rendering" totally transparent pixels once the distance to the atmosphere is greater than 12 times its radius, the "discard" change would abort processing altogether (also enhancing a bit the performance by not executing the last line _and_ presenting its output on the screen). The fact that this doesn't fix your problem but the absence of the shader does, it's the real mystery.
could this be a sort of an overflow problem, since i noticed that the planet vanish about the range of a 32 bit ULONG_MAX or 4294967297.
I'm not to well versed in that kind of mathematics, so it is a long shot.
Bounty Scanner
Number 935
Number 935