Page 1 of 2

Celestia 1.4.0 prerelease 5

Posted: 02.11.2004, 19:09
by chris
Yet another prerelease for Windows . . . This one includes Grant's nearstars.stc and extrasolar.stc files, so it's a full package:

http://www.celestiaproject.net/~claurel/celest ... .0pre5.exe

extrasolar.stc has definitions for stars that aren't in the Hipparcos catalog and are known to have planets. nearstars.stc contains every known star out to 25ly with orbits for all multiple systems.

I've also added some more shader fixes for ATI users and fixed shadows on cloud layers in the OpenGL 2.0 path.

--Chris

Posted: 02.11.2004, 20:56
by mk
Still nothing on Radeon 9600... :(
Earth looks like a disco ball or sth.
Oh, there is one difference - Saturn is no longer red! Now it's black :)
Image

Posted: 02.11.2004, 21:43
by Commander David
Hi Chris,

the problem is always there. Same thing as before. Sorry :cry:
I know you work hard on the new renderpath and i wish you find the bug soon. I love celestia, you have done a great program. Thanks.

Posted: 02.11.2004, 21:53
by selden
mk and Commander David,

Please post the contents of shaders.log.
Chris needs to see the error messages generated by ATI's shader compiler.

Posted: 02.11.2004, 21:55
by chris
The problem is that I've fixed all the compiler errors, and there are still problems. I have no idea what's going on . . . Unless someone with an ATI card wants to work on the shaders, the OpenGL 2.0 path is likely to be NVIDIA-only. I tried . . .

--Chris

Posted: 02.11.2004, 21:58
by Dollan
Just a quick question, since we all must realize by now how easily This One gets confused.... :wink:

Now, how does this effect the double star systems that I've already made stc files for? When I transfer the add-ons over to the new version, should I just delete the stc files that I made? Odds are they aren't very accurate.

...John...

Posted: 02.11.2004, 22:00
by chaos syndrome logged off
This bundle does not contain the HD and SAO cross indexes, they need to be downloaded from the CVS site.

Posted: 02.11.2004, 22:20
by mk
selden wrote:mk and Commander David,

Please post the contents of shaders.log.
Chris needs to see the error messages generated by ATI's shader compiler.


Log seems to have *no* error messages...
:?

Code: Select all

Vertex shader source:
  1: uniform struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } lights[1];
  7: uniform float shininess;
  8: varying vec4 spec;
  9: varying vec2 diffTexCoord;
 10: varying vec2 normTexCoord;
 11: varying vec3 lightDir0;
 12: varying vec2 specTexCoord;
 13: varying vec2 nightTexCoord;
 14: varying float totalLight;
 15: uniform float textureOffset;
 16: attribute vec3 tangent;
 17:
 18: void main(void)
 19: {
 20: float nDotVP;
 21: float nDotHV;
 22: nDotVP = max(0.0, dot(gl_Normal, lights[0].direction));
 23: nDotHV = max(0.0, dot(gl_Normal, lights[0].halfVector));
 24: spec += vec4(lights[0].specular * (pow(nDotHV, shininess) * nDotVP), 0.0);
 25: totalLight += nDotVP;
 26: totalLight = 1.0 - totalLight;
 27: totalLight = totalLight * totalLight * totalLight * totalLight;
 28: vec3 bitangent = cross(gl_Normal, tangent);
 29: lightDir0.x = dot(tangent, lights[0].direction);
 30: lightDir0.y = dot(-bitangent, lights[0].direction);
 31: lightDir0.z = dot(gl_Normal, lights[0].direction);
 32: diffTexCoord = gl_MultiTexCoord0.st;
 33: diffTexCoord.x += textureOffset;
 34: normTexCoord = gl_MultiTexCoord1.st;
 35: specTexCoord = gl_MultiTexCoord2.st;
 36: nightTexCoord = gl_MultiTexCoord3.st;
 37: gl_Position = ftransform();
 38: }

