Author Topic: Atmospheric glow  (Read 4247 times)

0 Members and 1 Guest are viewing this topic.

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
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. ;)



That was the plan. Btw, would the glow point work if I lay an autopilot route around the planet?
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 would be SO much easier if autopilot was not a consideration.
I have created a masterpiece.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
well a glowpoint cant be lighted as well as a subobject, but it will always face the viewpoint withot overly complicated scripting. a subobject also has the problem that it will be drawn before the planet, so youd only see the edges.

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:

im still trying to learn how the orientation matrix works. its not that hard to figure out which way an object is facing just create a vector at some set angle, like 0,1,0, then orientation:unrtateVector(vector) it to the orientation of the subobject. then you add the unrotated vector to the subobject position. this vector essentially points in whatever direction the subobject is rotated to. though im not sure how to tell an object what vector to point to. right now you can only really borrow a matrix from another object. id like to be able to generate a matrix from a vector or a few vectors. though i may be able to do it with whats there now after a crash course in calculus. :D
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
doesn't the orientation object give you access to the f,r,and u vecs?
well if you want to know wich was an object is looking the last row of the matrix is it's fvec

BTW in regards to the thread, have you consitered just makeing a sphere with it's normals fliped, I think that might look alright so long as you don't get too close, the big problem being that it will have a hard egde.
« Last Edit: January 20, 2007, 09:39:25 am by Bobboau »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
bottom row huh, good to know :D
it gives you a 3x3 indexed 1-9 as well as the p,h,b.

or you can just wait for them shaders :D
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
yeah, it's
rvec[x,y,z]
uvec[x,y,z]
fvec[x,y,z]

as you can see 3X3,
further when the matrix is in it's identity state, the rvec points to the right [1,0,0], uvec points up [0,1,0] and fvec points forward [0,0,1] :)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
ok that helps alot. i might actually figure theese damn matrices out someday :D
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