Page 1 of 2

Limit between day and night... Bug ?

Posted: 22.05.2005, 20:18
by Vincent
Hi,

I was working on my educational script / addon about the day and night lenght and I noticed that the limit between the day and night areas was out of line with the poles while using the "NVIDIA Vertex program and combiner" rendering path, as you can see on the screenshot above...

Is it a known bug or is this normal ?

Has someone already found a way to solve this problem ?

Image

Posted: 22.05.2005, 22:54
by Slalomsk8er
I do not know if this is a bug but it can be, as I observed a out of sync in the shadow on the earth and nightfall at my location.

Posted: 24.05.2005, 11:24
by Vincent
No way to correct this bug neither in the celestia.cfg file nor with a ssc file... This is a big problem though :(

Any other idea ?

Posted: 31.05.2005, 10:15
by Vincent
I've been working for monthes on that project and I can't go further because of this problem...

Students should calculate how long France stays in the dark and the sunlit areas for different axis' inclination. But as the limit between day and night is badly (and unrealisticly) drawn, this won't be possible. The night side is to "large" and takes more than a half of the surface of the earth. It should disappear more "quickly" in the sunlit area...

That's why I really need to know if a patch or anything else could be done to correct the way Celestia draws this limit... But I personnaly am not a programmer...

Thanks a lot to anybody who have an idea about that...

Posted: 31.05.2005, 10:48
by selden
Don't forget that the Earth is a sphere. There is much less light illuminating each square meter of surface as you get closer to the terminator, further away from the sub-Solar point. As a result, the surface is darker when the sun is lower in the sky. That's part of what you're seeing. Calculating the amount of this geometric effect is left as an exercise for the student. ;)

Also, it is true that Celestia's illumination algorithm does need some improvement. Hopefully it'll be changed in a future version of Celestia.

Posted: 31.05.2005, 11:24
by Vincent
Yes, you're right Selden, and I know that. But the area where the illumination is approaching zero shouldn' t be so large, as you can see on satellite's photo of the earth...

The phenomenom is well drawn with the "multitexture" render path, but not with the "NVIDIA Vertex program and combiner"...

We formed an academic group of research to propose a complete pedagogic sequence (video + celestia manipulation) about the day and night lenght, and I really can't wait for a future version of Celestia...
:roll:

By the way, I tried to desactivate the the "NVIDIA Vertex program and combiner" mode in the celestia.cfg file, but I still have access to this mode using 'ctrl + v' in celestia... :?:

Posted: 31.05.2005, 22:00
by Vincent
I should be more precise with my request : What extension(s) do I have to ignore in the celestia.cfg file to avoid the use of the "NVIDIA Vertex program and combiner" render path ?

I would loose the normal map rendering, but that would solve my problem of illumination.

Here are the supported extensions :

Vendor: NVIDIA Corporation
Renderer: GeForce4 MX 440SE with AGP8X/AGP/3DNOW!
Version: 1.3.1

Max simultaneous textures: 2
Max texture size: 2048


Supported Extensions:

GL_ARB_imaging
GL_ARB_multitexture
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_dot3
GL_ARB_transpose_matrix
GL_S3_s3tc
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_compiled_vertex_array
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_multi_draw_arrays
GL_EXT_packed_pixels
GL_EXT_paletted_texture
GL_EXT_point_parameters
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shared_texture_palette
GL_EXT_stencil_wrap
GL_EXT_texture_compression_s3tc
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_cube_map
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod
GL_EXT_texture_lod_bias
GL_EXT_texture_object
GL_EXT_vertex_array
GL_EXT_vertex_weighting
GL_IBM_texture_mirrored_repeat
GL_KTX_buffer_region
GL_NV_blend_square
GL_NV_evaluators
GL_NV_fence
GL_NV_fog_distance
GL_NV_light_max_exponent
GL_NV_packed_depth_stencil
GL_NV_register_combiners
GL_NV_texgen_emboss
GL_NV_texgen_reflection
GL_NV_texture_env_combine4
GL_NV_texture_rectangle
GL_NV_vertex_array_range
GL_NV_vertex_array_range2
GL_NV_vertex_program
GL_NV_vertex_program1_1
GL_SGIS_generate_mipmap
GL_SGIS_multitexture
GL_SGIS_texture_lod
GL_WIN_swap_hint
WGL_EXT_swap_control

Posted: 31.05.2005, 22:55
by selden
1. Please use

Code: Select all

 [code] included text [/code]
around the text you include rather than specifying colors. The shade of cyan that you chose is almost invisible on my system (I use the light-blue subSilver style, not the black and orange Solaris style).

2. Your graphics drivers are way out of date, which may (or may not) be part of the problem.
Please upgrade to the current version, which is free for downloading from nVidia at http://www.nvidia.com/content/drivers/drivers.asp

3. Unfortunately, I don't know the exact set of features implied by "Nvidia combiners". You'll have to experiment with turning off the ones that start with "GL_NV". "register_combiners" seems most likely, but I'm not sure. The easiest way to disable the nVidia features may be to turn down the level of hardware acceleration specified in Windows' display properties configuration.

I hope this helps a little.

Posted: 01.06.2005, 08:33
by Vincent
1- Sorry for the unreadable text, I didn't care about that...

2- I installed the updated drivers a few monthes ago, and I couldn't use the Nview properties anymore. More particularly the "Clone" configuration (that I need to use Celestia on my classroom's TV) made my system crash... That's why I went back to the default drivers...
But I will try again with the latest drivers...

