Page 1 of 2
My attempt to code celestia...
Posted: 27.12.2003, 19:31
by Rassilon
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?
Posted: 27.12.2003, 20:48
by Rassilon
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...
Posted: 28.12.2003, 01:57
by Rassilon
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
Posted: 28.12.2003, 02:02
by maxim
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?
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.
maxim.
Posted: 28.12.2003, 02:12
by Rassilon
I suppose...Only time will tell and at this rate Ill have something decent by the 101st century...
Posted: 28.12.2003, 02:29
by maxim
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?
maxim.
Posted: 28.12.2003, 06:38
by Rassilon
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!
This is sort of a reminder of the old days:
http://www.celestiaproject.net/forum/viewtopic.php?t=2
Aww my first post
Man things have changed!
Posted: 28.12.2003, 12:47
by maxim
Very nice! Incredible color!
Is it possible to change the color of sun flares indepentendly from the stars color? Some pink maybe?
maxim
Posted: 29.12.2003, 01:07
by Rassilon
Im sure anything is possible given time...
Another hack...Flares for emissives giving that extra touch to binary stars...
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...
Posted: 30.12.2003, 10:38
by maxim
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
Posted: 30.12.2003, 12:00
by Don. Edwards
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
Posted: 31.12.2003, 16:06
by maxim
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
Posted: 31.12.2003, 19:47
by Rassilon
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...
Posted: 01.01.2004, 16:01
by Rassilon
After a bit of star tweaking Ive come up with some changes to the way the stars look including a few extras...
from top left to bottom right:
K star, Wolf-Rayet, O Star, R star...
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...
Posted: 02.01.2004, 07:26
by Don. Edwards
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
Posted: 03.01.2004, 01:35
by marc
These stars look great rass. While your at it, how about oblateness?
Posted: 03.01.2004, 04:22
by Rassilon
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
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...
Posted: 03.01.2004, 05:01
by Rassilon
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...
Posted: 03.01.2004, 16:29
by Rassilon
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...
And here is a massive red giant N class star with a small white dwarf...
Posted: 05.01.2004, 01:00
by Rassilon
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...
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...