Author Topic: what I was doing over the break (materials)  (Read 34827 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
Bobb, can/are the > < and == operators (or just =, if == is too many characters) be implemented into the code to give a 0 if false, 1 if true? This would be andy for armor stuff:

Code: [Select]
:weapon.damage: * (:weapon.damage: > 20)

Which would only apply damage if the weapon originally dealt 20 points of damage. I suppose you could do it with
Code: [Select]
:weapon.damage: * abs(sign(:weapon.damage: - 20))
but that's a little less clear.

Edit: Another question, would there be a way to use this to use 1/4th of a shockwave laid out to make a full shockwave? (Someone, DaBrain I think, asked about this)

And, someone asked about switching parts of the glowmaps on/off...could you use a sine function, for example, to make the glowmaps on a ship ripple - with only one glowmap frame? (I haven't heard anybody ask for this specifically, but I can think of some really cool effects you could do with something like this)

Finally, will there be a way to use SEXPs to add/remove materials and some way to fade them in? For example, to go from a "Hiigaran" material to a "Beast" material in TAP.

Edit: This is the last thing, really. :nervous: Can you at least commit the non-material-specific parts of the equation system so I can try it out with the armor table or at figure out how I'll have to implement it?
« Last Edit: May 02, 2005, 06:39:58 pm by 374 »
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
makeing comparison opperators that return float 0 or 1 would be like three minutes work, consiter it done:)

the shockwave thing, so you mean like, you have the upper quadrant of a circular thing, and you mirror it? yeah, that's actualy one of the optomiseations I was going to sudgest when I allowed the setting of materials for weapon effects.

I'm not sure exactly what you mean with turning parts of glow maps on/off, but if you wanted a rippling effect you could have one texture with a gradient and another glow texture. assign a texture pan for the gradient texture and multiply it with the glow texture.

(beast effect)we could probly make some sExp definable variables and, for that particular effect (psudo-script):

pass_variable :sExp.variable_assigned_for_this_task:
//or if we have some code for it :ship.beast_level_or_something:
renderstep
opp mult
arg1 beast texture
arg2 variable
renderstep
opp add
arg2 normal texture
renderstep
opp mult
arg2 defuse
//remember arg 1 always defaults to 'current' wich is the default output of each renderstep

that implementation doesn't have shine mapping, and that would probly only be doable via multi-pass

I was also thinking about this sort of thing to enable cloaking, cloaking would be enabled on a per material bassis, so you could in theory (if you wanted to) have a diferent cloaking effect for each part of your ship. it would work the same way as the beast effect basicly, you interpolate a texture that looks like the background, you'd just need to have a pass that said something like
pass_variable :ship.cloak_level:
if you set up the alpha blending to blend via alpha chanel.
opp mult
arg1 background texture
arg2 variable

this does bring up another thing, it might be a good idea to have a conditional in the render pass, modifying the synax to be
#pass(expression here){}
if the expression evaluates to be anything other than 0 then the pass is performed. otherwise it isn't

I'll try to commit the variable system tonight, I'm prety sure it's solid. though there may be smallish memory leaks (8 bytes at worst for each node). I'll try to get comparison opperators in there first though.
« Last Edit: May 02, 2005, 09:30:16 pm by 57 »
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
what I was doing over the break (materials)
any way to create that fancy startrek style distortion effect while cloaked? perhaps have a material that has a starfield scrolling texture. effect and fade transarency debending on how much the ship moves around (predator active camo style) or before decloaking. some cool effects can be done.
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
what I was doing over the break (materials)
if you saw the cloak effect I had going a while ago, that effect is almost posable with the material system right now. all I'm missing is access to the background texture in the table. I need to setup global textures at some point.
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 krisvek

  • 25
what I was doing over the break (materials)
youre cool, bob....i like you (more specifically, i like the work you do)

anyhow...could someone help sum up all what this is capable of?

not sure if this is related, but i saw some shots from a build of yours, bob, that had shadows projected from ships and such...not sure what happened to that, but could this materials system thing be used for that too somehow?  i like shadows :)

so far as realism goes, having all the "room" lights blink on and off, whether all at the same time or not, doesnt make sense...are you able to set aside only certain parts of the texture that would use the feature?  like, on one of the vasudan transports, the cool little purple llights on the underside blinked on and off, which made enough sense to me...ships have blinking lights sometimes
but then, all the lights on the terran ships do the same....and that doesnt make sense...but, if only certain lights did, like, the lights on a rotating radar turret thing, etc, that'd be cool

