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

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0


               

Happy holidays!  I hope you're all doing well!


 


Someone wrote me a few weeks ago about bumpmapping (shinywater) in NWN and after responding, I started playing around with all that stuff again.  The shinywater effect is not very flexible, doesn't yield much when it does yield something, and it's usually only visible on NVidia cards- though my current ATI drivers (new) seem to display it "fine".  The shiny water effect isn't even real bump mapping, per se.  It is or is closely related to an effect called EMBM ("Environment-Mapped Bump Mapping") and it always gives that plastic-y, shiny look when it's used in a game.  Anyway, as usual for playing around with TXI files, after a few weeks of trying different brute force approaches to make headway on useful features, I came up empty handed.


 


But I wanted to toss something out there, a clue, in case there were others who had the time and inclination to explores such things.  The "lead" I'm following (albeit in my usual roundabout fashion) is based on a single (official) screenshot that Bioware produced very early on in production and which can still be found on a few NVidia sites:


 


k8tcQR9.jpg


 


So, the above pic (one of a kind, AFAIK) shows an effect on the boulder and the obelisk that is "bump mappy" but is definitely not that EMBM/shinywater effect.  It's something else.  What...is it?


 


Well, so far, I think it's a specular bump map.  That would explain the monocromatic nature of the effect itself, where it appears that it relies on lighting to give it its color.  It would also fit in with the example.txi file's commands (which includes isspecularbumpmap along with isdiffusebumpmap) which were included with the original Bioware engine export plugins for 3ds Max 3, 4 & 5.1.  Unfortunately, while many of the commands in that example file work, a number of them don't and the command sequence they imply for bump mapping use doesn't appear to.  From that same plugin pack, the BumpyShinyAlignCheck portion of aurasanity.ms would seem, from what I can understand of it, to work with specular maps- though it might've worked for other maps, as well.


 


But is it an example of a specular bump map?  I dunno for sure.  It's some kind of bump map.  The things I mentioned above, along with the LightColor and (especially) LightOffsetX, LightOffsetY and LightOffsetZ columns in placeables.2da kind of make me think that, at least at one time, Bioware was sweet on the idea of doing a kind of 3D emboss effect on placeables and one which might not have even required a cubemap to do.  Which means, if the functionality is still in there, it might be something everyone (and not just NVidia users) could benefit from.


 


Food for thought!  If I find anything useful, I'll post about it and I hope others would do the same.


 


Cheers!



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #1 on: December 10, 2014, 07:16:23 pm »


               

Oh!  If people are interested in playing around with this, a basic start might be dabbling with shinywater as it currently exists.


 


To set up a test scene, here's the minimum you need to invoke shinywater and how it works.  In this example, it's not animated and will produce "frozen shiny water".  This should be tested with static objects and I typically test it on tiles.


 


1. Slap a texture (such as TTR01_water01) on a static object whose TXI has the following commands:


bumpyshinytexture ttr01__env

bumpmaptexture shinywater


 


In processing the TXI, the engine loads up ttr01__env (which doesn't even have a texture, IIRC), but it does have a TXI which reads as follows:


cube 1

filerange 6


 


Those commands load up ttr01__env0.tga->ttr01__env5.tga which do exist and which compose the cubemap which is necessary for the effect.  So that first line from the first TXI has run its course and is done.  The next line, bumpmaptexture shinywater texture is read in.  It's an 8-bit grayscale (important) and all it needs, IIRC, is just the following in its TXI:


isbumpmap 1


 


If I recall correctly, that's all that needs to happen for shinywater.  If the effect I have the screenshot of is still in the code, I can give no warranty that the above will definitely help to find it, merely that it's the closest thing to help I have right now.  Further hints can be found in the string dump from NWMain.exe and can be downloaded here.



               
               

               
            

Legacy_ia.Pepper

  • Full Member
  • ***
  • Posts: 138
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #2 on: December 10, 2014, 07:38:33 pm »


               

Oh that's neat, oh the stuff you find and look to crack the cases of. A question though, what could we really use this for, if we discovered it? It seems like it might look a tad out of place, next to all the other textures.



               
               

               
            

Legacy_OldTimeRadio

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


               

@ia.Pepper: The main thing I want it for (and I would really, really like this) is the ability to give the illusion of high geometric detail without actually having to have a high polycount on the model, itself.  That rock in the screenshot, if it were a model, would probably take upwards of 20-40k triangles to get the same lighting effects normally, if not much higher. 


 


While complex (static) models aren't that big a deal in NWN, that kind size for detail is not a good tradeoff.  Not for a rock, anyway.


 


If the effect I post the screenshot of is something that can be reproduced, it would be excellent for anything made out of stone, metal, clay or other things which are composed of a uniform material- environmental stuff like pillars, floors, walls, etc.  It would also be relatively easy to take existing diffuse maps from existing models, feed them into a program like InsaneBump (a freeware clone of CrazyBump) and get an appropriate grayscale map for such an effect.  In other words, just about anyone could get their toes wet with such an effect without having to be particularly skilled or have loads of time. 


 


Whether it can be reproduced, though, is the big question.



               
               

               
            

Legacy_ia.Pepper

  • Full Member
  • ***
  • Posts: 138
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #4 on: December 10, 2014, 09:12:09 pm »


               

It could have been experimental code that never got added to the actual game. Though I suppose it would be neat if that wasn't the case. Good luck on your search!



               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #5 on: December 10, 2014, 11:54:57 pm »


               

is this merely a search for the right TXI commands? and it will just work off the alpha channel?



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #6 on: December 11, 2014, 02:17:44 am »


               

@ia.Pepper: Very true and thanks!


 


@henesua: It could be...anything.  If the functionality is still in there, it could use the alpha or it could use a standalone 8-bit grayscale image like shinywater, something I'd probably think more likey given the hints in example.txi that I link to, upthread.  Or maybe something else.  It's really kind of anybody's guess.  Like I mentioned, part of it "working" may even hinge on something as un-intuitive as being a static placeable with a light defined in placeables.2da.  There are things I think of as clues (like light positioning info in placeables.2da) and even other things, like Virusman's discovery that envmaps were configurable (which allowed me to do this in stock NWN)) but I'm tossing it out to the community because, since there isn't any kind of reference point to begin from, others might have different, more successful, approaches.



               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #7 on: December 11, 2014, 05:43:34 am »


               

