Author Topic: TXIng my patience  (Read 859 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
TXIng my patience
« on: October 25, 2012, 02:29:58 am »


                <scribbling more instructions...>

Can any one point me toward (or put together) a .txi reference?

What are these commands? What do they do? (examples)

alphamean (0.364)
arturowidth (5, 15)
arturoheight (5, 15)
baselineheight (0.13, 2.560000)
blending (additive)
bumpreplacementtexture
caretindent (-0.010000)
channelscale (4)
channeltranslate (0)
clamp (3)
codepage (949)
cols (19)
dbmapping (65536)
decal (1)
defaultheight (32)
defaultwidth (32)
distort (1, 2)
distortangle (1)
distortionamplitude (10)
downsamplemax (0)
downsamplemin (0)
filerange (9)
filter (0)
fontheight (0.13, 0.160000)
fontwidth (0.13)
fps (32)
isbumpmap (1) (really?!)
isdoublebyte (1)
lowerrightcoords (256 (followed by what I'm guessing are 256 coordinates))
mipmap (0)
numchars 256
numcharspersheet (361)
numx (4)
numy (4,9)
proceduretype (arturo, cycle, water)
rows (19)
spacingR (0.000000)
spacingB (0.000000)
speed (3)
texturewidth (2.560000)
upperleftcoords (256 (followed by what I'm guessing are 256 coordinates))
waterheight (32)
waterwidth (32)


I know and use:

envmaptexture
PLC_G_ENV
evmap_irrid
evmap_azer
TDM01_ref01
TTR01_ref01

<...to the blind painter>
               
               

               


                     Modifié par Rolo Kipp, 25 octobre 2012 - 01:53 .
                     
                  


            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
TXIng my patience
« Reply #1 on: October 25, 2012, 02:49:10 am »


               I would say look for OTR or Virusman.  One of them may be able to give you some answers.  I do not remember ever seeing a definitive guide for what the commands do.

'Image
  MDA
               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
TXIng my patience
« Reply #2 on: October 25, 2012, 03:42:11 pm »


               Seems the ccg.animecafe is gone again or I just can't find it. They had a list of what at least a few of those commands did. It's possible, that the information can be found in OTR's NWN omnibus.
               
               

               
            

Legacy_Invisig0th

  • Sr. Member
  • ****
  • Posts: 279
  • Karma: +0/-0
TXIng my patience
« Reply #3 on: October 25, 2012, 05:35:04 pm »


               If memory serves, "rows" "cols" and "speed" (and possibly "decal"?) are used for swapping out sections of an image to create a simple animation. Take a quick look at the TXI for the Magic Mouth placeable on the Vault for a simple example of this technique.

When I was working on the Barrier Peaks module way back when, Chandigar and I discussed using this technique to create computer control panels with simple displays (2,4 or 8 frames). In conjunction with that, one could fairly easily create a model that swapped two surfaces (one with TXI animations and one without) to turn the 'displays' on and off based on the the placeable's state. This little idea barely scratches the surface of what can be done with TXIs.
               
               

               


                     Modifié par Invisig0th, 25 octobre 2012 - 04:41 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
TXIng my patience
« Reply #4 on: October 25, 2012, 06:55:09 pm »


                <scratching his...>

Good points :-) My copy of the Omnibus isn't working at the moment (because I have Java 7.7?). 

So, instead of letting the grumpy dwarf make things last night, I ran the battery down to zip playing with TXI. And crashing. A lot.

Some of my findings are intriguing :-)  But first, some images...

'Image
Wings with irredescence in the wingmodels.2da

'Image
Wings with irridescence in the .txi (and *not* in the .2da)

'Image
Creature with same wings, same texture, same irridescence in .txi and *not* in .2da

Note: on *wings*, 2da reflection overrides .txi - contrary to how it works on items, placeables & creatures.

'Image
Wings beating, everything cool...

'Image
Split-second later, flicker as the pixie becomes transparent.

'Image
Intriguing image... the visual bug is somehow related to the amount of *alpha* in the texture - note how the edges with much more alpha behave correctly?  The effect occurs whether irridescence is in the .2da or in the (mostly ignored) .txi.

Further note: Applying various combinations of "isbumpmap" and "bumpreplacetexture" (with some other settings, including a clone of the shinywater.txi) results in either nothing or a crash.  Tried OTR's trick of a sacrificial texture (actually a bump map for the veins) with bumpreplacetexture... crash.

Combine these experiences with shinywater's much deserved reputation and Torlack's

0x0234   Pointer to the texture 0 vertex data, stored in the raw data region, -1 if not present
0x0238   Pointer to the texture 1 vertex data, stored in the raw data region, -1 if not present
0x023C   Pointer to the texture 2 vertex data, stored in the raw data region, -1 if not present
0x0240   Pointer to the texture 3 vertex data, stored in the raw data region, -1 if not present

 
(Thanks, OTR) - pointers in the model format to *four* textures... one is diffuse color map and one is reflection map...

I think Bioware was trying to roll their own bumpmap engine and failed (isbumpmap was only used in shinywater in the OC, so far as I can see).  
What's intriguing about that is if we can find the hook in the engine, perhaps we can turn that functionality back on, but using GFX cards for bump mapping and even normal mapping (that fourth texture slot).
Map the bumpmap texture to the model in Max, include the "isbumpmap" .txi with bumpreplacetexture command pointing to the diffuse map and envmap command pointing to the reflection map?

Hmmm.... wonder what Virusman is up to these days? ;-)

<...itch>
               
               

               


                     Modifié par Rolo Kipp, 25 octobre 2012 - 06:02 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
TXIng my patience
« Reply #5 on: October 25, 2012, 07:35:23 pm »


               this is how i made my new windows: they are composed of a glass texture, of a frame texture (be it a leaded frame or just a simple wooden frame), some wall mesh behind the glass, and a texture that controls fading to black. the frame texture is alphaed in transparency to show only the frame, and to allow the glass texture behind it to render. you can add a blending punchthrough to be sure there is no dizzled contour. the glass texture has an envinronmental map appliedby txi, controlled by its alpha channel (a 50% grey fill should be enough to give the effect of sun/moonlight reflections), and the texture itself is made transparent with trimesh modifier (here, at taste... from 40% to 70% depending on the effect you want to get, the more transparent the less it shines by envmap, of course, so you may want to correct the grey alpha channel by consequence). you need to find "the" correct render order, so everything actually renders as it should (just play with parent and childs) and, if thats not enought, remember to check if the wing model classification is set as character, usually that solves a lot of issues with renderings (the only thing that you shouldnt be able to control is emitter controlled textures, engine bug)
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
TXIng my patience
« Reply #6 on: October 25, 2012, 07:58:42 pm »


               <can't wait...>

Zwerkules wrote...
Seems the ccg.animecafe is gone again or I just can't find it. They had a list of what at least a few of those commands did. It's possible, that the information can be found in OTR's NWN omnibus.

ccg.animecafe.net does have some interesting bits... But why have I always been told we cannot apply bumpmaps if 

Specify a bumpmap
Default is no bumpmap.
bumpmaptexture mybumpmapname

???

Specify whether or not this texture is a bumpmap. If this flag is set, the texture module will expect to read in a texture which is grayscale.
bumpmap 1

Not "isbumpmap"?

<...to frustrate the dwarf some more>
               
               

               


                     Modifié par Rolo Kipp, 25 octobre 2012 - 07:00 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
TXIng my patience
« Reply #7 on: October 25, 2012, 11:06:16 pm »


               Even if it is not hard-coded to only work for the water and you could have bumpmaps, the majority of graphics cards could not display it. Some show strange flickering stuff, others show other ugly stuff and some even crash the computer. I have never been able to activate shiny water.
Hmm, of course the graphics cards can handle bump maps, just not what Bioware did to get the shiny water.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
TXIng my patience
« Reply #8 on: October 26, 2012, 12:05:23 am »


               <bumping over...>

Zwerkules wrote...
Even if it is not hard-coded to only work for the water and you could have bumpmaps, the majority of graphics cards could not display it. Some show strange flickering stuff, others show other ugly stuff and some even crash the computer. I have never been able to activate shiny water.
Hmm, of course the graphics cards can handle bump maps, just not what Bioware did to get the shiny water.

That's where I was going with that part of this thread, that perhaps someone *cough*Vm*cough* could use the model structure divined by Torlack and the TXI functions to let us pass real bumpmaps to modern GFX cards.

I have shinywater turned off on mine, but just adding the shinywater .txi to the texture crashed both toolset and game :-P

<...some cobblestones]
               
               

               
            

Legacy_Pearls

  • Full Member
  • ***
  • Posts: 194
  • Karma: +0/-0
TXIng my patience
« Reply #9 on: October 26, 2012, 01:07:10 pm »


               ill take a look at it when im not sick and report back, virusman can prolly do a better job since i dont do ogl though =P

btw does the mipmap entry work at all? iirc most of the others are in example.txi
               
               

               


                     Modifié par Pearls, 26 octobre 2012 - 12:12 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
TXIng my patience
« Reply #10 on: October 26, 2012, 04:28:30 pm »


               <unrolling his sleeves...>

I've gone and twisted the dwarf's arm and made him put up his WIP files, for those who want to play with what he's playing with (Thanks Sen! Thanks Pearls!).

<...and pretending to wipe sweat from his brow>
               
               

               


                     Modifié par Rolo Kipp, 26 octobre 2012 - 03:29 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
TXIng my patience
« Reply #11 on: October 26, 2012, 08:13:10 pm »


               Rolo, I cannot replicate your transparency issue: the pixie do render correctly through wings. the only small issue I see with transparencies renderings is that the left pair of wings doesnt render through the right one. making the non-rendering wing child of the other probably just switches the issue, but unifying all the 4 wing meshes and applying a skinmesh should be enough to solve this. weapons dont render through wings, but im used to it. i think changing all the weapon classifications to character or such should solve the weapon non-rendering through transparency issue, but its another story...

I just cannot replicate your bug. have you moved something in the meanwhile?
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
TXIng my patience
« Reply #12 on: October 26, 2012, 08:32:44 pm »


               another thing: the drgfly_w_bump,tga doesnt open with ps what kind of texture is that?
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
TXIng my patience
« Reply #13 on: October 27, 2012, 12:42:11 am »


               Good lord, I'm out for a few days and somebody starts a TXI thread!  ':wub:'

@Invisig0th - Good idea!  There's a pillar in the steamworks tileset that actually does this.

@Rolo Kipp - (Your wing screenshots) "Note: on *wings*, 2da reflection overrides .txi - contrary to how it works on items, placeables & creatures."  I believe 2DA overrides TXI unless the model is static.  On a non-static model you can only have one environment map.  On a static model I believe you are not limited.  I did a cannon (unreleased) where I used two txi environment maps but when it was not static only one of them would display.

About your bumpmap experiments, and crashing- Try using a grayscale image with no alpha for your bumpmap, not a color one.  256 shades of gray works all the way down to 1-bit, IIRC.  Although it's probably not too helpful for you in the case of those wings, you can get away with a lot more stuff on static meshes.  Static mesh w/no shadows = God (A New Testament one, anyway).  So you can do bumpmapping on some non-static objects, like shields but there are problems.  I don't think I ever solved that particular problem.

Crashes -   Crashes are from the not-grayscale bumpmap I'm thinking.

Texture0-3 - KotoR uses this for lightmap and The Witcher does something with it too, I think.  I was trolling around in the .dlm for the Witcher Exporter and saw something which seemed to indicate that, anyway.

ccg.animecafe.net TXI info - Some of that information is from the "holy grail" of TXI documents, which was distributed with the...Aura Export plugin I think.  While some of that information is accurate, a bit of it doesn't appear to be.  Especially the channeltranslate values.  I've tried getting around the transparent skin effect endemic to shiny water and haven't.  Other people have also wrangled with this quite a bit.  It's a confusing Rosetta stone, that's for sure.

@Zwerkules - Just ATI cards, AFAIK.

@Pearls - I believe it does, but only kicks in for DDS.  The Aurora and Odyssey engine are very similar and mipmap is used a lot more in thier TXI files (they're actually tacked onto the end of the .TPC file).  Since TGA has no mipmaps (you'd use downsamplemin/downsamplemax to keep those clear or blurry, as you wished), I "assume" that the mipmap command only works with things which have mipmaps.
               
               

               


                     Modifié par OldTimeRadio, 27 octobre 2012 - 12:07 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
TXIng my patience
« Reply #14 on: October 27, 2012, 04:40:10 pm »


               <going pale...>

Uh, sorry. wrong bumpmap... not even a legal size :-P

Uploaded correct one.

@ Sen: It was a TGA file, and it was greyscale, but I think I saved that one directly from one layer of a decomposed image. What's puzzling me is how it became scaled down... All the wing textures are 1024x...

@ OTR: I was actually only wanting one reflection map... but if I star-out the 2DA, the texture.txi reflection doesn't apply at all. I.e. it seems to be ignoring texture.txi for wings.

<...with mortification>