basically, i'm not quite able to distinguish whether this is some kind of animated-graphic thing, or some kind of texture-attrubute thing (armour stuff)....or is it both?  that's pretty versatile if it is

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
ok, I'm going to move some stuff around and commit the variable system. I just finished nearly full documentation on how to use it and how it works.
I'm going to commit the files, but not my workspace, because I have all sorts of crap, that no one else will, and I'd rather save that joy for the day my materials system is decent enough to commit.
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
ehh... :doubt:
Quote
cvs add variables.h variables.cpp (in directory I:\FSO\fs2_open\code\variables\)
cvs add: missing hostname in CVSROOT: :pserver:[email protected]/home/fs2source/cvsroot
cvs [add aborted]: Bad CVSROOT.

*****CVS exited normally with code 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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
ummm... was something done with CVS, I added a colin to the end of the root like some faq said to and now I get

Quote
cvs login
(Logging in to [email protected])
Fatal error, aborting.
Bobboau: no such user
cvs login: authorization failed: server warpcore.org rejected access to /home/fs2source/cvsroot for user Bobboau

*****CVS exited normally with code 1*****


restoreing it to what it was before gives me

Quote
cvs login
cvs login: missing hostname in CVSROOT: :pserver:[email protected]/home/fs2source/cvsroot
cvs [login aborted]: Bad CVSROOT.

*****CVS exited normally with code 1*****


:wtf:
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
krisvek: didn't see you'r post till, just now. what this system does is it gives full controle of how objects are rendered over to a person editing a table file, if there is any way to acheve an effect this material system should allow you to do it. what has been demonstraited at this point is mearly a small test of what it's capable of, you've only seen the "hello world" implementations of what's posable. hope that answeres your question.
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
and sence, someone want's these files, and CVS is being *****y for some reason.
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 FireCrack

  • 210
  • meh...
what I was doing over the break (materials)
Just a dumb question, the awnsers probably no, but does using two materials with the same texture take any extra texture memory?
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
Bobb, I'm going to commit the variables system under the object folder, that seems a bit better than the location it seems to have in your local codebase. (Not to mention that the materials folder doesn't exist anyway. ;) )
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
@FireCrack:no.. I don't think you're even thinking of how this works right. no material has any specific texture assosiated with it. a model has a list of textures,when you draw a model with a material you give the material this list, and you tell it were and how to use wich textures from that list
so there realy isn't any coorelation between material and texture at all.

though I will later on allow global textures wich would not change from ship to ship.

@WMCoolmon:don't put it in object/, put it in variables/ make a new folder for it. that path wasn't were I had intended to place it (and leaveing like it was was a mistake)
« Last Edit: May 03, 2005, 01:21:37 am by 57 »
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 WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
:doh:

I *just* commited it to objects.

Edit: I'll fix it if you like, I just don't want to play musical folders. ;)
« Last Edit: May 03, 2005, 02:23:15 am by 374 »
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what I was doing over the break (materials)
it's it's own thing, not a subset of object management, it doesn't make sence for it to be in with the object stuff, the only reason it was origonaly in with the material stuff is because it was origonaly just going to be a subset of the materials system.
to the new folder and the music stops for ever, no musical folders.
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 WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
Done
-C

 

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
what I was doing over the break (materials)
For someone who doesn't understand what the hell this is all about, can we get it in either layman's terms, orrr....possibly screenshots of what it can do?

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
what I was doing over the break (materials)
I second what UT said, as I am confused and mortified by what everyone has to say.
Bunny stole my signature :(.

Sorry boobies.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
what I was doing over the break (materials)
It lets you change how textures are applied, instead of just what textures are applied.

Edit: Cloakmaps are a good example, actually. In order to do them, you need to tell the rendering engine that as the ship turns, the texture doesn't. Or rather, the texture must have the same rotation in world space, rather than in relation to the model as is the usual method.

It must also use the texture from the background, which is in memory. To give a cloaking effect, you may want the background texture to be offset slightly or add a special glowmap when it's active. This would let you do that, as well.

If someone else wanted to do a cloaking effect with two glowmaps - one under the background texture, one over the background texture - they could do that instead, with the material system.
« Last Edit: May 03, 2005, 08:27:43 pm by 374 »
-C

 

Offline FireCrack

  • 210
  • meh...
what I was doing over the break (materials)
Would be neat to make everything but the glowmap invisible on the pegasus.
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."