Glad to have you back playing weird science on NWN! It may be one of two options, as it has already been mentioned. Either it was experimental bump mapping, which wasn't included in the final version, yet saw its way into latter Bioware games, or it could very well be a digitally altered image to make the product look better, which has happened at many times during product development.


 


It could be bump-mapping and you have sort of discovered something big here... and I really really hope it is... but only you can tell! If there's anything anyone who has followed your experiments can tell, is you think waaaay out of the box!



               
               

               
            

Legacy_Zarathustra217

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #8 on: December 11, 2014, 11:48:19 am »


               

I and others experimented a lot with this back when Bioware first release the 3DsMax exporter plugin (since it mentioned the bumpmaps). Check my post "Bioware plz read! Bumpmapping" (by a very young me, trying to use hip language!) in the Omnibus (kudos for that btw).


 


Unfortunately, as far as anyone could tell, it's not possibly to do anything beyond that bluish specular bump that you see. Also, as far as I recall, it reacts very different from Nvidia to AMD/ATI, sometimes being transparent.


 


I also loosely recall that someone from DLA or CODI later told me that the Bioware developers explicitly stated that this was something they never managed to properly implement.



               
               

               
            

Legacy_Pstemarie

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


               

I know that someone implemented pseud-bumpmapping - pcpeachykeen or Chico maybe? Anyway, maybe what they started to develop could be furthered along. I've never used their stuff and I know, from what I've read at least, that its a love/hate relationship. However, given the number of people that DID like it, there has to be something there that is worth exploring and developing further.



               
               

               
            

Legacy_Zarathustra217

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +0/-0
A second type of "bumpmapping" possible but not yet discovered. (?)
« Reply #10 on: December 11, 2014, 12:32:35 pm »


               

Peachykeen's NWshader (and later VoodooShader) fully features normal-mapping as seen here:


 


Unfortunately, it seems he has abandoned work on it: https://github.com/ssube/VoodooShader


 


And the last released version had bugs in this regard.



               
               

               
            

Legacy_Zwerkules

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


               


I know that someone implemented pseud-bumpmapping - pcpeachykeen or Chico maybe? Anyway, maybe what they started to develop could be furthered along. I've never used their stuff and I know, from what I've read at least, that its a love/hate relationship. However, given the number of people that DID like it, there has to be something there that is worth exploring and developing further.




Peachykeen had normal mapping working, but not in vanilla NWN, you needed the NWNShader he wrote.


Chico's 'bumpmaps' were pseudo bumpmaps which could at least have looked half decent if done right.


There are programs which automatically generate a normal map for a given texture. There's also a plugin


for the Gimp that can do the same. If you take a brick texture for example, let a program or plugin generate


a normal map from the texture and then use that normal map with the bump map filter of Gimp you get a


brick texture with a 'simulated' bump map.


Chico however just used the same grainy texture for making the pseudo-bumpmaps on nearly all his textures.


Some people actually liked that. I think it didn't improve the textures at all, just the opposite, it just added some


bumps to the textures in places they didn't even make sense like in the grout of wall textures and completely


destroyed all detail in things like paintings.


               
               

               
            

Legacy_Tarot Redhand

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


               

FWiW, I used a sort of pseudo bump mapping when I made Map Mats. In gimp under filters/artistic there is one called clothify, which is what I used. The only drawback is that it has to be used with care as once done, undo doesn't properly undo it.


 


TR



               
               

               
            

Legacy__six

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


               

Painting bumps onto a 2d texture is not a bump map.


 


 


Captain obvious strikes again!



               
               

               
            

Legacy_Tarot Redhand

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


               

I did say that it was sort of pseudo bump mapping and not actual bump mapping.


 


TR