Aller au contenu

Photo

TXIng my patience


  • Veuillez vous connecter pour répondre
28 réponses à ce sujet

#1
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
 <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 .


#2
Michael DarkAngel

Michael DarkAngel
  • Members
  • 382 messages
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 IPB
  MDA

#3
Zwerkules

Zwerkules
  • Members
  • 1 323 messages
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.

#4
Invisig0th

Invisig0th
  • Members
  • 170 messages
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 .


#5
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
 <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 IPB
Wings with irredescence in the wingmodels.2da

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

Image IPB
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 IPB
Wings beating, everything cool...

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

Image IPB
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 .


#6
s e n

s e n
  • Members
  • 408 messages
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)

#7
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<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 .


#8
Zwerkules

Zwerkules
  • Members
  • 1 323 messages
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.

#9
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<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]

#10
Pearls

Pearls
  • Members
  • 106 messages
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 .


#11
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<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 .


#12
s e n

s e n
  • Members
  • 408 messages
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?

#13
s e n

s e n
  • Members
  • 408 messages
another thing: the drgfly_w_bump,tga doesnt open with ps what kind of texture is that?

#14
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
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 .


#15
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<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>

#16
s e n

s e n
  • Members
  • 408 messages
I just realized that when I changed pc 2 years ago I moved from ati to nvidia, and for the 1st time I can see shinywater in game luls

Rolo, with the new texture everything looks the same... iridescent envmap works only if applied from 2da (dunno why).

sidenote: On a closer look, you forgot an N in the middle of e and v in the irridescent name entry in the txis

my tests and conclusions:
-using 2da to apply envmap, maps every texture of the model whenever an alpha layer is available, so using this method doesnt allow to "mix" alpha channel transparencies with envmapping, in meshes of the same model.

-using txi to apply envmap to the wings, well... seems to doesnt work at all. it keeps using the alpha channel to manage transparencies, thats it. be it under the a dummy or under the root dummy, the trimesh bypasses the envmap txi information. applying a skin to the mesh, does the trick but, sadly, its another dead end: with skin it reads txi information and reads the alpha as an environmental information, it just doesnt apply the selected texture but seems to blend black ink in the texture, the amount given by the alpha as it should do with the envmap, but no reflection.

about the transparency rendering issue, i really dont have it :) you shure you havent solved?

#17
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<feling a little...>

s e n wrote...
I just realized that when I changed pc 2 years ago I moved from ati to nvidia, and for the 1st time I can see shinywater in game luls

*turning green*

Rolo, with the new texture everything looks the same... iridescent envmap works only if applied from 2da (dunno why).

sidenote: On a closer look, you forgot an N in the middle of e and v in the irridescent name entry in the txis

evmap_irrid is the name of the map provided by bioware for the umberhulk and stag beetle.

my tests and conclusions:
-using 2da to apply envmap, maps every texture of the model whenever an alpha layer is available, so using this method doesnt allow to "mix" alpha channel transparencies with envmapping, in meshes of the same model.

-using txi to apply envmap to the wings, well... seems to doesnt work at all. it keeps using the alpha channel to manage transparencies, thats it. be it under the a dummy or under the root dummy, the trimesh bypasses the envmap txi information. applying a skin to the mesh, does the trick but, sadly, its another dead end: with skin it reads txi information and reads the alpha as an environmental information, it just doesnt apply the selected texture but seems to blend black ink in the texture, the amount given by the alpha as it should do with the envmap, but no reflection.

Yeah, I *want* to apply it in the txi, but... *sigh* I think it's something to do with how wings and tails are dependent on the creature geometry.

about the transparency rendering issue, i really dont have it :) you shure you havent solved?

Just tried it again (*I* had the right bumpmap, btw... *sigh again*). Still flickering. But maybe it's because I'm on a laptop with an nvidia mobile card...

<...jealus>

#18
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<hastily wiping...>

Ok, anyone point me to the bioware 3DS export pack with the famous "example.txi"? The link on the Vault is zombie. :-P

<...all the spilled coffee of his vault map>

#19
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages
Weird, I thought there was a place on the Vault that had these.  Maybe Big Bene's (sp?) CC pack?

Here you go:
Image IPB

#20
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<flexing his...>

I'll update the Vault entry so it's available.
Let me know if there's any other Bioware content that is redirected to their front page :-P

<...skinny old-man muscles>

#21
Bannor Bloodfist

