Malkior 476 Posted December 4, 2014 @Darth Sapiens Could you tell me what mode/filter in Photoshop to use in order to change it into a valid bumpmap, or is there a specific process? I would like to do some experiments, but can't connect to the internet with my home computer to compare your files. Quote Share this post Link to post Share on other sites
Darth_Sapiens 90 Posted December 4, 2014 @Darth Sapiens Could you tell me what mode/filter in Photoshop to use in order to change it into a valid bumpmap, or is there a specific process? I would like to do some experiments, but can't connect to the internet with my home computer to compare your files. it only works on certain textures on certain models like the twilek head, the selkath, the rakghoul etc. but it needs to be greyscale / 8 bit with no alpha, if you look at the channels tab there should only be 1 channel (greyscale) as opposed to R G B and alpha it's called changing the color mode in photoshop. if you see my screenshots from my first "breakthrough post" it shows what i'm talking about. were trying to see how to make it available for all models, but it might be a while Quote Share this post Link to post Share on other sites
Malkior 476 Posted December 4, 2014 it only works on certain textures on certain models like the twilek head, the selkath, the rakghoul etc. but it needs to be greyscale / 8 bit with no alpha, if you look at the channels tab there should only be 1 channel (greyscale) as opposed to R G B and alpha it's called changing the color mode in photoshop. if you see my screenshots from my first "breakthrough post" it shows what i'm talking about. were trying to see how to make it available for all models, but it might be a while Ah so I see. I was actually stuck on how I'd make my own normal map to work with the engine. I only have a very basic understanding of making bumpmaps (IE make a texture with black for lower areas and white for higher areas, then run the "normal map" filter over it) I just don't know if that's the right way to do it, or if it'll work. Also I can't state enough how astounding this work is that everyone in this thread is doing. I'm confident that soon we will be able to add a feature into Kotor that was in early development when it first came out Next up is ray-trace lighting and ambient occlusion ;p Quote Share this post Link to post Share on other sites
Darth_Sapiens 90 Posted December 4, 2014 Ah so I see. I was actually stuck on how I'd make my own normal map to work with the engine. I only have a very basic understanding of making bumpmaps (IE make a texture with black for lower areas and white for higher areas, then run the "normal map" filter over it) I just don't know if that's the right way to do it, or if it'll work. Also I can't state enough how astounding this work is that everyone in this thread is doing. I'm confident that soon we will be able to add a feature into Kotor that was in early development when it first came out Next up is ray-trace lighting and ambient occlusion ;p I can't wait til we decipher the remaining parts of the MDL, there are a few things we'll probably find. Right now, were stuck to redoing bump maps for already bumpmapped textures on certain models. Also our bump maps need to be greyscale to be valid, that means after you run the nvidia filter, you need to make it greyscale. As I said, we are unfortunately limited right now, but there is hope on the horizon. Quote Share this post Link to post Share on other sites
redrob41 86 Posted December 4, 2014 iirc you brought up the nwn binary format in the chat, it directly commented on bump mapping, we can do this guys!You mean this one https://github.com/niv/nwn-tools/blob/master/_NwnLib/NwnMdlDecomp.cpp I'll just put it here again so it's on record Quote Share this post Link to post Share on other sites
Darth_Sapiens 90 Posted December 4, 2014 You mean this one https://github.com/niv/nwn-tools/blob/master/_NwnLib/NwnMdlDecomp.cpp I'll just put it here again so it's on record thanks man we'll get this sorted out soon I think Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 20, 2014 Funny, I've been learning to 3D model and how to create materials and the textures they require, and a while back, I finally realised the difference between (proper) bump maps and normal maps -- didn't realise that the pink normal maps were just interim ones though. Was going to test out a simple greyscale map to test it out in TSL but never quite did to due to work. I think you will find that there is no need to run any kind of normal map filter first on the diffuse (color) map before changing it to greyscale -- of the few bumpmap greyscale textures in the game files, you will see that they are for the most part greyscale version of their diffuse counterparts. The game should generate a normal map from the diffuse. It's a similar thing with some 3D modelling applications and game engines like Unreal Engine 4. You can set it up so that a material will take a greyscale version of your diffuse texture, and from that, calculate the normal map from it. Results aren't perfect, as really, you want to be able to have more power/influence on how the final normal map is generated; but still a lot quicker and easier if you don't have the tools to do so. Also as far as K1/TSL, using a greyscale image that has not been "normalized" prior to being made greyscale, means that you can then tweak other aspects of it like: brightness/contrast, shadows/highlights. These should then affect the end RGB normal map generated -- though, I'm guessing that there are limitations on what you can achieve, especially as it's not an RGBA normal map. Cool to see the progress made to do with this -- one of the less understood parts of the game engine along with the model format. Interesting to see what else you guys uncover . Quote Share this post Link to post Share on other sites
Malkior 476 Posted December 20, 2014 @SelfInducedComa Excellent! I will test a few contrast tweaks and report my results. I currently have Kotor up, but with no way to run normal map filters ATM, so this is great news. Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 20, 2014 Hmm, I can't get it to work with the Quarren for TSL. Tried using a normal map filter -- not NVIDIA's, should make no difference as far as my knowledge of normal map filters go -- too before converting it to grayscale and it still would not work for me. Either it appears to have no effect or a prompt appears stating the bump map is invalid. Tried a bunch of TXI variants as well. Have you guys mostly been testing with K1 or have you actually done this in TSL as well? I ask in that the engine's aren't exactly the same in that one is OpenGL and the other is DirectX/OpenGL. EDIT: oh, and not sure my previous statement about there being bump maps in the game files of either game that are simply greyscale images of the color diffuse maps; I recall coming across the odd one, perhaps in K1, but I can't find them so perhaps I am mistaken :/ Quote Share this post Link to post Share on other sites
Darth_Sapiens 90 Posted December 21, 2014 Hmm, I can't get it to work with the Quarren for TSL. Tried using a normal map filter -- not NVIDIA's, should make no difference as far as my knowledge of normal map filters go -- too before converting it to grayscale and it still would not work for me. Either it appears to have no effect or a prompt appears stating the bump map is invalid. Tried a bunch of TXI variants as well. Have you guys mostly been testing with K1 or have you actually done this in TSL as well? I ask in that the engine's aren't exactly the same in that one is OpenGL and the other is DirectX/OpenGL. EDIT: oh, and not sure my previous statement about there being bump maps in the game files of either game that are simply greyscale images of the color diffuse maps; I recall coming across the odd one, perhaps in K1, but I can't find them so perhaps I am mistaken :/ the water bump maps are gray scale, for both games iirc. Personally I've only been testing tsl but I did find an interesting bump map, that wasn't like the normal maps or grey scale maps, it's the bump map for the frozen acid effect from naga shadows tomb, when I get on my PC I'll post the texture, which is present in both games. I think that directx is used for sound functionality iirc. Opengl does the rendering. A good easy to tell way to test the bump mapping is on the male twilek head, try making the diffuse texture's alpha all black, then replace the bump map texture with greyscale, or don't call it at all in the diffuse' txi. The difference is really noticible. With no bump map its super apparent. Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 21, 2014 the water bump maps are gray scale, for both games iirc. Personally I've only been testing tsl but I did find an interesting bump map, that wasn't like the normal maps or grey scale maps, it's the bump map for the frozen acid effect from naga shadows tomb, when I get on my PC I'll post the texture, which is present in both games. I think that directx is used for sound functionality iirc. Opengl does the rendering. A good easy to tell way to test the bump mapping is on the male twilek head, try making the diffuse texture's alpha all black, then replace the bump map texture with greyscale, or don't call it at all in the diffuse' txi. The difference is really noticible. With no bump map its super apparent. Yeah, my comment about DirectX/OpenGL was more to do with Obsidian having made "improvements" to the engine; things like shaders. Anyway, I realised what my issue was, I had created a test folder within another folder inside of Override. Forgot that TSL will look within folders found in the Override folder, but, won't actually look at any folders nested within those. Seems to be working now, at least with the twilek_m01 set of textures. Looks like their normal map effect is heavily tied in with alpha and specular -- why the existing ones tend to look like shiny plastic. Still, probably can do some interesting things with it... EDIT: if you mean the acid-ice texture set I think you mean (below) it does indeed appear to have what looks like to be a valid RGB normal map and not a grayscale image Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 21, 2014 My own initial play with using "bump mapping" for characters: 1 Quote Share this post Link to post Share on other sites
VarsityPuppet 1,085 Posted December 21, 2014 Man, I was trying to give this a shot (with Darth Sapiens' twilek skins) but whenever I modified it, the bump mapping went away. I exported it as greyscale but no cigar. Quote Share this post Link to post Share on other sites
VarsityPuppet 1,085 Posted December 21, 2014 Solution: Don't export with RLE compression Edit: Remove Alpha Channels 1 Quote Share this post Link to post Share on other sites
VarsityPuppet 1,085 Posted December 21, 2014 My test: The Tar-faced Twi'lek As cool as that looks, it looks pretty weird with the skin (shiny, plasticy) and while I could see this being useful for shiny things (alien skin, metals), this will probably look terrible on human skin. That said, maybe using a normal map with a less intense shine might help? idk Quote Share this post Link to post Share on other sites
Malkior 476 Posted December 21, 2014 My test: The Tar-faced Twi'lek As cool as that looks, it looks pretty weird with the skin (shiny, plasticy) and while I could see this being useful for shiny things (alien skin, metals), this will probably look terrible on human skin. That said, maybe using a normal map with a less intense shine might help? idk Actually human skin can be replicated pretty well even with cm_baremetal, with a few noise filters and a less liberal approach to the shininess. The biggest hurdle for me was to get more reds into the reflective texture to simulate subsurface flesh colors. (Due to our new custom cubemaps, this is no longer an issue) If we can get a good realistic skin pore bump texture (along with added skin folds and creases to replace some of the worse shading details of the diffuse), then I am certain we can achieve a rather realistic skin quality. (Even with the shininess) Incidentally out of curiosity, would someone be able to edit the models of people who have alpha tranparency applied to their hair, such as Mira or Atton, so that we can add a reflective map to them as well? Quote Share this post Link to post Share on other sites
Vriff 21 Posted December 22, 2014 That looks intense, VP. Skin a rakghoul with that and replace it's head with an Xenomorph and you'd have the mod Q and redrob(not sure on that one) were working on years ago. Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 22, 2014 My current attempt. It's hard to see the bump/specular out of game with the screens, that's due to going for something more natural rather than strong. The first uses my original bump map texture, skin specular sheen appears more pourous -- bit hard to tell when not seen in-game. The second one uses an alt bump map resulting in a more glossy uniform sheen to the skin -- again, hard to see when not in-game. Quote Share this post Link to post Share on other sites
Darth_Sapiens 90 Posted December 22, 2014 a couple interesting points i'd like to bring out, keep in mind these are animateable as well as every other texture in game (other than particle textures, they are controlled by the model) the controls i brought up from nwn in my first post are valid for use in kotor. bumpyshinytexture is like a reverse envmap, ill explain in a diagram shortly, how ever it works with non-bumpmappable surfaces as well (with out bump mapping effect) i'm gonna test out the acid texture in kotor, maybe we can get it to be valid and not crash the game. the bump map effect (not bumpyshiny texture) is basically the same as bumpyshiny, but with a dynamically generated cubemap based n the light in a room and from what i can tell the aforementioned controls, this changes in every room and is noticeable with no smooth transition, in fact maybe its related to the rooms models as some rooms have two or more "hot-swaps" in them. though this is for dx-8 it resembles eerily what we see in kotor http://developer.download.nvidia.com/assets/gamedev/docs/AGDC__Per_Pixel_Shading.pdf p.s. SIC, that's the texture (acid one) that i had in mind Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 22, 2014 a couple interesting points i'd like to bring out, keep in mind these are animateable as well as every other texture in game (other than particle textures, they are controlled by the model) the controls i brought up from nwn in my first post are valid for use in kotor. bumpyshinytexture is like a reverse envmap, ill explain in a diagram shortly, how ever it works with non-bumpmappable surfaces as well (with out bump mapping effect) i'm gonna test out the acid texture in kotor, maybe we can get it to be valid and not crash the game. the bump map effect (not bumpyshiny texture) is basically the same as bumpyshiny, but with a dynamically generated cubemap based n the light in a room and from what i can tell the aforementioned controls, this changes in every room and is noticeable with no smooth transition, in fact maybe its related to the rooms models as some rooms have two or more "hot-swaps" in them. though this is for dx-8 it resembles eerily what we see in kotor http://developer.download.nvidia.com/assets/gamedev/docs/AGDC__Per_Pixel_Shading.pdf p.s. SIC, that's the texture (acid one) that i had in mind As far as I can tell these don't work: isdiffusebumpmap 1 isspecularbumpmap 1 Only isbumpmap will work without throwing an error on load; you can use these with isbumpmap, however, that does not mean that they work only that the engine will ignore them if they don't work. As far as I can tell, they do nothing when used in conjunction with isbumpmap. As far as bumpyshinytexture, it seems to work the same as envmaptexture when used in conjunction with bumpmaptexture. And bumpmapscaling does work, how I'm not sure as it doesn't seem to work the same as I would expect from regular bump/height maps -- seems to make the effect wider than heigher. I haven't used specularcolor but I suspect it will and will work along the lines I suspect. Yeah, I think that what you can achieve with this will be limited as this seems to be more of a bumpy reflections implementation of bump mapping and not really normal mapping as you would expect it from modern games. Mainly good for things that are (hard and) reflective, with limited use for organic things -- especially as it only works with models that have existing bump map textures. Quote Share this post Link to post Share on other sites
sELFiNDUCEDcOMA 98 Posted December 22, 2014 Final tests with the updated green tex again, albeit with some tweaks to make it more vibrant along with the other variants I've done... And this last one should show more clearly the bump-specular effect to the textures... Quote Share this post Link to post Share on other sites
redrob41 86 Posted December 23, 2014 I did some experiments and posted the results over at LucasForums (because I have an easier time with the text editor there) http://www.lucasforums.com/showthread.php?p=2857254&posted=1#post2857254 Quote Share this post Link to post Share on other sites
Dastardly 31 Posted November 11, 2015 Continuing from what was discussed last year, I have learned how to enable bumpmaps on models which do not originally have support for them. Specially thanks to LiliArch for helping me . Below is a test I did on one of the PC head models. += The process involved to make a model bump map compatible is actually rather simple if you're somewhat familiar with the how the .mdl file works. On each mesh node, the first bit in the MDX Data Bitmap is a yes/no flag for rendering bump maps. Setting the bit to 1 will enable it. There is still a matter of UV's for the bump map. The MDX bump map UV offset is 16 bytes away from the beginning of the texture uv offset. While you *could* insert extra UV's into the .mdx file then fix each node's .mdx offset, this is just not needed. Simply set the bump map's UV offset equal to the texture UV offset. I probably could have explained that a lot better and made a neater set of instructions but instead I'll make a tool somewhere down a long the line which does the above for you instead. As for the "isdiffusebumpmap" and "isspecularbumpmap", neither of them seem to require the above to work. "LEH_wall01b" is an instance of this. I've checked various models that use it, none seem to have the bumpmap flag turned on in the .mdls' nodes. tl;dr Bumpmaps can be now put on possibly any model and I'll probably make a tool which does all the hex editing for you. still some problems that need to be solved 4 Quote Share this post Link to post Share on other sites
OldTimeRadio 0 Posted February 21, 2016 I'm interested in this process and am wondering if there have been any follow-up posts about it, since? Thanks! Quote Share this post Link to post Share on other sites
Dastardly 31 Posted February 22, 2016 I'm interested in this process and am wondering if there have been any follow-up posts about it, since? Thanks! Unfortunately, I hit a road bump with this. There are 9 floats per vertex in the mdx file which seem to be needed when bumpmaps are enabled. They look like a collection of normals but I have no idea how to calculate any of them (Possibly related to something called "Tangent Space"). If anyone knows what they could be, pm me or post here. Thanks. 1 Quote Share this post Link to post Share on other sites