My attempt to code celestia...

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

My attempt to code celestia...

Post #1by Rassilon » 27.12.2003, 19:31

I figure I should move this over here I can see this getting rather drawn out...

Ok anyone who codes Celestia should know this or have the include file structured already so instead of me re-inventing the wheel could someone be so kind as to post the variable defs that are supposed to be in jconfig.h for Celestia...

I am compiling with Visual Studio 6 using chris's batch program makerelease...

Ive already grabbed the PNG and the JPG libraries and the ZLIB libraries...What else do I need?
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #2by Rassilon » 27.12.2003, 20:48

All fixed thanks to Paolo's very informative thread...

need a sticky on this: http://www.celestiaproject.net/forum/viewtopic ... pile+win32

Im sure Ill be back with new problems though...but for now I need to find some good pluggable code for factural landscaping...

I will be adding some other cool effects in the meantime...Anyone wanted alternate star colors? or the possibility of defining this in stc...Thats what Im looking into right now...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #3by Rassilon » 28.12.2003, 01:57

Several questions namely:

where is the star textures set up?

when adding another stellar class do I make it non-normal? if so how do I add more than 0-3 values to types? 4 gives me an error...says its taken...if types is defined elsewhere...then where? I did get by with -1...but it doesnt matter all my additions were completely ignored...And I did update all star files listed in devguide...


* stellarclass.cpp
* starname.cpp
* star.cpp
* stardb.cpp
Everything to do with stars. StarDatabase contains a list of Stars and a
list of StarNames.

There is of course Black Holes which is defined but also returns garbled information but I was able to fix that...

So where else must I code in new star information?

edit: ^ located in render.ccp
Last edited by Rassilon on 28.12.2003, 06:43, edited 1 time in total.
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #4by maxim » 28.12.2003, 02:02

Rassilon wrote:I will be adding some other cool effects in the meantime...Anyone wanted alternate star colors? or the possibility of defining this in stc.


Hi Rassilon,

are you really keen on getting some feature requests to work on? :D
I've some small ones, that I repeatedly 'stumble over' (this was a word by word translation from german - don't know if it makes sense in english)

Just a word, and I post it. :wink:

maxim.

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #5by Rassilon » 28.12.2003, 02:12

I suppose...Only time will tell and at this rate Ill have something decent by the 101st century...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #6by maxim » 28.12.2003, 02:29

Well, let's see...

I'd have always liked the possibility to cycle through the alternate surfaces list with two keys (up & down) defined on the keyboard, instead of always using the mouse dropdown menu.

I'd also like a keyboard-key that centers my crosshair cursor, so that I can use it as pinpoint for steering my spaceship towards a target.

... some more? :D :wink:

maxim.

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #7by Rassilon » 28.12.2003, 06:38

Well it looks like I finally got somewhere...Thing is would my edits be submissable or would I simply just release the exe with my addons??

I think I might do the latter...unfortunately this means all other platforms would have to just settle without the extras...

Anyways heres a bit of playing around and viola a green star!

Image

This is sort of a reminder of the old days:

http://www.celestiaproject.net/forum/viewtopic.php?t=2

Aww my first post :P Man things have changed!
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #8by maxim » 28.12.2003, 12:47

Very nice! Incredible color!

Is it possible to change the color of sun flares indepentendly from the stars color? Some pink maybe? :D

maxim

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #9by Rassilon » 29.12.2003, 01:07

Im sure anything is possible given time...

Another hack...Flares for emissives giving that extra touch to binary stars...

Image

You just add SetFlare true to the ssc file...

Problem on render though...The current setup will only allow a scaled disc greater than 1 to render the flare...pulling the render flags outside this if statement overloads the stack I believe because it may have to pull this object out of memory everytime it passes a planet...Im sure Chris could come up with something better but for now it does look cool...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #10by maxim » 30.12.2003, 10:38

Flares are derived from a texture thought. (Is that right?)
Exchanging this texture by a second one , let's say every 10th render loop, should result in a nice twinkling effect.
Just an idea. :)

... and happy new year! (Hihi, some rhyming at the end of the year).

maxim :wink:

Don. Edwards
Posts: 1510
Joined: 07.09.2002
Age: 59
With us: 22 years 2 months
Location: Albany, Oregon

Post #11by Don. Edwards » 30.12.2003, 12:00

Maxim,
Stars do not twinkle in space. Their light output remains constant. The twinkling of stars is due to changes in atmospheric density and temperature as seen from a planets surface with a dense enough atmosphere. So what is the purpose of having twinkling stars when you are viewing from space?

Rass,
Cool tweaks. Hope more are on the way.

