Author Topic: Source Code Question - Cloaking?  (Read 3284 times)

0 Members and 1 Guest are viewing this topic.

Offline The SLOTH!

  • Black Lancer
  • 26
Source Code Question - Cloaking?
Hey hey, I'm very curious as to what new things could come out of the source code, and seeing as though the G.E Program is based upon Wing Commander and Wing Commander has cloaking, I just feel like asking...

Is cloaking now possible?
Think it's possible?
Could anyone do it?
Can  anyone do it?

That'd be simply kick ass...  :D

Later guys,
The SLOTH!
"Everyone dies.  It’s the final and only lasting Justice. Evil exists; it is intelligence in the service of entropy. When the side of a mountain slides down to kill a village, it is not evil, for evil requires intent. Should a sentient being cause that landslide, there is evil; and requires Justice as a consequence, so that civilization can exist.  There is no greater good than Justice; and only if law serves Justice is it a good law. It is said correctly that law exists not for the Just but for the unjust, for the Just carry the law in their hearts, and do not need to call it from afar.  I bow to no one and I give service only for cause."
- Jaster Mereel -

"Let my soul drive my creativity; Let my heart pour forth in my work.  When you've seen the light, you've seen The Sloth."
- The Sloth -

"KISS IT!"
- The Sloth -

 

Offline Fury

  • The Curmudgeon
  • 213
Source Code Question - Cloaking?
There's already cloaking, but I bet you want that ships can also visually cloak... I think it's possible but I have no idea how much new code it requires...

 

Offline The SLOTH!

  • Black Lancer
  • 26
Source Code Question - Cloaking?
Only one word can describe that...
Cool

:D
"Everyone dies.  It’s the final and only lasting Justice. Evil exists; it is intelligence in the service of entropy. When the side of a mountain slides down to kill a village, it is not evil, for evil requires intent. Should a sentient being cause that landslide, there is evil; and requires Justice as a consequence, so that civilization can exist.  There is no greater good than Justice; and only if law serves Justice is it a good law. It is said correctly that law exists not for the Just but for the unjust, for the Just carry the law in their hearts, and do not need to call it from afar.  I bow to no one and I give service only for cause."
- Jaster Mereel -

"Let my soul drive my creativity; Let my heart pour forth in my work.  When you've seen the light, you've seen The Sloth."
- The Sloth -

"KISS IT!"
- The Sloth -

 
Source Code Question - Cloaking?
Seems to me there's two ways (at least) to accomplish cloaking.  One is (probably relatively) easy, the other is much harder, but MUCH more realistic and cool looking (though probably quite system intensive).

The first way is for a ship to fade away and then become invisible and not rendered.  Blah.  (-;

The second way is for a ship to assume a texture map that matches what's behind it.  Basically an animated texture map of stars - the faster the ship moves, the faster the stars move.  Basically, the end result would be that one would see something fly by that's distorting the starfield, but only a little bit.  It would be really cool, still visually detectable (if you're REALLY careful and sharp-eyed), and probably REALLY hard to do.  [grin].  Just my thoughts.

  --TurboNed
"It is the year 2000, but where are the flying cars? I was promised flying cars! I don't see any flying cars. Why? Why? Why?" - [size=-2]Avery Brooks from an IBM commercial[/size]

 

Offline Stryke 9

  • Village Person
    Reset count: 4
  • 211
Source Code Question - Cloaking?
If it were possible with our limited abilities to get stuff with that level of complexity in, we could just give textures refractive properties so you'd actually BE seeing through the ship, with the distortion present.

 
Source Code Question - Cloaking?
Quote
Originally posted by Stryke 9
If it were possible with our limited abilities to get stuff with that level of complexity in, we could just give textures refractive properties so you'd actually BE seeing through the ship, with the distortion present.


Does that mean that such a thing is beyond our abilities?  As usual, I was just spewing ideas with absolutely no idea of the do-ability of the ideas.  (-:

  --TurboNed
"It is the year 2000, but where are the flying cars? I was promised flying cars! I don't see any flying cars. Why? Why? Why?" - [size=-2]Avery Brooks from an IBM commercial[/size]

 

Offline Stryke 9

  • Village Person
    Reset count: 4
  • 211
Source Code Question - Cloaking?
As far as I know. Were we a powerful corporation with a large, full-time staff of professionals and the best equipment available, it would be iffy, and unlikely to happen anytime soon without prohibitive memory and hard disk costs. As it is, we're a bunch of loosely confederated amateurs, all working with completely different software, a vague idea of coding, and divergent, often conflicting interests. If I were you, I wouldn't hold my breath- the best we can hope for, I think, is an upgrade as far as poly counts, textures, etc. and customizability go. But I dunno... stranger things have happened, and the Internet is certainly the place for strangeness...

 
Source Code Question - Cloaking?
I have made a one-use cloak without any code changes, basically using three shells; a visible fighter, an invisible cloaking level and another visible fighter. It works reasonably well, and WS-thunder is using it for his campaign.

There are two things that could be done to improve this system; firstly, the creation of an invisible texture that can actually be shot (the existing 'invisible' allows gunfire through) and second, make it so that when a subobject is destroyed and gone, the object returns if it is repaired.  If both these things are implemented, then the cloak should work with just two shells (visible fighter, invisible cloak) and it could also be made usable more than once.

I'm no programmer though. :(

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Source Code Question - Cloaking?
Quote
Originally posted by Stryke 9
As far as I know. Were we a powerful corporation with a large, full-time staff of professionals and the best equipment available, it would be iffy, and unlikely to happen anytime soon without prohibitive memory and hard disk costs. As it is, we're a bunch of loosely confederated amateurs, all working with completely different software, a vague idea of coding, and divergent, often conflicting interests. If I were you, I wouldn't hold my breath- the best we can hope for, I think, is an upgrade as far as poly counts, textures, etc. and customizability go. But I dunno... stranger things have happened, and the Internet is certainly the place for strangeness...


Actually, and I ain't a programmer, but I would think that it would not be all that difficult to call whatever 3D function is needed to make a ship (at the very lowest end of graphics card compatability) 90% transparent. For those with cards that have more advanced functions (T&L..?), an actual distortion would probably be easy as well.

Or heck, take for example what Westwood did with the stealth tank and troopers in Renegade - looks like nothing more than an animated glowy wavy texture in screen (Photoshop calls it screen, at least) mode.
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Source Code Question - Cloaking?
Quote
Originally posted by Fulgrymm
I have made a one-use cloak without any code changes, basically using three shells; a visible fighter, an invisible cloaking level and another visible fighter. It works reasonably well, and WS-thunder is using it for his campaign.

There are two things that could be done to improve this system; firstly, the creation of an invisible texture that can actually be shot (the existing 'invisible' allows gunfire through) and second, make it so that when a subobject is destroyed and gone, the object returns if it is repaired.  If both these things are implemented, then the cloak should work with just two shells (visible fighter, invisible cloak) and it could also be made usable more than once.

I'm no programmer though. :(


bah, the destroyable subsystem trick... we do that for the tranforming veritech in the robotech mode. Come on! with the source, if I want a solution to things like that, it's surely not by tweaking a tweak :p.
Opacity settings are already  available for models in FS2 ( thrusters ). Now it's just a matter of changing this setting accordng to a key binding, which would also turn stealth mode on.
Dunno how hard it is to model, but it's most likely very possible to do in FS2.
SCREW CANON!

 

Offline The SLOTH!

  • Black Lancer
  • 26
Source Code Question - Cloaking?
Sounds promising, I like it.  :D
"Everyone dies.  It’s the final and only lasting Justice. Evil exists; it is intelligence in the service of entropy. When the side of a mountain slides down to kill a village, it is not evil, for evil requires intent. Should a sentient being cause that landslide, there is evil; and requires Justice as a consequence, so that civilization can exist.  There is no greater good than Justice; and only if law serves Justice is it a good law. It is said correctly that law exists not for the Just but for the unjust, for the Just carry the law in their hearts, and do not need to call it from afar.  I bow to no one and I give service only for cause."
- Jaster Mereel -

"Let my soul drive my creativity; Let my heart pour forth in my work.  When you've seen the light, you've seen The Sloth."
- The Sloth -

"KISS IT!"
- The Sloth -

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Source Code Question - Cloaking?
Quote
Originally posted by Fulgrymm
I have made a one-use cloak without any code changes, basically using three shells; a visible fighter, an invisible cloaking level and another visible fighter. It works reasonably well, and WS-thunder is using it for his campaign.

There are two things that could be done to improve this system; firstly, the creation of an invisible texture that can actually be shot (the existing 'invisible' allows gunfire through) and second, make it so that when a subobject is destroyed and gone, the object returns if it is repaired.  If both these things are implemented, then the cloak should work with just two shells (visible fighter, invisible cloak) and it could also be made usable more than once.

I'm no programmer though. :(
Heh, I am a programmer, but I ain't a modder :p

An easy :doubt: way to do it would be when cloaking is enabled, set the alpha value of all the model's textures to (say) 10%.  (Alpha is pretty much the same as transparancy... 100% = opaque, 0% = complete transparency)  Then whatever textures are on the model would show up very faintly, especially against a bright background, like the nebula -- in dark space, it would be very hard to see at all.

A problem would be the model would look like it was a hollow skin made of cellophane -- you would be able to see the textures on the other side as well, I think.  But there are probably ways around this, and it might not be too noticable in play.

And if you wanted to get really clever, you could tie the subsystem damage to the alpha level:
 - fully functioning cloaking subsystem = 10% alpha;
 - 50% damage to subsys = 30% alpha
 - 70% damage = 50% alpha
 - subsys destroyed = 100% alpha (no transparency)
Or you could make it flicker between cloaked/visible if it's damaged, that would look cool :nod:

*sigh* So many ideas, so little time...
your source code slave

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Source Code Question - Cloaking?
I like the alphablending idea.  Its done onboard the video card anyways if im not mistaken....
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Source Code Question - Cloaking?
actualy you wouldn't see the polys on the other side, it's called backface culling

I think it would be cooler if there was some sort of distortion effect, maybe move the pixels behind a polly by ten or so in a random direction
or a direction relitive to the polys position relitive to the center of the screen
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 penguin

  • Eudyptes codus
  • 28
  • Still alive.
Source Code Question - Cloaking?
Quote
Originally posted by Bobboau
actualy you wouldn't see the polys on the other side, it's called backface culling

I think it would be cooler if there was some sort of distortion effect, maybe move the pixels behind a polly by ten or so in a random direction
or a direction relitive to the polys position relitive to the center of the screen

:devilidea we could have a raytracing plugin for freespace... transparent objects would have a refractive index and act as lenses.  Another cool feature would be when you fly next to an Ares you can see your own ship reflected in the canopy.

Of course your framerate will be measured in frames/day...

--

:o forgot about backface culling and CW winding and all that.  But for complex shapes, you'd still be able to see the front faces of polys on the other side, you know, like the spiky things on Maras (sorry I'm even less coherent than usual tonight)  I don't know if it would look odd or not, have to see it in action...
your source code slave

 

Offline ZylonBane

  • The Infamous
  • 29
Source Code Question - Cloaking?
For the manpower available, and the huge quantity of other things to be done, I think we should be happy with a simple alpha effect. Probably the best way to control it would be through a set-alpha SEXP (and maybe a corresponding ship-alpha for reading the current alpha).
ZylonBane's opinions do not represent those of the management.