Large objects in low visibility
by Simon Goodchild · in Torque Developer Network · 10/07/2007 (1:36 am) · 3 replies
I've started a new thread from this one, as the problem has changed slightly. Thanks to those who helped on the visibility underwater.
With a fog layer underwater I can control visibility under water, but I now have a problem with large objects. As an example, I'm trying to create a large "swiming pool", with a long inside.
Ok - some screenshots, as a pictire paints a thousand words, etc! The following one shows a DIF, underwater, with some DTS shapes beside. Notice how the DIF does not disappear into the fog, the visibility of the far end is the same as the nearest point.

From the side, it's not a problem, as the nearest point pretty much looks the same right across, so it's not noticed.

The DIF was produced in Constructor, simple texture, and exported with map2dif export.
As a comparison, I produced the whole pool as a DTS (just to demonstrate the issue here). With fog visibility underwater set to less than the size of the pool, the textures of the pool are not showing at all (there should be a tiled area all around). However, you can still jump down and walk around on top of the DTS, so it's there and collision is working fine!
I'm guessing it's because the DTS shape length is longer than the visibility which is fairly low (see screenshots above). It's a guess though!

The fog is set to the height of the water, that's why you can see a long way above - but I guess as the DTS is spanning above and below it gets effected. Underwater, DTS shapes "pop" into view as they enter the visibility distance, which generally isn't a problem because they "pop" into view as they become visible as they are generally small items.
This is what the pool looks like with no visibility or fog set up : (click here)
With a fog layer underwater I can control visibility under water, but I now have a problem with large objects. As an example, I'm trying to create a large "swiming pool", with a long inside.
Ok - some screenshots, as a pictire paints a thousand words, etc! The following one shows a DIF, underwater, with some DTS shapes beside. Notice how the DIF does not disappear into the fog, the visibility of the far end is the same as the nearest point.

From the side, it's not a problem, as the nearest point pretty much looks the same right across, so it's not noticed.

The DIF was produced in Constructor, simple texture, and exported with map2dif export.
As a comparison, I produced the whole pool as a DTS (just to demonstrate the issue here). With fog visibility underwater set to less than the size of the pool, the textures of the pool are not showing at all (there should be a tiled area all around). However, you can still jump down and walk around on top of the DTS, so it's there and collision is working fine!
I'm guessing it's because the DTS shape length is longer than the visibility which is fairly low (see screenshots above). It's a guess though!

The fog is set to the height of the water, that's why you can see a long way above - but I guess as the DTS is spanning above and below it gets effected. Underwater, DTS shapes "pop" into view as they enter the visibility distance, which generally isn't a problem because they "pop" into view as they become visible as they are generally small items.
This is what the pool looks like with no visibility or fog set up : (click here)
About the author
#2
new Sky(Sky) {
canSaveDynamicFields = "1";
position = "336 136 0";
rotation = "1 0 0 0";
scale = "1 1 1";
materialList = "creator/data/skies/sky_day.dml";
cloudHeightPer[0] = "0.349971";
cloudHeightPer[1] = "0.3";
cloudHeightPer[2] = "0.199973";
cloudSpeed1 = "0.0005";
cloudSpeed2 = "0.001";
cloudSpeed3 = "0.0003";
visibleDistance = "800";
fogDistance = "250";
fogColor = "0.6 0.6 0.6 1";
fogStorm1 = "0";
fogStorm2 = "1";
fogStorm3 = "1";
fogVolume1 = "50 0 138";
fogVolume2 = "0 0 0";
fogVolume3 = "0 0 0";
fogVolumeColor1 = "128 128 128 -2.22768e+038";
fogVolumeColor2 = "128 128 128 0";
fogVolumeColor3 = "128 128 128 -1.70699e+038";
windVelocity = "1 1 0";
windEffectPrecipitation = "1";
SkySolidColor = "0.6 0.6 0.6 1";
useSkyTextures = "1";
renderBottomTexture = "0";
noRenderBans = "0";
locked = "true";
};
10/12/2007 (12:32 pm)
Oh, this is my current Sky block (a water block sits at 138):new Sky(Sky) {
canSaveDynamicFields = "1";
position = "336 136 0";
rotation = "1 0 0 0";
scale = "1 1 1";
materialList = "creator/data/skies/sky_day.dml";
cloudHeightPer[0] = "0.349971";
cloudHeightPer[1] = "0.3";
cloudHeightPer[2] = "0.199973";
cloudSpeed1 = "0.0005";
cloudSpeed2 = "0.001";
cloudSpeed3 = "0.0003";
visibleDistance = "800";
fogDistance = "250";
fogColor = "0.6 0.6 0.6 1";
fogStorm1 = "0";
fogStorm2 = "1";
fogStorm3 = "1";
fogVolume1 = "50 0 138";
fogVolume2 = "0 0 0";
fogVolume3 = "0 0 0";
fogVolumeColor1 = "128 128 128 -2.22768e+038";
fogVolumeColor2 = "128 128 128 0";
fogVolumeColor3 = "128 128 128 -1.70699e+038";
windVelocity = "1 1 0";
windEffectPrecipitation = "1";
SkySolidColor = "0.6 0.6 0.6 1";
useSkyTextures = "1";
renderBottomTexture = "0";
noRenderBans = "0";
locked = "true";
};

Torque Owner Simon Goodchild
So, it looks like a DTS "pop"'s into view when the whole DTS is within visibility range, like when in fog - I'm using fog to change the visibility underwater to something realistic - a setting of 50 in fogVolumeX is about right.
Any ideas on how to get a DTS that is longer than your visibility to fade into view as you approach it, rather than only suddenly appearing when the whole DTS is in view/range?
I'll post two screenshots below - the first showing just before a DTS (tunnel appears) and the second after the whole thing suddenly appears.