Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Solatar on July 08, 2003, 11:40:57 pm

Title: Phreak probably needs to take a look at this
Post by: Solatar on July 08, 2003, 11:40:57 pm
I needed to know the storyline of Warzone, so I cheated my way through it. In one mission I cloaked myself, but never uncloaked. The next few missions various other ships were cloaked...Delta 1...A Seraphim...even a Ravana. They were all targetable, and weren't really cloaked, they just had the texure. Bug?
(http://www.3dap.com/hlp/hosted/14_year_war/Solatar/ravana.jpg)
Title: Phreak probably needs to take a look at this
Post by: phreak on July 08, 2003, 11:56:09 pm
i forgot to reset a flag or something :nod:
Title: Phreak probably needs to take a look at this
Post by: JC Denton on July 09, 2003, 12:12:02 am
Although that screenshot looks cool. :D
Title: Phreak probably needs to take a look at this
Post by: Solatar on July 09, 2003, 12:18:45 am
I didn't say it wasn't the most totally awesome bug ever.:D After that went down, a Rakshasha resumed the cloaking bug.
Title: Phreak probably needs to take a look at this
Post by: phreak on July 09, 2003, 12:38:17 am
odd
Title: Phreak probably needs to take a look at this
Post by: Knight Templar on July 09, 2003, 12:46:03 am
and it's doubly cool if you just learned that there's cloaking :eek: :nod:




how do we use it again? :D
Title: Phreak probably needs to take a look at this
Post by: Turnsky on July 09, 2003, 12:47:10 am
it would freak one out if a rav decloaked in front of you;)
Title: Phreak probably needs to take a look at this
Post by: Fry_Day on July 09, 2003, 08:01:51 am
uh, phreak, how exactly did you implement the cloaking with reference to polygon drawing-order? Ideally, ships should be drawn back to front and polygons in individual ships front-to-back (since you don't wanna see the back of the ship through the front, you just want it transparent), but I'm guessing that the draw-order is more or less random. Am I right?
Title: Phreak probably needs to take a look at this
Post by: IceFire on July 09, 2003, 09:36:27 am
Warzone never looked so cool :)

Let me know if you have questions on the story.  I still think I remember what I was smoking at the time :)
Title: Phreak probably needs to take a look at this
Post by: deep_eyes on July 09, 2003, 10:06:37 am
i dont even know how to activate nor deacticate... a nice lil how to do readme woulda been nice.
Title: Phreak probably needs to take a look at this
Post by: phreak on July 09, 2003, 10:43:16 am
Quote
Originally posted by Fry_Day
uh, phreak, how exactly did you implement the cloaking with reference to polygon drawing-order? Ideally, ships should be drawn back to front and polygons in individual ships front-to-back (since you don't wanna see the back of the ship through the front, you just want it transparent), but I'm guessing that the draw-order is more or less random. Am I right?


for now i just kept it the way it is to try to get the effect working. but to change draw order when cloaked only took a few seconds
Title: Phreak probably needs to take a look at this
Post by: Fry_Day on July 09, 2003, 11:31:33 am
hmm... implementing this for DirectX might be tricky, since DirectX likes all the texture coordinates announced not on-spot like OpenGL (Even though DirectX 5 did support it, but it was horrendously slow).
Title: Phreak probably needs to take a look at this
Post by: phreak on July 09, 2003, 11:32:42 am
can you access the texture matrix with d3d?
Title: Phreak probably needs to take a look at this
Post by: Havock on July 09, 2003, 11:39:39 am
delta 1: so.... command, what's up with those "ghost ship" rumors?
command: shut up, there is NO cloaked ravana in front of you.
delta 1: what the, i didn't mention a, oh, a joke, funny command.
command: *grins*
delta 1: Hahahahahaha*KLANK*
Title: Phreak probably needs to take a look at this
Post by: Drew on July 09, 2003, 01:27:47 pm
lol

i neve knew u could cloak in Warzone.....:wtf:

kewl.....
Title: Phreak probably needs to take a look at this
Post by: Exarch on July 09, 2003, 02:03:22 pm
You couldn't - it's FSopen that allows it now.
Title: Phreak probably needs to take a look at this
Post by: KARMA on July 09, 2003, 02:17:59 pm
wow:) very intriguing shot
Title: Phreak probably needs to take a look at this
Post by: Knight Templar on July 09, 2003, 06:28:29 pm
Quote
Originally posted by deep_eyes
i dont even know how to activate nor deacticate... a nice lil how to do readme woulda been nice.



~Bump~..........................................................
Title: Phreak probably needs to take a look at this
Post by: NecroBob on July 09, 2003, 07:29:29 pm
hmmm, could procedural textures be implemented in FS2?  how long would that take?  I gather quite a while, but it's just a musing.

if nothing else, one could make a rather large .ani of a lightning thing.  I really don't know how the cloaking looks right now, outside of the screen shot, but picture this on a model:

1.  model = invisible
2.  lightning texture takes .pof shape
3.  couple seconds, model textures appear from 100% trans
4.  lightning texture overlayed on model texture for a bit
5.  lightning texture fades, think the Blizzard intro :)

or something like that, I might go whip that up in PSP8...

Bob
Title: Phreak probably needs to take a look at this
Post by: Corhellion on July 09, 2003, 11:55:48 pm
:eek: :eek2: :eek:

Oh...my...god...

WHICH RELEASE MAKES YOU DO THAT?!?!?!?!?!?

