Oolite Bulletins

For information and discussion about Oolite.
It is currently Sat Nov 25, 2017 7:48 am

All times are UTC




Post new topic  Reply to topic  [ 19 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Thu Jan 12, 2017 12:16 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
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 :).

_________________
Bounty Scanner
Number 935


Top
   
PostPosted: Thu Jan 12, 2017 12:23 pm 
Online
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5018
Quote:
and the planets/sun drawdistance be that of 1.84 instead of the currently 10 million KM.
Not sure what the actual problem might be here, but there is no change between 1,84 and 1,85 on how draw distances are handled. 1.84 also has a 10MKm MAX_CLEAR_DEPTH set.


Top
   
PostPosted: Fri Jan 13, 2017 5:12 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
Quote:
and the planets/sun drawdistance be that of 1.84 instead of the currently 10 million KM.
Not sure what the actual problem might be here, but there is no change between 1,84 and 1,85 on how draw distances are handled. 1.84 also has a 10MKm MAX_CLEAR_DEPTH set.

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


Top
   
PostPosted: Fri Jan 13, 2017 1:36 pm 
Online
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5018
What is the exact version string of the nightly you use to test 1.85?


Top
   
PostPosted: Fri Jan 13, 2017 2:45 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
What is the exact version string of the nightly you use to test 1.85?
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.
video.

If i write Oolite.versionString it just writes 1.85

_________________
Bounty Scanner
Number 935


Top
   
PostPosted: Fri Jan 13, 2017 2:59 pm 
Online
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5018
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.


Top
   
PostPosted: Fri Jan 13, 2017 8:00 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
still the same. effects cut of rendering at about 2.6... Se video.
Oh btw forgot to record, planets do cut off at 10 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

_________________
Bounty Scanner
Number 935


Top
   
PostPosted: Fri Jan 13, 2017 8:32 pm 
Online
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5018
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?


Top
   
PostPosted: Fri Jan 13, 2017 8:57 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
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?
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.

So it is the shaders!. Does this complicate matters ?.

_________________
Bounty Scanner
Number 935


Top
   
PostPosted: Sat Jan 14, 2017 1:34 am 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
Quote:
So it is the shaders!. Does this complicate matters ?.
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:
	}

	gl_FragColor = vec4(totalColor, newOpacity);
}
try
Code:
	} else {
		discard;
	}

	gl_FragColor = vec4(totalColor, newOpacity);
}
This should cut-off the last line outside the activation distance.
My only bet is that something in this line doesn't pan out for what you're trying.


Top
   
PostPosted: Sat Jan 14, 2017 6:14 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
Quote:
So it is the shaders!. Does this complicate matters ?.
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:
	}

	gl_FragColor = vec4(totalColor, newOpacity);
}
try
Code:
	} else {
		discard;
	}

	gl_FragColor = vec4(totalColor, newOpacity);
}
This should cut-off the last line outside the activation distance.
My only bet is that something in this line doesn't pan out for what you're trying.
Thanks for the input, i tried that, but that does not "fix" it, it makes planets pop-vanish and pop-appear again, like here.

https://youtu.be/3b93gSznkBA

_________________
Bounty Scanner
Number 935


Top
   
PostPosted: Sat Jan 14, 2017 8:08 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
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.


Top
   
PostPosted: Sat Jan 14, 2017 11:21 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
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.
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.

But, wouldn't
Code:
discard
Tell it to render nothing ? as in being totally transparent thus behaving like expected.

https://www.opengl.org/sdk/docs/tutoria ... iscard.php

Well, I went ahead and tested it with this instead
Code:
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.

_________________
Bounty Scanner
Number 935


Last edited by Frame on Sun Jan 15, 2017 12:28 am, edited 1 time in total.

Top
   
PostPosted: Sun Jan 15, 2017 12:10 am 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
Quote:
But, wouldn't
Code:
discard
Tell it to render nothing ? as in being totally transparent thus behaving like expected.

https://www.opengl.org/sdk/docs/tutoria ... iscard.php
Yup, that was the intention.
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.


Top
   
PostPosted: Sun Jan 15, 2017 12:42 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
Quote:
But, wouldn't
Code:
discard
Tell it to render nothing ? as in being totally transparent thus behaving like expected.

https://www.opengl.org/sdk/docs/tutoria ... iscard.php
Yup, that was the intention.
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.
disregard my edit, your input came in between.

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 19 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited