Author Topic: materials discusion: global textures  (Read 2707 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
materials discusion: global textures
ok, the next thing to do in the materials checklist is global textures, and I'm not sure exactly how I want this.

a global texture is one that will be used by name accross all iterations of a texture (irrespective of what model is being drawn). they can be loaded from a file or made dynamicly and can have a whole bunch of atributes set for them. I need to get this done because environment mapping uses a global texture namely the environment map. but as I said, I'm not sure on the best way to do this.

for one thing should it be part of the materials table or something seperate? the HUD might end up useing global textures to output gagues to, and then you'd be able to grab those global textures in the material and make cockpits.

what about the table entree, what I have right now is

   $Name:         static_env
   $render_target:
      +type:         cubemap
      +Resolution:      512
      +memory_pool:   static
   $format:      RGB, 32

   $Name:         noise
   $src:         noise.tga
   $format:      RGBA, 32

global textures would be refered to by name, you can load it from a file, or it can be a render target (and if it's a render target you have to specify resolution and stuff) and you'd be able to change formats if you wanted.

so what do other people think?
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 DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
materials discusion: global textures
Makes sense the way you described it.

I don't see any way to do it better. I can work with this.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Inquisitor

materials discusion: global textures
Have you cleared the bugs assigned to you?
No signature.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
materials discusion: global textures
this is the first chance I've had to code in three weeks and my code base is unmergeable, so no.
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 Inquisitor

materials discusion: global textures
We can't get anywhere if you don't you know ;)

You can have multiple CVS copies downloaded to your HD ;)

It's exciting to add new stuff, but some of those bugs are yours, if they ain't, re-assign em to someone who can fix 'em.
No signature.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
materials discusion: global textures
sounds about right. i figure most textures will just use the existing system of maps. so the renderer should be smart enough to know what global material to use based on the avbailability of maps. for example if you have a difuse map , a glow map, and a shine map with and env map in the alpha chanel it should know to use the proper global material to use all the maps, however if you just have a difues map with a shine map with no env it should also be smart enough not to use env, or to use a global env texture. it should be able to autosence what material to use based on whar maps are available first, the only exception is that if there is a material script. so if you have the diffue and alpha less shine map shine map and the table entry says to use the blue chanel for env, then it would. just maintain the current system of defaults.
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
materials discusion: global textures
ehh.. that has nothing to do with what I want to talk about here, this is a way to define textures that are used consistantly throut a material, like  a noise texture for detail mapping, or a light map for cell shadeing. textures that would be used by all instances of a material across all objects, and I want to figure out the best syntax for it, also wondering if it should be completely seperate so other things (like the HUD) could take advantage of them (want WMC's input mostly here).
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
materials discusion: global textures
so you use these things to define a default env map for example? i see, then in that case it should work fine.
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
materials discusion: global textures
no, they are something that will be the same on all ships useing the material, everything that uses environment mapping uses the same environment map. the environment map is the thing with the background image on it not the shine map or a part of it.
there a pool of textures that are always there and always loaded/made seperate from the textures loaded with models.
get me yet?
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 DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
materials discusion: global textures
So the model can use multiple 'local' textures and one glwobal texture?

Could you point out one or two possiblilites this feature offers?
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline FireCrack

  • 210
  • meh...
materials discusion: global textures
So say you have two ships with the smae texture, that texture will be loaded inot memory only once??
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 Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
materials discusion: global textures
not really, i guess il figure it out eventually
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
materials discusion: global textures
ok... a perfict example of were you would use this is detail mapping, in detail mapping you have one noise texture, it's just a bit of random pixels that are just a bit lower thanfull brightness, you then set up the scaleing matrix so that the noise has a higher frequency (so it tiles more, you scale it so the immage is smaller) and then you multiply this with the defuse texture, then you multiply that with the defuse light.

environmment mapping is another, all environment mapped ships use the same environment map _all_ of them, they do right now in the current implementation. the only thing unique to a ship in this regard is the shine map that get's multiplied.

currently in the material the only way to reference a texture is to specify with texture of the ones the model wanted to load are suposed to be used, these change with each model and with each use of a material.
« Last Edit: May 15, 2005, 11:31:55 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 WMCoolmon

  • Purveyor of space crack
  • 213
materials discusion: global textures
So this is basically like a global variable, except with a type of texture?
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
materials discusion: global textures
so in other words its just a library of basic effects bitmaps that are pulled by various materials as needed?
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