Bannor Bloodfist
  • Members
  • 940 messages
Cool, glad you found those...

By the by, while I was searching my local repository of files I have grabbed over the years, I found the updated nwn model compiler that fixes the import/export issues with nwnmdlcomp.exe, the one that Joco created. I think this one is already located on the vault, but I am not positive of that. My copy, the archive has been renamed to include Joco's name so that I could easily figure out which one it was.

Anyway, I can NOT seem to find this one on the vault anymore, likely just using bad search phrases, but tell me where to send it Rolo, so it gets re-uploaded to the vault. Ideally, it should be placed on the same page as the original nwn_mdl_comp with a description to explain that this was a repaired version, IE, more up to date.

Edit:  Ok, nevermind, the version on the vault IS the one that I have, I had already corrected it on the vault a few years back... bad memory it seems. Torlack's Mdl Compiler, corrected by Joco to handle animation imports

Modifié par Bannor Bloodfist, 28 octobre 2012 - 07:06 .


#22
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<opening mouth...>

Send it to rolo@amet... er, send it to me :-)

<...closing it and looking sly>

#23
Bannor Bloodfist

Bannor Bloodfist
  • Members
  • 940 messages
dang it, you read too fast buddy.! The one on the vault IS the corrected version now, I had already corrected it a few years back, just about when DLA disolved.

Oh, the description is very wrong on the file now though, this was actually sourced by DLA, not MDA or scriptwreck or whomever.  It contains the original version by Torlack, AND the corrected .exe version by Joco.

Modifié par Bannor Bloodfist, 28 octobre 2012 - 07:10 .


#24
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<grinning...>

Write me a new description and I'll post it :-)

I'll also move Torlack's broken link to "Duplicate Entry" so it doesn't confuse people :-P

<...like a fool>

#25
OldTimeRadio

OldTimeRadio
  • Members
  • 1 400 messages

Rolo Kipp wrote...
I'll update the Vault entry so it's available.
Let me know if there's any other Bioware content that is redirected to their front page :-P

Thanks and will-do.  I actually slammed most of that stuff in the Omnibus, at least in HTML form.  Someone got the builders reference stuff either on the Vault or on here as a project, can't recall.

If you want to start getting EMBM on things, the easiest way to start is to copy tcn01_water01.txi to your override directory and rename it to the name of a texture on your mesh.  The requirements aren't going to mesh well with your wings, AFAIK: I believe shiny water will have to be on in the options, the object will have to be set to static, the card doing the demo will have to be NVidia and there will have to be static water in the scene, in the form of a water tile.  Otherwise, IIRC, it will show up black.  At best, it will result in a strange sort of blue "skin" in the shape of your mesh with bright highlights like shinywater. 

All EMBM that I've ever seen from screenshots of games looks exactly like this.

I was able to trick it to work on a shield but I don't have the model handy.  Basically I did all sorts of strange things in the model hierarchy, like burying a false _a node just under a fake mesh object named after the model base- like really crazy stuff.  Even then there was a really bad black shadow thing that went all over the scene and I don't think I figured out how to solve that.

The way shinywater basically works is this: A texture is applied to a mesh with a TXI (like the tcn01_water.txi example, above) and that points to two other textures: A "bumpyshinytexture" (a cubemap, without which EMBM won't work) and a "bumpmaptexture", in this case shinywater.tga.  Anyway, the cubemap is nothing special but it has to be a cubemap.  IIRC, shinywater.tga has to be in a specific format (i.e. like the one in game) and its TXI file actually controls what is seen (the water effect), not the actual contents of shinywater.tga.

Now "bumpmapping" in NWN, the way 99.999% of people think about it, is really just non-moving shiny water.  Or, put another way, shiny water without the arturo proceduretype.  I just think of it as "frozen shiny water".  And instead of using shinywater.tga, using a normal map which is appropriate for your texture.

I do not yet know how to make what I consider a true replacement for shinywater.tga  though I have been able to fake it with grayscale images.  But faking a normal map with a grayscale image, while it sort of works, is not really what NWN is looking for- that's my belief anyway.  I believe NWN is looking more for KotoR style normal maps, which are also similar to Dragon Age:Origins normal maps.  Especially in KotoR, two channels of the image hold specially distorted X and Y data. 

I'm working on ways to not have to do it like this, but don't have anything that works yet.

Modifié par OldTimeRadio, 28 octobre 2012 - 08:13 .

  • Estelindis aime ceci