Game Development Community

Extend the Bounds of Scattersky

by Jesse Allen · in Torque 3D Professional · 07/23/2014 (3:23 pm) · 8 replies

Hi Community,

I believe I may have finally bumped into my first obstacle that could require a source edit. The problem is the big ugly line on the horizon where the Scattersky stops. The ocean also flickers far away, sometimes revealing it. I did adjust the nearClip and that stopped the flickering, but as a result the first person weapons are also clipped out. (It's pretty weird that 'near' clip alters flickering ocean 'far' away...I found this solution in an old thread)

I'm wondering if it is possible to extend the boundaries of the Scattersky so that it drops down lower. I know I can adjust fog and view distance to avoid this, but that really just conceals the problem. I really can't sacrifice view distance either, since I have flying vehicles involved...

So I'm wondering how to approach this. It seems as though it would be a very small change in the boundary of the Scattersky, but I'm not sure where to start.

Thanks for any possible solutions guys, this has been a thorn in the side since I've started using T3D and I'd love to see it solved.


#1
07/23/2014 (3:35 pm)
Maybe this will help.
#2
07/23/2014 (3:39 pm)
Whoa! Super fast reply. That looks very relevant, I'll give it a go, thanks!
#3
07/23/2014 (3:41 pm)
Don't forget to wander down the thread - there is a fix for a lens flare issue....
#4
07/23/2014 (4:10 pm)
Does anyone else think we should rewrite ScatterSky to render 360 degrees? Is that even plausible?
#5
07/23/2014 (4:27 pm)
Well, that source edit worked like a charm for the Scattersky. Although it seems my problem stems from the ocean somehow. Take a look at this:

i1213.photobucket.com/albums/cc466/rockoutsolid/Development/oceanLine.png
At certain altitudes, a line appears on the ocean. If you look closely you can see that the scattersky is now pulled down below this (stars in the line 'gap'). So the scattersky is perfect now, thanks Richard :) Although there is some small oddity in the rendering of the ocean. Ideas?

Oh and @Danny: Yea, that could be useful. Imagine how simple a change like that could make space exploration...
#6
07/23/2014 (4:29 pm)
I think so. Tesseract has a 360 procedural sky - www.tesseract.gg.

You can also just hide the problem with something like this: garagegames.com/community/blogs/view/22265. That miiight become a standard feature, but it is dead easy to set up and use anyway if not. The code linked there could be old - use the recent pull request instead. That'd be, um, here.
#7
07/23/2014 (4:35 pm)
@Adam: Although the zOffset hack meets any needs I have for the scattersky, your work there looks fantastic. Just wanted to give you props, that looks great!
#8
07/23/2014 (4:39 pm)
Ah, it's just the visible view distance guys. Ocean looks fine now :)