Dynamic Cloud Shadows

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 4 months
Location: Bariloche, Argentina

Post #61by abramson » 24.12.2007, 02:08

cartrite wrote:We still don't know if a 7000 series card works or not.


I've got a 7000 at work, but I'm not going to my office tomorrow or Tuesday. I'll test on Wednesday.

At home, my 6200 A-LE gives the blocks with any cloud texture. GeForce 93.71 (duh, this must be old...). Windows XP Pro SP2. Celestia built from CVS + patch.

By the way, while testing with the View Options box open, I noticed a number of bugs:

1. Tick Atmospheres on/off switches clouds on/off
2. Tick Clouds on/off switches Orbits on/off
3. Tick Galaxies on/off switches Atmospheres on/off
... and several other remappings between ticks and effects...

Was this known? Should I post it on the bugs forum?

Cheers,

Guillermo

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #62by selden » 24.12.2007, 02:41

Guillermo,

The options problems that you mention do not happen with Celestia v1.5.0pre5, so they would seem to be something introduced in a recent patch.

Unfortunately, Celestia crashes for me when I build it from CVS, so I can't help otherwise.

Unhandled exception at 0x003546e3 in celestia.exe: 0xC0000005: Access violation reading location 0x00000038.

*sigh*
Selden

Avatar
Hungry4info
Posts: 1133
Joined: 11.09.2005
With us: 19 years 2 months
Location: Indiana, United States

Post #63by Hungry4info » 24.12.2007, 02:53

t00fri wrote:
ElChristou wrote:Zero speed for clouds wasn't for VTs only?
No, it was as I said. I am using moving clouds with my VT's for example.


If I use a VT Cloud map, I must keep the speed to zero or else it'll glitch.
Current Setup:
Windows 7 64 bit. Celestia 1.6.0.
AMD Athlon Processor, 1.6 Ghz, 3 Gb RAM
ATI Radeon HD 3200 Graphics

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #64by selden » 24.12.2007, 03:00

I found my problem (zlib.dll was missing).

When Celestia is compiled under Windows using files freshly downloaded from CVS just now, I do *not* see the View Options interactions that you mention. In other words, it would seem to be caused by whatever patch files you've just applied.
Selden

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #65by selden » 24.12.2007, 03:15

Using Fridger's binary I see the blocks in the OGL2 render path while looking at Australia using the lores and medres surface textures distributed with Celestia. High resolution surface textures and VTs are not needed. The blocks go away when cloud shadows are disabled.

I also do not see the Options interactions that Guillermo reports.

System config:
1GB 3.4GHz P4-550, WinXP Pro, sp2
256MB FX7800 GTX, ForceWare 163.75
Fridger's Celestia.
Selden

Johaen
Posts: 341
Joined: 14.01.2006
With us: 18 years 10 months
Location: IL, USA

Post #66by Johaen » 24.12.2007, 03:19