I WANNA PLAY WITH IT!!!

Hey...There's a Terran Battlecruiser around here...Hmmmmmm....Starcraft mod very possible now I think...don't you?:devil:

Cor
Title: Phreak probably needs to take a look at this
Post by: Fry_Day on July 10, 2003, 02:41:37 am
Yes, Direct3D does provide access to the texture matrix. You set each texture stage's matrix with a call to d3dDevice->SetTransform( D3DTS_TEXTUREi, PointerTo4x4Matrix );
Title: Phreak probably needs to take a look at this
Post by: Nico on July 10, 2003, 02:48:32 am
Quote
Originally posted by NecroBob
hmmm, could procedural textures be implemented in FS2?  how long would that take?  


I know nothing about coding, but: no.
And if by some miracle someone could, I don't wanna play FS2 at 0.2 frames per second :p
Title: Phreak probably needs to take a look at this
Post by: phreak on July 10, 2003, 12:33:21 pm
Quote
Originally posted by Fry_Day
Yes, Direct3D does provide access to the texture matrix. You set each texture stage's matrix with a call to d3dDevice->SetTransform( D3DTS_TEXTUREi, PointerTo4x4Matrix );


calculating the matrix may be a pain though.  is there a way you can select it and transform from there ex:

Code: [Select]

glActiveTextureARB(GL_TEXTURE0_ARB); //select tex0
glMatrixMode(GL_TEXTURE);                    //start editing texture matrix
glTranslatef(x,y,z);                                  //translate - x,y,z are floats
glMatrixMode(GL_MODELVIEW);             //go back to using the modelview matrix


i don't know your opengl experience, but it should speak for itself even tho i added comments
Title: Phreak probably needs to take a look at this
Post by: Fry_Day on July 10, 2003, 01:41:41 pm
erm, the resulting matrix should be
| 1 0 0 x |
| 0 1 0 y |
| 0 0 1 z |
| 0 0 0 1 |

That's simple enough.
The problem doesn't lie in that. The problem is due to the fact that if you want to do multitexturing in Direct3D without both textures having the same texture coordinates, you have to define a new FVF. Annoying.
Title: Phreak probably needs to take a look at this
Post by: StarGunner on July 10, 2003, 03:37:44 pm
Quote
Originally posted by Fry_Day
erm, the resulting matrix should be
| 1 0 0 x |
| 0 1 0 y |
| 0 0 1 z |
| 0 0 0 1 |

That's simple enough.
The problem doesn't lie in that. The problem is due to the fact that if you want to do multitexturing in Direct3D without both textures having the same texture coordinates, you have to define a new FVF. Annoying.


a effect like that would make a SHadw ship come ALIVE! Hint! Hint!;7
Title: Phreak probably needs to take a look at this
Post by: mikhael on July 10, 2003, 04:08:22 pm
Quote
Originally posted by NecroBob
hmmm, could procedural textures be implemented in FS2?  how long would that take?  I gather quite a while, but it's just a musing.
 


Procedural textures have to be calculated at the beginning of each animation frame, then passed to the texture buffer. Not pretty. Venom is absolutely right: even on a modern system this would kill the frame rate.

Mind you, the impact would be far less if you were to implement the procedural as a shader that the GPU could handle natively. Even then it would only work on cards that had support for programmable shaders.
Title: Phreak probably needs to take a look at this
Post by: JC Denton on July 10, 2003, 04:21:05 pm
And then there's the ever-amusing task of writing the shader out.  Although that's probably not as hard as I imagine it is.
Title: Phreak probably needs to take a look at this
Post by: redsniper on July 10, 2003, 05:36:22 pm
does the FSO readme give instructions for how to use the cloaking effect?
Title: Phreak probably needs to take a look at this
Post by: Goober5000 on July 10, 2003, 07:28:14 pm
Quote
Originally posted by NecroBob
if nothing else, one could make a rather large .ani of a lightning thing.  I really don't know how the cloaking looks right now, outside of the screen shot, but picture this on a model:

1.  model = invisible
2.  lightning texture takes .pof shape
3.  couple seconds, model textures appear from 100% trans
4.  lightning texture overlayed on model texture for a bit
5.  lightning texture fades, think the Blizzard intro :)


Animated textures have been available in the SCP for a while now.  All you need to do is whip up a cloaking animated texture ahead of time, and then use change-ship-model to switch to the cloaking textures and back again.
Title: Phreak probably needs to take a look at this
Post by: NecroBob on July 10, 2003, 08:59:11 pm
yeah, I know .ani's are, but procedural textures, like textures generated by an algorithm at and during run-time :)

(think Unreal water or forcefields)

[EDIT]
bleh, read the responses.  if so, then why did Unreal run on my 233 in 320x240 software at 60 FPS?
and on my 850 duron in 1024x768 with all the spiffy tweaks on at 60+ FPS? :)

Bob
Title: Phreak probably needs to take a look at this
Post by: phreak on July 10, 2003, 09:04:25 pm
i thought unreal water was a form of cube-mapping, or are we talking not UT2/UT2003
Title: Phreak probably needs to take a look at this
Post by: Fry_Day on July 11, 2003, 02:15:18 am
Quote
Originally posted by PhReAk
i thought unreal water was a form of cube-mapping, or are we talking not UT2/UT2003

Unreal Tournament 2k3 indeed does water with cube-mapping. The original Unreal and UT, on the other hand, do water by generating a fractal and doing some fake refraction on it procedurally.