3- I started to experiment with turning off some of the extensions, but did not have a result... I'll try again following your advice...

- Turning down the level of hardware acceleration is a good solution for me, but the addon I'm working on will be used in many schools, and I wanted the "Vertex" mode to be disabled "automaticly" on all these systems for a more convenient use...

4-

Code: Select all

 Once again, many thanks for your patience Selden ! I (and we all here) really appreciate.

Posted: 01.06.2005, 17:55
by Vincent
Ignoring either "GL_NV_vertex_program" or "GL_NV_register_combiners" disables the "Vertex" mode.

Do you think these 3 strings are enough to disable the vertex mode on EVERY system ?

Code: Select all

IgnoreGLExtensions
   [
   "GL_ARB_vertex_program"
   "GL_NV_register_combiners"
   "GL_NV_vertex_program"
    ]


If not, is there a way to do it ? Are there a lot of different OpenGL extensions that can enable the Vertex mode ?

Posted: 01.06.2005, 20:08
by selden
Vincent,

Sorry, I don't know the source code, so I can't answer your questions.

Posted: 01.06.2005, 23:16
by dirkpitt
Vincent wrote:Ignoring either "GL_NV_vertex_program" or "GL_NV_register_combiners" disables the "Vertex" mode.

Do you think these 3 strings are enough to disable the vertex mode on EVERY system ?

Code: Select all

IgnoreGLExtensions
   [
   "GL_ARB_vertex_program"
   "GL_NV_register_combiners"
   "GL_NV_vertex_program"
    ]


If not, is there a way to do it ? Are there a lot of different OpenGL extensions that can enable the Vertex mode ?


Just set "IgnoreGLExtensions [ "GL_NV_vertex_program" ] and it should disable the NV Vertex Program + Combiner path for good on any NVIDIA system. The "enabling" condition is a logical AND, so disabling GL_NV_vertex_program is enough to disable the entire render path. Do not disable GL_ARB_vertex_program, as the absence of it actually enables the NV VP+Combiner path.

Posted: 04.06.2005, 11:50
by Vincent
Hi Dirkpitt,

dirkpitt wrote:Just set "IgnoreGLExtensions [ "GL_NV_vertex_program" ] and it should disable the NV Vertex Program + Combiner path for good on any NVIDIA system. The "enabling" condition is a logical AND, so disabling GL_NV_vertex_program is enough to disable the entire render path.

The GL_NV_vertex_program extension is specific to NVidia graphic cards. Other cards don't support the GL_NV_vertex_program extension. So disabling it wouldn't do anything and the "NVIDIA Vertex program and combiner" mode would still be available. Don't forget I need that mode to be disabled on EVERY system to make my addon correctly run in every school.

dirkpitt wrote:Do not disable GL_ARB_vertex_program, as the absence of it actually enables the NV VP+Combiner path.


I don't think so Dirkpitt. I need to make Celestia ignore the GL_ARB_vertex_program because that disables the "Vertex" mode on other system.

- Here's the configuration I use for my laptop (Intel graphic chipset) :

Code: Select all

IgnoreGLExtensions
   [ "GL_ARB_vertex_program" ]


That correctly disables the "Vertex" mode.

- Here's the configuration I use for my PC (NVidia graphic card), :

Code: Select all

IgnoreGLExtensions
   [
   "GL_ARB_vertex_program"
   "GL_NV_register_combiners"
   "GL_NV_vertex_program"
   ]


That also correctly disables the "Vertex" mode.

Finally, what do you mean by the "NV VP+Combiner path" ?

Posted: 04.06.2005, 14:14
by dirkpitt
Vincent wrote:
dirkpitt wrote:Just set "IgnoreGLExtensions [ "GL_NV_vertex_program" ] and it should disable the NV Vertex Program + Combiner path for good on any NVIDIA system. The "enabling" condition is a logical AND, so disabling GL_NV_vertex_program is enough to disable the entire render path.

The GL_NV_vertex_program extension is specific to NVidia graphic cards. Other cards don't support the GL_NV_vertex_program extension. So disabling it wouldn't do anything


You did specifically say that you wanted to disable the NV VP+Combiner (NVIDIA Vertex program and combiner) path, although I suspect that you were confused on terminology and what you really wanted to say was, "how do I disable vertex programs on all chipsets, not just NVIDIA?"

If what you really want to do is to disable not just NV VP+Combiner, but ALL vertex program render paths, NVIDIA or non-NVIDIA, including but not limited to ARB VP+DOT3, OpenGL 2.0, and NV VP+Combiner, you can do that with:

Code: Select all