Fragment shader source:
  1: uniform vec3 ambientColor;
  2: vec4 diff = vec4(ambientColor, 1);
  3: uniform vec3 lightcolor0;
  4: uniform vec3 lightspecColor0;
  5: varying vec4 spec;
  6: varying vec2 diffTexCoord;
  7: uniform sampler2D diffTex;
  8: varying vec2 normTexCoord;
  9: varying vec3 lightDir0;
 10: uniform sampler2D normTex;
 11: varying vec2 specTexCoord;
 12: uniform sampler2D specTex;
 13: varying vec2 nightTexCoord;
 14: uniform sampler2D nightTex;
 15: varying float totalLight;
 16:
 17: void main(void)
 18: {
 19: vec4 color;
 20: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 21: float l;
 22: l = max(0.0, dot(lightDir0, n)) * clamp(lightDir0.z * 8.0, 0.0, 1.0);
 23: diff += vec4(l * lightcolor0, 0.0);
 24: color = texture2D(diffTex, diffTexCoord.st);
 25: gl_FragColor = color * diff + texture2D(specTex, specTexCoord.st) * spec;
 26: gl_FragColor += texture2D(nightTex, nightTexCoord.st) * totalLight;
 27: }

Vertex shader source:
  1: uniform struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } lights[1];
  7: uniform vec3 ambientColor;
  8: varying vec4 diff;
  9: varying vec2 diffTexCoord;
 10: uniform float textureOffset;
 11:
 12: void main(void)
 13: {
 14: float nDotVP;
 15: diff = vec4(ambientColor, 1.0);
 16: nDotVP = max(0.0, dot(gl_Normal, lights[0].direction));
 17: diff += vec4(lights[0].diffuse * nDotVP, 0.0);
 18: diffTexCoord = gl_MultiTexCoord0.st;
 19: diffTexCoord.x += textureOffset;
 20: gl_Position = ftransform();
 21: }

Fragment shader source:
  1: varying vec4 diff;
  2: varying vec2 diffTexCoord;
  3: uniform sampler2D diffTex;
  4:
  5: void main(void)
  6: {
  7: vec4 color;
  8: color = texture2D(diffTex, diffTexCoord.st);
  9: gl_FragColor = color * diff;
 10: }

Vertex shader source:
  1: uniform struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } lights[1];
  7: uniform float shininess;
  8: uniform vec3 ambientColor;
  9: varying vec4 diff;
 10: varying vec4 spec;
 11: varying vec2 diffTexCoord;
 12: varying vec2 nightTexCoord;
 13: varying float totalLight;
 14: uniform float textureOffset;
 15:
 16: void main(void)
 17: {
 18: float nDotVP;
 19: float nDotHV;
 20: diff = vec4(ambientColor, 1.0);
 21: nDotVP = max(0.0, dot(gl_Normal, lights[0].direction));
 22: nDotHV = max(0.0, dot(gl_Normal, lights[0].halfVector));
 23: diff += vec4(lights[0].diffuse * nDotVP, 0.0);
 24: spec += vec4(lights[0].specular * (pow(nDotHV, shininess) * nDotVP), 0.0);
 25: totalLight += nDotVP;
 26: totalLight = 1.0 - totalLight;
 27: totalLight = totalLight * totalLight * totalLight * totalLight;
 28: diffTexCoord = gl_MultiTexCoord0.st;
 29: diffTexCoord.x += textureOffset;
 30: nightTexCoord = gl_MultiTexCoord1.st;
 31: gl_Position = ftransform();
 32: }

Fragment shader source:
  1: varying vec4 diff;
  2: varying vec4 spec;
  3: varying vec2 diffTexCoord;
  4: uniform sampler2D diffTex;
  5: varying vec2 nightTexCoord;
  6: uniform sampler2D nightTex;
  7: varying float totalLight;
  8:
  9: void main(void)
 10: {
 11: vec4 color;
 12: color = texture2D(diffTex, diffTexCoord.st);
 13: gl_FragColor = color * diff + color.a * spec;
 14: gl_FragColor += texture2D(nightTex, nightTexCoord.st) * totalLight;
 15: }