t00fri wrote:[Just to be sure: with "super pixelated" you mean the blocking effects we have displayed above from various cards that do NOT contain G80 chips.


Correct. super pixelated = blocking effects. And the 7900GT is a G71 chip and the 6200 is a NV44 chip I believe.
AMD Athlon X2 4400+; 2GB OCZ Platinum RAM; 320GB SATA HDD; NVidia EVGA GeForce 7900GT KO, PCI-e, 512MB, ForceWare ver. 163.71; Razer Barracuda AC-1 7.1 Gaming Soundcard; Abit AN8 32X motherboard; 600 watt Kingwin Mach1 PSU; Windows XP Media Center SP2;

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #67by selden » 24.12.2007, 03:31

Rebuilding my own copy of Celestia (Fridger's version doesn't include SPICE support) from CVS plus the dynamic cloud patch also shows the blocks and not Guillermo's Options problems.

Guillermo, I suspect you may not have rebuilt everything that needs rebuilding. I always delete all of the Release directories when building from scratch. The makefiles don't always recompile everything that needs to be recompiled.
Selden

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #68by dirkpitt » 24.12.2007, 06:33

Finally tried out the cloud shadow shader patch on my Radeon 9700 and..
It crashed. "rectToSphericalTexture" is apparently null. Probably CreateProceduralCubeMap failed. I guess it's because I don't have EXT_texture_cube_map. However my ATI driver does support ARB_texture_cube_map, is that a good substitute?

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #69by dirkpitt » 24.12.2007, 06:58

Update: Using ARB_texture_cube_map instead allows me to get past the crash.
Unfortunately, I too get aliased cloud shadows. :(

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 4 months
Location: Bariloche, Argentina

Post #70by abramson » 24.12.2007, 13:48

abramson wrote:By the way, while testing with the View Options box open, I noticed a number of bugs:

1. Tick Atmospheres on/off switches clouds on/off
2. Tick Clouds on/off switches Orbits on/off
3. Tick Galaxies on/off switches Atmospheres on/off
... and several other remappings between ticks and effects...


I am glad to say that, after a "makerelease clean" followed by "makerelease", the tick boxes misbehavior disappeared! Ah, the magic of makerelease clean, it is not the first trick I see it performing!

The blocks are still there with the clouds shadows, though.

Regards,

Guillermo

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #71by chris » 27.12.2007, 01:47

dirkpitt wrote:Update: Using ARB_texture_cube_map instead allows me to get past the crash.
Unfortunately, I too get aliased cloud shadows. :(


Celestia should switch to using ARB_texture_cube_map instead of EXT_texture_cube_map. EXT_texture_cube_map was used when the cube map extension was in a more experimental phase of development; now that it's been incorporated as a part of OpenGL 2.0, we should use the ARB version instead.

Your tests on ATI hardware reveal that the problems with cloud shadows are almost certainly not due to a driver bug. Now that I'm back from Christmas traveling, I'll work on figuring out what G80 feature the new cloud shadow shader is implicitly relying upon.

--Chris

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 4 months
Location: Bariloche, Argentina

Post #72by abramson » 27.12.2007, 13:58

Hi. Cloud shadows bug (blocks) are also present with nVidia GeForce 7300 LE, just compiled.

Regards,

Guillermo

phoenix
Posts: 214
Joined: 18.06.2002
With us: 22 years 5 months
Location: Germany - Berlin

Post #73by phoenix » 27.12.2007, 23:16

I just applied your patch on the latest CVS but I don't see much of a difference on my GF 8600 GTS.

when I switch cloudshadows on the clouds just get a bit darker - using the standard celestia earth textures - I can't make up real shadows or sharp edges like in your screenshot.
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #74by chris » 27.12.2007, 23:42

phoenix wrote:I just applied your patch on the latest CVS but I don't see much of a difference on my GF 8600 GTS.

when I switch cloudshadows on the clouds just get a bit darker - using the standard celestia earth textures - I can't make up real shadows or sharp edges like in your screenshot.


The standard earth cloud texture is not high enough resolution to show cloud textures very well. It's a 1024x512 texture, so each texel is about 40km x 40km near the equator. The default cloud layer for Earth is at 7km above the Earth's surface, so even when the sun is at a 45 degree angle, only 1/6 of a texel shadow will protrude from underneath cloud. That might be evident except that bilinear interpolation softens the borders between texels, rendering the shadow effect very subtle.

--Chris

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #75by chris » 28.12.2007, 09:42

To anyone who's tried this patch and seen the block artifacts . . . I'm interesting in seeing a screenshot of cloud shadows with one small change to the patch. Change this line in shadermanager.cpp from this:

Code: Select all

float c1 = 1.0f / 255.0f;

to this:

Code: Select all

float c0 = 0.0f / 255.0f;


This will not fix the problem; I'm just trying to characterize what's happening on non-G80 hardware.

--Chris

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #76by cartrite » 28.12.2007, 12:17

chris wrote:To anyone who's tried this patch and seen the block artifacts . . . I'm interesting in seeing a screenshot of cloud shadows with one small change to the patch. Change this line in shadermanager.cpp from this:

Code: Select all

float c1 = 1.0f / 255.0f;


to this:

Code: Select all

float c0 = 0.0f / 255.0f;



This will not fix the problem; I'm just trying to characterize what's happening on non-G80 hardware.

--Chris
Chris,
Is what you posted a typo? Should it read, change this?

Code: Select all

float c1 = 1.0f / 255.0f;

to this?

Code: Select all

float c1 = 0.0f / 255.0f;

Your change produces a compile error. :?:
EDIT:My change compiles. I did see changes on the G80 but I'll change to the FX5500 and post what I got a little later,
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 4 months
Location: Bariloche, Argentina

Post #77by abramson » 28.12.2007, 12:34

Chris:

That changes gives a compilation error:

Code: Select all

shadermanager.cpp(604) : error C2374: 'c0' : redefinition; multiple initialization
shadermanager.cpp(603) : see declaration of 'c0'
shadermanager.cpp(606) : error C2065: 'c1' : undeclared identifier
shadermanager.cpp(606) : error C3861: 'c0': identifier not found, even with argument-dependent lookup


I put, instead:

Code: Select all

        float c1 = 0.0f / 255.0f;


The result is very similar in the 7300. I'm sending it right away.

Guillermo

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #78by cartrite » 28.12.2007, 15:11

After I changed

Code: Select all

float c1 = 1.0f / 255.0f;
to this

Code: Select all

float c1 = 0.0f / 255.0f;
This is the screen shot with my ge fx5500 256 ram pci card running driver 169.07.

Image

Here is another screen shot of Antarctica. It shows different sized blocks.

Image

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #79by cartrite » 03.01.2008, 13:36

I came up with a list of supported extensions for my 8600 card that are not supported on my 5500 card. There are also 2 extensions on the 5500 list that are not on the 8600. I wonder if this would help.
Vendor: NVIDIA Corporation
Renderer: GeForce 8600 GTS/PCI/SSE2
Version: 2.1.2 NVIDIA 169.07
Max simultaneous textures: 4
Max texture size: 8192

Point size range: 1.000000 - 63.375000
Supported Extensions:
GL_ARB_color_buffer_float
GL_ARB_draw_buffers
GL_ARB_texture_float
GL_ARB_texture_non_power_of_two
GL_ATI_draw_buffers
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_EXT_blend_equation_separate
GL_EXT_bindable_uniform
GL_EXT_depth_bounds_test
GL_EXT_draw_buffers2
GL_EXT_draw_instanced
GL_EXTX_framebuffer_mixed_formats
GL_EXT_framebuffer_sRGB
GL_EXT_geometry_shader4
GL_EXT_gpu_shader4
GL_EXT_packed_float
GL_EXT_texture_array
GL_EXT_texture_buffer_object
GL_EXT_texture_compression_latc
GL_EXT_texture_compression_rgtc
GL_EXT_texture_integer
GL_EXT_texture_mirror_clamp
GL_EXT_texture_shared_exponent
GL_NV_depth_buffer_float
GL_NV_conditional_render
GL_NV_fragment_program2
GL_NV_geometry_shader4
GL_NV_gpu_program4
GL_NV_multisample_coverage
GL_NV_parameter_buffer_object
GL_NV_transform_feedback
GL_NV_vertex_program3
GL_NVX_conditional_render

These 2 extensions are not on the list for the 8600 card.
Vendor: NVIDIA Corporation
Renderer: GeForce FX 5500/PCI/SSE2
Version: 2.1.2 NVIDIA 169.07
Max simultaneous textures: 4
Max texture size: 4096

Point size range: 1.000000 - 63.375000
Supported Extensions:
* GL_EXT_paletted_texture
* GL_EXT_shared_texture_palette

I also checked the shader.log files for both cards running cloudshadows and they were identical.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #80by chris » 03.01.2008, 18:38

cartrite wrote:I came up with a list of supported extensions for my 8600 card that are not supported on my 5500 card. There are also 2 extensions on the 5500 list that are not on the 8600. I wonder if this would help.


Thanks for doing this. But, as far as I can tell, the difference between the GeForce 8 and other GPUs isn't due to a particular extension. I did some experiments with a Radeon 9700 and wasn't able to get rid of the blockiness. So far, it looks like an issue with texture filtering precision. I'm putting this on hold until after 1.5.0; I'm pretty sure that the only workaround will be to enable dynamic cloud shadows only for cube map cloud textures.

--Chris


Return to “Ideas & News”