IgnoreGLExtensions [ "GL_ARB_vertex_program" "GL_NV_vertex_program" ]

Posted: 04.06.2005, 14:51
by Vincent
Sorry, I thought I was clear enough when I asked that... :roll:
Vincent wrote:Do you think these 3 strings are enough to disable the vertex mode on EVERY system ?

Code: Select all

IgnoreGLExtensions
   [
   "GL_ARB_vertex_program"
   "GL_NV_register_combiners"
   "GL_NV_vertex_program"
    ]


If not, is there a way to do it ? Are there a lot of different OpenGL extensions that can enable the Vertex mode ?


Anyway, thanks a lot for your precious help Dirkpitt ! Selden and you made me make a big step forward !

Posted: 05.06.2005, 11:03
by Vincent
One last question concerning the models :

Most of the schools have old computers with old graphic cards.
What format shall I use (3ds / cmod) to have better chance to make the addon work on these systems ?

Posted: 05.06.2005, 11:22
by selden
Both 3DS and CMOD will work on all systems, so long as they are running Celestia v1.3.2 or later. However, 3DS models can be modified (improved or stolen, depending on your intent) by anyone. Binary CMOD models cannot. Celestia can draw CMOD models 1.5-2x as fast as it draws 3DS models.

DDS image format does not work on systems with older or no 3D cards. Image textures larger than 1K for Meshes, rings and moving clouds also will not work on those systems. Really old cards (like the 3dfx Voodoo series) can only use textures 256 on a side or smaller in those situations. It's often better to turn off graphics acceleration on these really old cards and use Microsoft's software graphics drivers.

Posted: 05.06.2005, 14:13
by Vincent
selden wrote:Both 3DS and CMOD will work on all systems, so long as they are running Celestia v1.3.2 or later. However, 3DS models can be modified (improved or stolen, depending on your intent) by anyone. Binary CMOD models cannot. Celestia can draw CMOD models 1.5-2x as fast as it draws 3DS models.
So I'll keep my 3ds models as I don't mind someone modifies them... Anyway, I don't think 10 years old children will be able to do that... :wink:

However, Celestia crashes when I try to run the addon on that system :
500Mhz
256Mo Ram
Intel i810 graphic chipset (driver up to date)
W98 SE
graphics acceleration turned off

When I use a 3ds models (primitive cylinder with no UV texture) for the rotation axis, Celestia crashes. When use no model, the addon runs correctly... Here's the .ssc file :

"pole_nord_00" "Sol/Earth00"
{
Class "spacecraft"
Mesh "pole_n.3ds"
Radius 2000
LongLat [0 90 2000]
Beginning "9000 01 1 12:00:01"
Ending "9001 01 1 12:00:00"
Emissive true
}

"pole_sud_00" "Sol/Earth00"
{
Class "spacecraft"
Mesh "pole_s.3ds"
Radius 2000
LongLat [0 -90 2000]
Beginning "9000 01 1 12:00:01"
Ending "9001 01 1 12:00:00"
Emissive true
}

Have you got a clue why Celestia crashes ?


selden wrote:DDS image format does not work on systems with older or no 3D cards. Image textures larger than 1K for Meshes, rings and moving clouds also will not work on those systems. Really old cards (like the 3dfx Voodoo series) can only use textures 256 on a side or smaller in those situations. It's often better to turn off graphics acceleration on these really old cards and use Microsoft's software graphics drivers.


Yes, I joined png and jpg versions of the textures in the hires and lores folders.

Posted: 05.06.2005, 19:30
by selden
Crashes are almost invariably caused by obsolete, buggy OpenGL drivers.

I believe that updating to the newest version of DirectX (v0.9c, free for downloading from Microsoft) will include their most recent software OpenGL drivers. I don't know how long they'll continue to provide downloads compatible with Win98. The hardware OpenGL support that they include is not the most recent, so after installing DirectX, you should download and install the most recent drivers from Intel. (Or from the appropriate vendor when other graphics cards are used.)

Posted: 06.06.2005, 19:38
by Vincent
selden wrote:Crashes are almost invariably caused by obsolete, buggy OpenGL drivers.

I believe that updating to the newest version of DirectX (v0.9c, free for downloading from Microsoft) will include their most recent software OpenGL drivers. I don't know how long they'll continue to provide downloads compatible with Win98. The hardware OpenGL support that they include is not the most recent, so after installing DirectX, you should download and install the most recent drivers from Intel. (Or from the appropriate vendor when other graphics cards are used.)


Thanks, I already have the DirectX 9.c version on the other system, so I'll try to install it on the Win98 system.

Selden, here's my last question (for a while) if you still have some time :

Can Celestia work without an official version has been installed first ?
I mean, can I just propose the future users of my addon to directly paste the folder containing my own version of Celestia ? Or does Celestia need to write something in the registry to run correctly ?
I admit I could try with one of my systems, but Celestia has already been installed on all of them :wink:

If this could be possible, I would propose an .exe install file for my addon. Of course, I will keep all the original text files that contains the copyright of the original version of Celestia.