Author Topic: A second type of "bumpmapping" possible but not yet discovered. (?)  (Read 2861 times)

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #15 on: December 13, 2014, 01:14:57 pm »


               

It's just a texture with bumps drawn on it. No need to invent fancy words '<img'> 's all I'm saying.



               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #16 on: December 13, 2014, 03:35:11 pm »


               

/me bumps _six!


Welcome back '<img'>


FP!



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #17 on: December 13, 2014, 09:26:58 pm »


               

Thanks all for the info about NWShader!  Right now, I'm more likely to investigate stuff that can be used by everyone pretty easily (i.e. that people can put to work in CCC submissions, for instance) than something that requires a completely different package and paradigm.  The exception to this would probbaly be NWNCX, because it's just about a necessity for playing online, nowdays. 


 


@Zarathustra217: Yep, that's a great thread!  Looking at Revinor's sample file at the end of the thread is a good indicator just how slow the going can be, even after twelve years.  On the topic of statements from Bioware, I keep chugging at stuff like this because I've become convinced over the years that even "inside sources" at Bioware could, on occasion, give out unintentionally misleading information that was then considered gospel- if they, themselves, even knew the answer at all.  I don't mean to put too fine a point on it, but it happened.  While not related to the functionality of the graphics engine, the "10 weapon limit finally cracked!" thread in the Omnibus is a great example of this.  Interestingly, Bioware remained exceptionally tight-lipped on certain topics related to CC (probably because it wasn't worth it to pull actual engineers away from programming to comment) and, because of that, both the NWN and KotOR modding communities are in the dark about a lot of similar things- even after all this time. 


 


That tends to put folks like you and me (and a lot of other people, over the years) in the same position as those guys who comb beaches with a metal detector, hoping to find something under the sand!


 


':lol:'



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #18 on: December 13, 2014, 09:42:44 pm »


               

That tends to put folks like you and me (and a lot of other people, over the years) in the same position as those guys who comb beaches with a metal detector, hoping to find something under the sand!

 


Let's just hope you find more gold rings than can ring-pulls  '<img'> .


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #19 on: December 31, 2014, 01:08:30 am »


               

I have a feeling that the TXI example I pulled from bioware was for KoTOR, but does this help at all?


 


# 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.

#

# Default is 0


bumpmap 1


# Specify what kind of bumpmapping this bump map will do:

# specular, diffuse, or both.  These values are ignored if

# this texture is not a bump map.

#

# Default: isdiffusebumpmap 0, isspecularbumpmap 1


isdiffusebumpmap  1

isspecularbumpmap 1


# Specify a scaling factor for the bumpmap height.  If you

# want higher peaks and lower valleys in the bump map, set

# the value to be greater than 1.  If you want a smoother bump

# map, set this value to less than 1.

#

# Default is set to 1.


bumpmapscaling 1.5


# Specify a color for specular bumpmap highlights (RGB).  This

# value is modulated with the bump mapping light's color

# to produce the final highlight color.

#

# Default is (1,1,1)


specularcolor 0.5 0.5 0.8



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #20 on: December 31, 2014, 01:30:18 am »


               

I am unable to test this, since I cannot enable shiny water, and I suspect my game will not show any bumpmaps of any kind.


 


I put together these textures and txi files based on the KoTOR data. See if they do anything for you at all.


 


I'm sure you know already, but simply paint an object with the tx_ice06.tga texture and see if it grabs tx_ice06bmpmp.tga to use as a bump map.


 


https://www.dropbox....test_01.7z?dl=0



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #21 on: December 31, 2014, 06:58:37 pm »


               

Thanks, MD!  The snippet you posted is from the txi file I linked to in the first message.  While it seems to have historically gotten more play in the KotOR modding community,  the file's actually actually from the original Bioware NWN export scripts and plugins.  The texture files you provided are good for the job, but the tx_ice06.txi needed a cubemap line added (bumpyshinytexture ttr01__env) and tx_ice06bmpmp.txt needed to use the isbumpmap instead of bumpmap command in order to work.


 


I can't tell so much whether the lines...


isspecularbumpmap 1

bumpmapscaling 1.5

specularcolor 0.5 0.5 0.8


...do anything at all.


 


Kudos and thanks for kicking out ideas, though!  As I'm sure you're well aware, these sorts of investigations can be a lonely, lonely road to walk down and a little company helps keep the enthusiasm tank filled.  I don't know if you caught Zarathustra217's post above, where he references a great thread ("Bioware plz read! Bumpmapping") from the Omnibus regarding attempts to define bumpmapping capabilities, but at the end of it no less than the venerable Revinor coughs up his successful frozen water test materials and which also include his hashed-up TXI files- revealing more or less the same kinds of unfruitful guesses I (and I imagine, a lot of others) have been making, all these years since. 


 


Still, it should be noted that I tried this and most of my other tests only with tiles so far.  Once I've exhausted what I think are a decent set of possibilities with tiles, I'll wait for the alignment of caffiene and free time and plunge into similar experiments with placeables, static and non-static.  Because you never know quite where the coin might be hidden, if it's there at all.


 


On the KotoR side of things, Darth Sapiens and others have been poking around more or less the same functionality and with more or less the same results.  Threads here, here, here and here provide more information.  From what I most recently recall of their content, they are "basically" seeing exactly the same thing that we are when they try to wrangle bumpmaps with the exception, I believe, that certain models are receptive to their bumpmap attempts, presumably (?) having been compiled in such a way by Bioware as to allow for it.  From what I've seen, nothing Holy Grail-ish yet, but it's promising.  My hope is that, if it is something that requires a special compiler, that the leaked internal Bioware model compiler from 2002 will be the key that helps unlock that door.


 


But for the moment, it's still mostly TXI's I'm playing with.


 


EDIT: Almost forgot.  I managed to track down the very earliest screenshots of the Witcher which, according to everything I've read in interviews, were produced something like a month or two after they licensed the engine from Bioware in 2003.  Here they are.  So, at least to my thinking, these show at least some of what people who have access to the source code can pull out of NWN without any real changes having been made to the rendering/gfx pipeline yet.  If one looks through, they'll notice the shiny water ripples (not so much a fan of that) and some more subtle differences involving lighting and maybe other things.  I'm not too sure yet.  Oddly, some of these screenshots have a kind of brightness and clarity I associate with some very early NWN screenshots and it makes me think in both cases the some portions of the lighting we currently have are absent or modified, such as the sun object either not being present or having different values.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #22 on: December 31, 2014, 08:24:48 pm »


               

One more silly question, does isspecularbumpmap need to be set to 0 to try isdiffusebumpmap = 1. Since they are separate lines, maybe setting one to true while the other is already true makes it mad.


 


I want so much to find ways to make memory-cheap bump mapping, and at the same time, I don't even have a computer strong enough to actually use them. That fact alone makes it so maddening to poke around with this idea.


 


But I want it so bad '<img'>



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #23 on: December 31, 2014, 08:32:28 pm »


               

The more I stare at your top image, the more I see wrong with it from a bumpmapping perspective. The ridges and valleys are all wrong from any one light source anywhere near the front most stone. I think that is simply a texture, and a bad one at that. Try to geometrically pinpoint any one light source (given that multiple sources would affect it multiple times) and you can see that just the first light source fails to correctly raise/lower the centermost portion of the stone given that the light seems to be radiated from above and to the right the stone. I think it is prefabbed.



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #24 on: January 01, 2015, 08:56:58 pm »


               

I don't really know what the relationship is between them, but I have tried that combination in the regular shinywater chain and it didn't seem to work.   In regards to the image itself, I'm pretty sure it's real.  There's no visibile source of the blue light, it's true, but my guess is it's only because the model that is casting it doesn't have the familiar flare attached.  The model that the engine attaches to the placeable when you have LightColor, LightOffsetX, LightOffsetY and LightOffsetZ filled out happens to have a flare on it, but that can be removed and it'll just be a point of light without any clear indicator of source.  Here's an example of what I mean.  Goes in the override.


 


I haven't really had much of a chance to play around with it, but it appears that if one takes a texture (I did this on a placeable) and then, in its TXI, has a...


bumpreplacementtexture (grayscale bump map)


...and then in the gray scale bump map's TXI, have...


isbumpmap 1


...then the game will actually load the texture and process it as though it were a bump map- though without the environment map we associate with bump-mapping.  What does this mean?  Well, that's an interesting question.  First, I should explain that the reason the chest's lid is red is because of some Ambient and Diffuse settings (probably 5 0 0 for each) I set on the model, itself.  Let me show you some cutouts of the same patch of texture with something like bumpmap 1, 2 and 5 (or whatever, I can't remember my actual settings) applied:


 


hiYyUEk.jpg


wdEDJ7w.jpg


ZFQmRXg.jpg


 


Yay!  Well, sort of "Yay!", anyway.  See, without something to play over these presumed perturbed normals (like an envmap or light or something), what winds up on these chests are nothing but flat textures.  Or are they?  Excusing the strange coloring, here's how my regular ole torch lights up the surface:


 


KHqcH7I.jpg


 


Okay, official "Yay!" '<img'> Bumpy.  If you look right where my torch's light and the regular pink of the chest meet you can see it.  Not quite the kind of bumpy I want, but it's better than nothing at the moment.


 


It appears that as far as the per-pixel shading is concerned, those are real perturbed normals.  Wonderful, but maybe not the most wonderful thing in the world because, as I've written (here, here at least) the overall  lighting situation in NWN is...unfortunate...and most lighting schemes cause builders to inadvertently build areas which crap it up even more than it is.  However, this investigation is far from done and there may be one or more pleasant twists to the story as it unfolds.  (knocks wood)


 


While neat, this is not optimal.  What's optimal?


What I want is the ability to get an environment map to play over this instead of the lighting.  I want this being perturbed by the normals the bump map above.  Because of the shading on smoothed models, I could take relatively low-poly models and punch them up with detail something fabulous.  Right now, the only way I can invoke this behavior is from a bumpreplacementtexture command and that command (at least to my tests so far) doesn't allow for me to get some shiny in there, too.  After all, the bump map texture is just an 8-bit, no alpha.  So to get the goods, somehow it has to be figured out how to take these bumps and make them kiss with some environment map or a cube map.


 


I don't know how to do that yet.  My big wish for 2015 is that someone will figure this out so I don't have (try) to.  '<img'>


 


Cheers and Happy New Year, all!


 


EDIT: Some bonus shots from my testing in a gallery here.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #25 on: January 02, 2015, 03:35:23 am »


               

Do you have bumpy shiny water set in the video options, or does this type of bump map potentially work independent of that option? I'd love to test your exact files on my machine and see if they do anything. I've just tried 100 combinations of crap and it all came out as crap. White crap. nothing else but white. No bumps. No color change. No texture overlay. Just white.


 


I was also wondering if in NWN it might only work on certain model types? I'm using it on an S type creature. Maybe I should try more variety. Do you get any activity on creature textures?



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #26 on: January 02, 2015, 06:33:09 pm »


               

In this case I don't have it turned on.  I don't think it requires it (I hope not) but I'm going to go back and start removing things from the scene to see if I have anything else which might be affecting my work.  I'm assuming you're not using an ATI or NVidia but something like an Intel?


 


As far as the effect goes, if it works like I expect there is a pretty big chance it might only work (or work best) on certain model types.  I havent' tried creatures, just a placeable in this case.  I didn't fill out my notes completely but I did reference that it seemed to work best with a non-static model.  Not sure if that's accurate though.  The problem I'm currently having is that I'm can't worm an envmap into the equation to (presumably) get that detail so I might try a Hail Mary with this on a creature/player item and potentially (if it worked) try to make placeables out of creatures like Excimer-500 (?) did in CEP- then picking the "color" that's one of the envmaps.


 


I'll post something to play with in a bit or at least have an answer as to (seemingly) what the requirements are.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #27 on: January 02, 2015, 06:58:55 pm »


               

I seem to have run across the same threads you did (containing Darth_sapiens), and the recent breakthroughs on TXI bumpmapping (the black specular head example). I'm closely watching that thread, as well as this one, to figure out what we can and cannot do, and what is inherently different between the two. I see they are looking for details related to the compiled model files, and I hope that doesn't limit us here with NWN.


 


Anyway, drooling as always. But going back to reading more on simple mocap with my two cameras.



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #28 on: January 04, 2015, 03:21:37 am »


               

Okay!  In order to hopefully make this understandable to the most people who might want to play with it, I included some specific things.  First, grab the file here and unpack it to your override:


downloadbuttonh.png


  Load up the toolset, make an "Interior Torch-Lit Only" area, place down an Armoire as, say, non-static and then test the module. 


 


You should see something like this.  Do you need to set it up like that?  Nope.  That's just going to show off the effect with the least light interference.  The main thing is you should be seeing something on the surface of the model and that something should change when you alter the bumpmapscaling line in tx_ice06bmpmp.txi.


 


Included in the archive are:


fx_placeable01.mdl - Placeable light with removed flare


placeables.2da - Modified LightColor, LightOffsetX, LightOffsetY and LightOffsetZ for position of fx_placeable01.mdl, above


plc_a01.mdl - Test placeable model ("Armoire" in the toolset)


tx_ice06.tga - Texture applied to plc_a01.mdl


tx_ice06.txi - Contains "bumpreplacementtexture tx_ice06bmpmp"


tx_ice06bmpmp.tga - 8-bit grayscale texture


tx_ice06bmpmp.txi - Contains "isbumpmap 1" AND "bumpmapscaling 3"


myenvmap.tga - Unused, but there if you want an envmap to test with


example.txi - File that came with official Aurora export scripts/plugins.  Portions may be apocryphal.


 


Other than the txi commands, any other settings you might see (like in the model) are probably incidental so don't hesitate to change setting and see what happens.  The light settings in placeables.2da aren't necessary to see the effect but (based on reading of example.txi) may be necessary to pull the most out of whatever is possible.  The choice of light settings in fx_placeable01 also might not be optimal.  I just don't know.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #29 on: January 04, 2015, 03:51:58 am »


               

No bumpmapping displayed on Mobile Intel Chipset 4 Express version 8.10.15.1808.


 


But....have you played around at all with



bumpintensity

The reason I ask is that somebody had mentioned they thought bumpmapscale might actually be thickening the bump mapping, not making it deeper/higher, more like a blur effect. I was wondering if bumpintensity might be the one that makes height appearance more vivid.