Don. Edwards
I am officially a retired member.
I might answer a PM or a post if its relevant to something.

Ah, never say never!!
Past texture releases, Hmm let me think about it

Thanks for your understanding.

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #12by maxim » 31.12.2003, 16:06

Don.Edwards wrote:Stars do not twinkle in space. Their light output remains constant.
I know, I know. :)
That was a joke - seeing Rassilon playing around with the code, producing such nice effects like green stars. Just giving him some more inspirations.

Don.Edwards wrote:So what is the purpose of having twinkling stars when you are viewing from space?

There was a very vague idea in the backgroud of using an effect like this for animating such things as aggregation disks, novae, opening wormholes, gamma flashes or similar. But I found that it won't work. As long as one flare texture is used to render all star flares, even the twinkling idea couldn't be realized. The only thing you would get is a syncronous flashing of all stars. A pitty. :(

maxim :D

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #13by Rassilon » 31.12.2003, 19:47

I will be submitting my hacks/tweaks to chris here soon...maybe you will see this in the next release of Celestia here soon...dunno...

I was able to add Wolf Rayet stars they look like a blacklight...You ought to see what the earth looks like around one!

Ill post some pics later...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #14by Rassilon » 01.01.2004, 16:01

After a bit of star tweaking Ive come up with some changes to the way the stars look including a few extras...

Image
from top left to bottom right:
K star, Wolf-Rayet, O Star, R star...

Image
Black hole non collecting, G star F star and A star...

You will notice a difference in the F star and the A star, All stars now use thier own textures...

Also since there is no room for more star types and colors Ive decided to research into adding code to the stc file that will allow one to change color and texture...This will eliminate the phantasy H class green star I created and leave it exclusively up to the author instead of the sourcecode...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Don. Edwards
Posts: 1510
Joined: 07.09.2002
Age: 59
With us: 22 years 2 months
Location: Albany, Oregon

Post #15by Don. Edwards » 02.01.2004, 07:26

Rass,
This looks great. I always felt the stars looked a touch washed out and there wasn't enough detail in color and texture. I do hope Chris considers these hacks. If not I still think that there is room for it as a secondary version of the executable.

Don. Edwards
I am officially a retired member.
I might answer a PM or a post if its relevant to something.

Ah, never say never!!
Past texture releases, Hmm let me think about it

Thanks for your understanding.

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #16by marc » 03.01.2004, 01:35

These stars look great rass. While your at it, how about oblateness?

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #17by Rassilon » 03.01.2004, 04:22

Im sure it wouldnt be a problem just as soon as I figure out a way to bypass the hardcoded star colors and textures...Right now Ive tried creating a method that pretty much suceeds in rendering Celestia useless...The code is logical but the implimentation I worked out isnt compatible...

the other failure is the 16k boundry...I have a method that will allow one to place a star system as far out as they want but this is no better than a modding trick...The entire star plotting engine has to be rewritten or additional classes structured to handle a whole other set of input...stc2 format I suppose...Why oh why did chris use float :P

Other than that I did get emissives to render the star flare properly...just made them emissive class...and the above star chart has been redone...should be more acceptable for Celestia standards...

More to come...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #18by Rassilon » 03.01.2004, 05:01

btw On that stc hack I was trying to impliment...if anyone is interested in looking at what I tried to do and could point me in the right direction by all means...I dont know where to go from here on this one...

http://www.celestialvisions.net/addons/stchack.zip

look for the remmed out code and a label just above it with my name and stc hack...If you do a search for stc hack you will find all my additions...

I was trying to override the current setup for star color and sunlight color to start with...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #19by Rassilon » 03.01.2004, 16:29

Ok star hacks are complete as well as emissive flares...seems all is working ok with one exception...N stars and S stars are somehow reversed...Have no clue what happened but oh well...

Heres the sourcecode of what Ive done so far (jic chris may add to a future release ;))

http://www.celestialvisions.net/addons/starhacks.zip

And heres the updates to the stars...Everything above still applies except R S and N stars and Wolf-Rayet stars have been updated as shown below...

Image

And here is a massive red giant N class star with a small white dwarf...

Image
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #20by Rassilon » 05.01.2004, 01:00

heres a few more screenshots of the galactic center...Now not to mislead or anything but the 16k barrier is still buggy...but does offer a wonderful vista of our milky way when seen from earth...

Image

Image

Tomorrow I will be releasing this exe hack with the updated star textures, emissives and the galactic core...each seperate...

You can either install another copy of Celestia and overwrite it with the exe or just do the latter with your current version...Please backup all files before overwriting anything...

I will post here when its ready...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!


Return to “Development”