Author Topic: Phreak probably needs to take a look at this  (Read 4766 times)

0 Members and 1 Guest are viewing this topic.

Offline Fry_Day

  • 28
Phreak probably needs to take a look at this
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 );

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Phreak probably needs to take a look at this
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
SCREW CANON!

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Phreak probably needs to take a look at this
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
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

  

Offline Fry_Day

  • 28
Phreak probably needs to take a look at this
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.
« Last Edit: July 10, 2003, 01:46:36 pm by 791 »

 
Phreak probably needs to take a look at this
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
The Ancients a old and proud reace, one that is not all alone, and I am not one of them, but I am Nouben.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Phreak probably needs to take a look at this
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.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline JC Denton

  • Node For Me
  • 27
Phreak probably needs to take a look at this
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.
"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw

 

Offline redsniper

  • 211
  • Aim for the Top!
Phreak probably needs to take a look at this
does the FSO readme give instructions for how to use the cloaking effect?
"Think about nice things not unhappy things.
The future makes happy, if you make it yourself.
No war; think about happy things."   -WouterSmitssm

Hard Light Productions:
"...this conversation is pointlessly confrontational."

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Phreak probably needs to take a look at this
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.

 
Phreak probably needs to take a look at this
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
« Last Edit: July 10, 2003, 09:02:05 pm by 1120 »
Hippie. n. a long-haired unconventionally dressed young person

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Phreak probably needs to take a look at this
i thought unreal water was a form of cube-mapping, or are we talking not UT2/UT2003
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Fry_Day

  • 28
Phreak probably needs to take a look at this
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.
« Last Edit: July 11, 2003, 02:20:09 am by 791 »