Forum Thread Not Found, Sorry.

Game Development Community

Can ScatterSky Z-Offset Hack be added in as a fix for 1.2?

by Paul Yoskowitz · in Torque 3D Professional · 10/20/2011 (6:42 am) · 15 replies

this resource here:

http://www.garagegames.com/community/resources/view/20788

Im not sure if you would call it a bug or not, but due to the terrains that we are using in our game, its something that we are adding in every time a new version comes out. i just see this as something that people would use.

#1
10/26/2011 (6:49 pm)
-ditto-
I tried to port over the old fix to 1.1F, but no go....
Please fix for 1.2 or give solution.
Thanks
#2
10/27/2011 (7:30 am)
@Jim - what happened with it?
#3
10/27/2011 (6:05 pm)
@Paul
Not really a port...I just tried plugging in same resource that you've referenced into 1.1F, but nothing happened.
#4
10/27/2011 (6:09 pm)
ok. we havent put it it in 1.1 yet. we were goin to put it in 1.2 when it finally came out. thats good to know.
#5
01/09/2012 (8:42 am)
Hello

just wondering if theres any update on this resource, ive added the original resource to 1.2 but as above its not having any effect for me

#6
05/02/2012 (2:46 pm)
No idea if this will work or not but you might try setting your view distance really high (say, 50000 or 100000) and see if that affects anything.
#7
05/03/2012 (4:05 am)
@Ross - it doesnt. what DOES kinda sorta fix it is to drop a water plane. The water plane will continue "forever" and eventually cover the blank areas. Thats not a fix and not always appropriate for what im looking for.

Since we are finishing up our conversion of T3D this is still on our to-do list , but we are actually hoping to get a talented C++ guy in house and drop this as one of thier "upgrades" for us.
#8
05/03/2012 (9:51 pm)
The Resource works just fine in Torque 3D 1.2. I'm actually using 1.1 which has been updated with the patch to 1.2, but there is no reason why it wouldn't work in the full T3D 1.2.

The only gotcha that I noticed was that the Resource instructs you that the following line was added, when in fact it should modify the existing line at that location.
xfm.setPosition(camPos2 - Point3F( 0, 0, mZOffset)); // Added
If you simply add that line as the Resource instructs, the very next line will overwrite the setPosition().... looks like someone was attempting to hardcode a z offset at one point.

So make sure this line gets commented/removed/altered:
// Replace this line with the line from the Resource
xfm.setPosition(camPos2);//-Point3F( 0, 0, 200000.0f));

Another thing to take note of is that you have to use a large number for the zOffset. The Resource writer suggested 20000, but depending on how high you are, this number will have to be even greater.
#9
05/04/2012 (4:06 am)
@Michael is there a way to grab the player Z location and use a formula that can just 'handle' the height change as needed?
#10
05/04/2012 (9:54 am)
That may be possible... but would bear some thinking about because such a formula would have to scale the zOffset by some factor instead of simply adding the player's z position to it. I also wonder how that would look in game if the sky appeared to move in place because you climbed a hill.
#11
05/04/2012 (9:57 am)
true.... but then i wonder how noticable would it really be.
#12
05/06/2012 (5:55 pm)
ran into the same problem with versions as well.
Solved with a trick, using both the skies until it is at least a solution.
SkyBox with a full transparent material.
Besides covering the gaps the fog is now defined in Z axis.
#13
05/06/2012 (6:13 pm)
@Paul: I think it would be noticeable, because you can definitely see it (the dome of the scattersky appears to shift downward) when you change the zOffset within the Editor. If this was adjusting on the fly it could be a bit jarring to the eyes. Good level design as well as taking account for the highest elevation of your terrain the zOffset addition *should* be sufficient.

A flying game, or one with flight, may be a bit tricky to design for, even with color matching the fog to the terrain color and/or canvaseClear color. Unless you limited the flyer's height... and I'm not completely sure that the ceiling limit is working for flying vehicles anymore.

@Dimitris: the ScatterSky Z-Offset Hack Resource works just fine in Torque 3D 1.1 and 1.2, the same as it it did in the 1.1b3 version. What problems are you having? What versions?
#14
05/06/2012 (9:58 pm)
@Michael true - i wasnt sure on HOW much of an overall adjustment it would be. Im already using a ceiling limit, but i havent been testing that functionality yet.

however, as far as level design goes, what im lookin at wasnt so much about level design, but a better Z-Offset Hack to make it a bit more flexible.
#15
05/10/2012 (2:25 am)
Michael, when I mention the concept more is a problem of incompatibility.
in version 1.1 I had solved the problem with scatterSky.
what problem?
The holes who leaves low without render and render inability to do the fog at selected level. Cuts the level of fog at the height of the horizon.
developing an MMO game and I use 4 large terrains at the time (1G-1.1G ram with all objects), visible distance optional from 1500 - 2500, sky and fog is the basic elements for a good environment world.

PS
this why I give them much attention to detail. Chasing a game better of the best known mmo, I hop to get up a beta server in 3-4 months.
I also commute opinions with someone who is working seriously on an mmo.
I use only resurce in T3D engine and Torque Script. For the moment everything is going just fine.