Author Topic: Atmospheric glow  (Read 4248 times)

0 Members and 1 Guest are viewing this topic.

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
I've been working on a 3d planet for FS2 and ran into a small problem. How do I implement atmospheric glow? Obviosly I can't use a falloff map (like I do in max). Would a glow point work? Any ideas? :)
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 
This idea MAY work. Render a map of the fall off as a texture, create a plane and apply that texture, and put it over the planet and position it just right in game so that it creates that illusion.
I have created a masterpiece.

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
Does a glowmap not work for whatever you have in mind?
Freelance Modeler | Amateur Artist

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
I think he wants it to extend out around the planet.
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
I was trying to think of a way to make a glowmap work, but it'd all involve a flat plane rather than a planet model... so I think you may end up having to wait for shaders...
Freelance Modeler | Amateur Artist

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
do what vengence says but make the sprite plane with the glow a subobject. then script it so that it always faces the player. then you can fly around it and it would look right from every angle.
« Last Edit: January 17, 2007, 09:17:34 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline gevatter Lars

  • Another wingnut
  • 213
    • http://gevatter_lars.tripod.com/
My problem would be that you would allways have the same amount of glow around the object don't you? I mean a bright atmo on the dark side of the planet?
"Yes! That is my plan, and I see nothing wrong with it. I figure that if I stick to a stupid strategy long enough it might start to work."
 - comment to "Robotech: The Masters"

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
......do you really travel that far in the game to get all the way around the model?

Or do you mean if it rotates about its axis?
Freelance Modeler | Amateur Artist

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
you can change the orientation of subobjects in the scripting. youd run a script that makes sure the atmoshpere plane always faces the player. youl always see the atmo halo around the planet because your always looking at it straight on. in other words the atmosphere turns by its self so that its always facing you.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
you can change the orientation of subobjects in the scripting. youd run a script that makes sure the atmoshpere plane always faces the player. youl always see the atmo halo around the planet because your always looking at it straight on. in other words the atmosphere turns by its self so that its always facing you.

now that's an idea. :) Uh, yeah, but how? :D

In fact you do travel quite a lot in WC Saga. And I think passing a planet is simply magnificent. At any rate, the only drawback is that the halo around the planet will have same intencity at all times, but I guess we can't help it. At leats not till shaders arrive.

Anyway, are there any tutorials around for scripting? None on the team has used it before :(
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline vaang

  • 22
EDIT: nevermind

 
In fact you do travel quite a lot in WC Saga. And I think passing a planet is simply magnificent. At any rate, the only drawback is that the halo around the planet will have same intencity at all times, but I guess we can't help it. At leats not till shaders arrive.


Oh man, I didn't know you were doing it for WC.
I have created a masterpiece.

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
In fact you do travel quite a lot in WC Saga. And I think passing a planet is simply magnificent. At any rate, the only drawback is that the halo around the planet will have same intencity at all times, but I guess we can't help it. At leats not till shaders arrive.


what's the difference? :)

It is still FS2 engine :D

Oh man, I didn't know you were doing it for WC.
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
The biggest problem here is to get the atmospheric glow to mach the shape of the planet visible. If you make a static glow sprite that always faces the player, you'll end up with rather strange situation when half of the planet is illuminated but you still see the atmospheric glow in the dark side.

Here's an option: Make a shell around the planet. The shell must always face the player.

Then texture that shell so that only the half facing the player has a texture, rest is transparent. The texture must be faded towards the edges, so that when the shell is viewed from the viewpoint, it appears as a round blob with indefinite edges. That should cause an illusion of fading, even though the model's surface itself would be solid. And the local light source would take care of making the atmosphere visibe in appropriate places, especially if the shell would be a subobject of the planet.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
hmm... I am not sure how to achieve this effect. Wouldn't it affect surface visibility as well?
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Obviously. That's what atmosphere does. The key is to find the correct opacity level and blur it towards the edges, so that the atmosphere seems to blur out into the void on the edges. That way the atmosphere doesn't tint the whole planet overly blue or turquoise (or whatever colour you want the atmo to be), while it still retains visibility when observed against dark space.

The blur does not only affect around the planet. It affects the whole visible surface of the planet. But as the typical albedo of a habitable planet is in most cases much bigger than darkness of empty space, the diffuse light from atmosphere blends into the surface reflections and isn't as easily observable as it is against the darkness of space. But believe me, the diffuse atmospheric light covers pretty much all of the planet. :)


EDIT: You could also make it so that the texture is actually BEHIND the planet, but extends somewhat over the edges to make the glow appear. I would put it in the front, but both ways would work.
« Last Edit: January 18, 2007, 10:26:08 am by Herra Tohtori »
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Yeah, I know what you mean. And I can do it in MAX. I just do not know how to implement your suggestion into the game...
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
you can change the orientation of subobjects in the scripting. youd run a script that makes sure the atmoshpere plane always faces the player. youl always see the atmo halo around the planet because your always looking at it straight on. in other words the atmosphere turns by its self so that its always facing you.


That's what I would use, but I too have no specific idea of the syntax to achieve that. Mathematic part is easy, though...

The script needs to get the planet location P1(X1,Y1,Z1) and player's location P2(X2,Y2,Z2). After that it's easy to calculate the attitude vector for the atmosphere shell subobject thingamaroo. In composite form, the vector will always be

s = P1->P2 = (X2-X1)i + (Y2-Y1)j + (Z2-Z1)k

I don't know if these co-ordinates should be converted to polar space co-ordinates with pitch and heading values (or latitude, longitude) somewhere along the road, but that's how you could do it, and then the atmosphere diffuse shell would always face the player.

I really need to learn Lua scripting... :rolleyes: It's just I don't have too much spare time. :mad:
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

  

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
I really need to learn Lua scripting... :rolleyes: It's just I don't have too much spare time. :mad:

Same here. I simly do not have the time. :(

I do hope that someone can help me here though :D
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
You could use glowpoints at planets.

High-res image DXT5 with mipmaps(!) and kill the player ship, if the player gets too close.

(Or place an invisilbe collision box around the glowpoint.

Just in case the player uses time compression to get there.  :drevil:

Ok... the planet will always look the same. But if it's really far away, you might not even notice it. ;)

--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------