Vertex shader source:
  1: uniform struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } lights[1];
  7: varying vec4 diffFactors;
  8: varying vec2 diffTexCoord;
  9: uniform float ringWidth;
 10: uniform float ringRadius;
 11: varying float ringShadowTexCoord0;
 12: uniform float textureOffset;
 13:
 14: void main(void)
 15: {
 16: float nDotVP;
 17: nDotVP = max(0.0, dot(gl_Normal, lights[0].direction));
 18: diffFactors.x = nDotVP;
 19: diffTexCoord = gl_MultiTexCoord0.st;
 20: diffTexCoord.x += textureOffset;
 21: vec3 ringShadowProj;
 22: ringShadowProj = gl_Vertex.xyz + lights[0].direction * max(0.0, gl_Vertex.y / -lights[0].direction.y);
 23: ringShadowTexCoord0 = length(ringShadowProj) * ringWidth - ringRadius;
 24: gl_Position = ftransform();
 25: }

Fragment shader source:
  1: uniform vec3 ambientColor;
  2: vec4 diff = vec4(ambientColor, 1);
  3: uniform vec3 lightcolor0;
  4: varying vec4 diffFactors;
  5: varying vec2 diffTexCoord;
  6: uniform sampler2D diffTex;
  7: uniform sampler2D ringTex;
  8: varying float ringShadowTexCoord0;
  9:
 10: void main(void)
 11: {
 12: vec4 color;
 13: float shadow;
 14: shadow = diffFactors.x;
 15: shadow *= (1.0 - texture2D(ringTex, vec2(ringShadowTexCoord0, 0.0)).a);
 16: diff += shadow * vec4(lightcolor0, 0.0);
 17: color = texture2D(diffTex, diffTexCoord.st);
 18: gl_FragColor = color * diff;
 19: }

Vertex shader source:
  1: uniform struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } lights[1];
  7: uniform vec3 eyePosition;
  8: varying vec4 diffFactors;
  9: varying vec2 diffTexCoord;
 10: uniform vec4 shadowTexGenS0_0;
 11: uniform vec4 shadowTexGenT0_0;
 12: varying vec3 shadowTexCoord0_0;
 13:
 14: void main(void)
 15: {
 16: float nDotVP;
 17: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 18: diffFactors.x = (dot(lights[0].direction, eyeDir) + 1.0) * 0.5;
 19: diffTexCoord = gl_MultiTexCoord0.st;
 20: shadowTexCoord0_0.x = dot(gl_Vertex, shadowTexGenS0_0);
 21: shadowTexCoord0_0.y = dot(gl_Vertex, shadowTexGenT0_0);
 22: shadowTexCoord0_0.z = dot(gl_Vertex.xyz, lights[0].direction);
 23: gl_Position = ftransform();
 24: }

Fragment shader source:
  1: uniform vec3 ambientColor;
  2: vec4 diff = vec4(ambientColor, 1);
  3: uniform vec3 lightcolor0;
  4: varying vec4 diffFactors;
  5: varying vec2 diffTexCoord;
  6: uniform sampler2D diffTex;
  7: varying vec3 shadowTexCoord0_0;
  8: uniform float shadowScale0_0;
  9: uniform float shadowBias0_0;
 10:
 11: void main(void)
 12: {
 13: vec4 color;
 14: float shadow;
 15: vec2 shadowCenter;
 16: float shadowR;
 17: shadow = 1.0;
 18: shadowCenter = shadowTexCoord0_0.st - vec2(0.5, 0.5);
 19: shadowR = clamp(dot(shadowCenter, shadowCenter) * shadowScale0_0 + shadowBias0_0, 0.0, 1.0);
 20: shadow *= sqrt(shadowR);
 21: shadow = min(1.0, shadow + step(0.0, shadowTexCoord0_0.z));
 22: diff += (shadow * diffFactors.x) * vec4(lightcolor0, 0.0);
 23: color = texture2D(diffTex, diffTexCoord.st);
 24: gl_FragColor = color * diff;
 25: }

Posted: 02.11.2004, 22:26
by Evil Dr Ganymede
chaos syndrome logged off wrote:This bundle does not contain the HD and SAO cross indexes, they need to be downloaded from the CVS site.


Can you please post direct links to the relevant files, for those of us who don't know where the CVS site is? Ta.

Posted: 02.11.2004, 22:45
by TERRIER
Evil Dr Ganymede wrote:
chaos syndrome logged off wrote:This bundle does not contain the HD and SAO cross indexes, they need to be downloaded from the CVS site.

Can you please post direct links to the relevant files, for those of us who don't know where the CVS site is? Ta.


I think you should be able to find what you are looking for here;

http://cvs.sourceforge.net/viewcvs.py/c ... a/#dirlist

regards,
TERRIER

Posted: 02.11.2004, 22:45
by ajtribick
Evil Dr Ganymede wrote:
chaos syndrome logged off wrote:This bundle does not contain the HD and SAO cross indexes, they need to be downloaded from the CVS site.

Can you please post direct links to the relevant files, for those of us who don't know where the CVS site is? Ta.


Ok, here it is:

http://cvs.sourceforge.net/viewcvs.py/celestia/celestia/data/

Posted: 02.11.2004, 22:49
by TERRIER
Wow, synchronised posting :lol:

Posted: 02.11.2004, 23:00
by Evil Dr Ganymede
OK, ta. So we just need to download the saoxindex.dat file and put it in the data directory, yes?

Posted: 02.11.2004, 23:07
by Dollan
But our home-made stc files (made in order to create true binaries with the release of 1.4.0 series) should still be deleted in favor of the Pre5 version, yes?

...John...

Posted: 03.11.2004, 00:15
by ajtribick
Evil Dr Ganymede wrote:OK, ta. So we just need to download the saoxindex.dat file and put it in the data directory, yes?


...and hdxindex.dat

Posted: 03.11.2004, 10:30
by Guckytos
Just some quick questions.

If i want to create a "green" star in the new Celestia 1.4.0prewhatever i still do have to it in the old way?
By creating a sphere around the star in a SSC and mapping a green texture on it?
Or can i now put that into the STC?

How about putting a customisable star type into the STC? Like, say a normal G star type, where you then can define the light spectrum color?

Regards,

Guckytos.

P.S.: The updated STC guide will be put online saturday or sunday on my webpage. But i will post again when it's up.

Posted: 03.11.2004, 11:47
by selden
Guckytos,

Celestia uses official IAU nomenclature for the spectral types of stars. Since no green stars have ever been observed, there are no IAU designations which would cause Celestia do draw green stars. I doubt that Chris would be willing to add imaginary designations.

That said, v1.4.0 does let you specify any Texture that you want for a star's surface, even a green one. I haven't tried it, yet, so I don't know if the coloration of a texture will change the color of the light that a star emits. My opinion is that it should, but I also suspect that such a feature would be rather complicated to implement.

Please take a look at the Web page http://www.lepp.cornell.edu/~seb/celestia/stc-file-parameters.html. I've tried to summarize the state of STC declarations as of Celestia v1.4.0pre1. They haven't changed since then, but I wouldn't be a bit surprised if they do get modified before v1.4.0final.

Posted: 03.11.2004, 17:45
by Dollan
It suddenly struck me... we could finally have the egg-shaped Altair (as an example) in this version, couldn't we?

...John...

Posted: 03.11.2004, 18:04
by selden
John,

Yes, indeed.

You can do it by providing appropriate values to SemiAxes, or you can provide a Mesh with the appropriate shape.

Posted: 03.11.2004, 18:08
by Dollan
I'm not quite sure... Could you give an example of the appropriate SemiAxes? If you don't mind, of course.

I *really* need to get one of those freeware mesh-makers and learn it, though. Any suggestions on a good one for Celestia?

...John...