Salk 374 Posted July 15, 2018 Hello! I am replaying KotOR and I am currently in Dantooine. I could not help noticing how awful the original 128x128 LDA_leaf02.tga texture is so I've tried to use GIMP in order to work on a replacement. While not being the improvement I was hoping for, it is better than the original but I have a problem with the texture showing a white line around the border at times and from certain angles... I have attached two screens with the original texture and my replacement. Any help with diagnosing the issue would be much appreciated since the current state is simply unacceptable. Also, I'd be grateful for advice, suggestions or general feedback. Thanks! Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted July 15, 2018 What's your TXI semantic? I imagine the original would have used blending punchthrough Edit: Looking at the original TPC it appears not. No TXI data at all. Also, make sure your diffuse background extends beyond the borders of your alpha mask, in order to prevent bleed causing the outline you describe. 1 Quote Share this post Link to post Share on other sites
Kexikus 995 Posted July 15, 2018 I had that issue as well with transparent textures. I think it's caused by semi-transparent pixels at the edges of your alpha channel mask. Those lines are not actually white, but show the background geometry/skybox because KotOR cannot handle semitransparency with other objects behind them properly. It might be fixable similar to the hologram edits DarthParametric did before, i.e. by changing the node order in the model, but I have not tested that. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 16, 2018 Hello again! Using blending punchthrough did improve things dramatically but there are still imperfections. I am attaching a new screenshot. Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted July 16, 2018 That screenshot is too tiny to make anything out (at least for an old blind man like me). You'd be better served posting the actual texture. Quote Share this post Link to post Share on other sites
Salk 374 Posted July 16, 2018 Of course! Here it is. LDA_leaf02.tga Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted July 16, 2018 Try this and see if it is an improvement: Alternative_LDA_leaf02.7z Although at least part of your problem is that your alpha mask isn't solid. It has grey values, so you are going to have semi-transparent edges, probably not a great idea for leaves. Quote Share this post Link to post Share on other sites
Salk 374 Posted July 16, 2018 Unfortunately it still has the same issue. Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted July 16, 2018 Yeah I think you need to fix your alpha mask. Edit: I'm not sure if this will be an improvement or not Alternative2_LDA_leaf02.7z 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 16, 2018 I tried this version too but the problem hasn't gone away. Thank you very much for your help though. I guess the imperfections are quite minor and if nothing can be done about it, I will keep it the way it is. It does bother me though. But since it's my wife that works with the texture on GIMP, I will have to wait for her return to see if something can be done with the Alpha Mask. I am completely ignorant about graphics. Quote Share this post Link to post Share on other sites
ebmar 893 Posted July 16, 2018 (edited) Maybe adding one more line in .txi data would do something nice on your end. As it seems, on my end; everything looks amazing to be honest 😂 blending punchthrough clamp 3 I'm attaching a screencap of my end result from DP's latest attempt with the alpha: Alternative2_LDA_leaf02.7z and my attempt with the alpha: Alternative_LDA_leaf02_Alpha_v1.7z using the earlier attached file from DP. Spoiler Alternative 1 is my attempt. Alternative 2 is DP's latest attempt. Edited July 19, 2018 by ebmar Attached screencap set as hidden contents. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 16, 2018 Thanks, Ebmar. I will soon give it a try (not at home now). I am quite happy with the improvement although I fear that there'd be need of work to be done on the models to make it a little more seamless and it is not something I am capable to do. Quote Share this post Link to post Share on other sites
Salk 374 Posted July 19, 2018 Okay, since I was not satisfied with the previous attempt I have redone this from scratch and the result is way better. Since it is the first time I dabble with GIMP and retexturing, I welcome feedback and suggestions for further improvements. If none is given, I was considering uploading this as graphics enhancement for KOTOR. I think the tree looks finally decent (and I also tried to remain quite true to the original texture) and the new texture is only 430 470Kbs in size. 1 Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted July 19, 2018 10 minutes ago, Salk said: I welcome feedback and suggestions Looks like a good improvement over the original, but my suggestion would be to get GLIntercept and use the freecam to zoom in for better screenshots. You can also try Googling "boab" for some reference material, seeing as that appears to be the kind of style they were going for. And if you really wanted to change things up, you could consider editing the level models and adding more/bigger leaf planes. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 19, 2018 Thank you, DarthParametric. Your support and contributions are invaluable, as usual. I did check the Boab and I must say it does look much like the trees in Dantooine. I could have probably found a better texture for the wood if I had known that sooner but overall I am moderately satisfied this time. I'll also make sure to use GLIntercept for future screenshots. Thanks again. 1 Quote Share this post Link to post Share on other sites
ebmar 893 Posted July 19, 2018 4 hours ago, Salk said: After zoomed in to some areas, I believe this will be an interesting addition; I think now I get what is it you wanted with those leafs there. Maybe if you can put more details to the leafs and get its shade and tone right, wow- I just hope to see this texture in-game with that flowing animation. Amazing. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 19, 2018 Thank you, ebmar. I appreciate your words. Unfortunately this is the first thing I have ever done when it comes to texturing and I am sure it is a quite poor job. I would love to make the leafs have a better shade and tone but I fear I don't know how to do that. The original leafs were quite detailed but then I had to scale their size to just a few pixels and they have lost a lot. Again, I am sure any competent texture artist could have done a much better job. Even like this it is still an overall improvement though (granted that the shading is better in the original, low resolution texture). I have added a few more brown leaves so that it does look even slightly better now. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 19, 2018 After fiddling a little with Soft Lights I managed to find a better color tone for the leaves and now I'd like to call it done unless there is something more that I should be considering. I know the texture lacks proper shadowing but I am unsure about how to proceed with that because the game shows the texture from different angles and the shadowing would be inconsistent if applied by the texture itself. Doesn't the engine compute the light? Quote Share this post Link to post Share on other sites
Salk 374 Posted July 26, 2018 I am bumping my own topic because I am really trying to understand how bumping ( ) works within KotOR. I am satisfied with what the leaves look like but I am not happy with how flat the branches look in the game and I was thinking that maybe something could be done about it. But my ignorance is alas deep and trying to understand what the most promising topic was suggesting was difficult so I am hoping DarthParametric or some other kind and knowledgeable soul may come to my rescue. My wife (bless her soul, she is the one doing the bulk work on GIMP) has created a new texture file and called it LDA_leaf02bump. Then from what we read, it was a matter of adding extra information to the original LDA_leaf02.txi file and create a new LDA_leaf02bump.txi file to tell the game to use the additional texture. I tested it in game and I see no difference whatsoever (at least it didn't crash!) so if someone can tell me what we are doing wrong and give us some pointers, that'd be truly great. I am not sure whether or not we would even need to do something with some .mdl/.mdx files? I never worked with anything of the sort and I was hoping not to, honestly. Thanks a lot! LDA_leaf02bump.tga LDA_leaf02bump.txi LDA_leaf02.txi LDA_leaf02.tga 1 Quote Share this post Link to post Share on other sites
JCarter426 1,215 Posted July 26, 2018 2 minutes ago, Salk said: I am not sure whether or not we would even need to do something with some .mdl/.mdx files? Yes, model cannot have a bump map unless it is set to. In KOTORMax, this is the "bumpmappable" flag, while in the ASCII file it reads "tangentspace 1". 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 26, 2018 Hello and thanks for your help! 9 minutes ago, JCarter426 said: Yes, model cannot have a bump map unless it is set to. In KOTORMax, this is the "bumpmappable" flag, while in the ASCII file it reads "tangentspace 1". Does it mean I have to install KOTORMax which in turns requires 3DS Max or alternatively Gmax to change a flag? Is MDLOps needed as well? I am starting to have a splitting headache... Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted July 26, 2018 You'll be wasting your time with normal or bump maps for leaves/branches. Aside from the fact that you'd not notice the difference, it's not compatible with alpha transparency. But to answer your question, no, you don't need Max/GMax. The flag can be set in the ASCII, as JC said, or in MDLEdit you can just go to Edit -> Textures and tick the box next to the one you want to use a bump/normal map. Note that if using a normal map it must be converted to a TPC. A TGA will cause the game to throw an error on loading. 1 Quote Share this post Link to post Share on other sites
bead-v 251 Posted July 26, 2018 20 minutes ago, Salk said: Hello and thanks for your help! Does it mean I have to install KOTORMax which in turns requires 3DS Max or alternatively Gmax to change a flag? Is MDLOps needed as well? I am starting to have a splitting headache... You need either MDLedit or MDLOps. With either, decompile the relevant models to ascii, then edit the ascii. Find all the nodes that make use of the texture you want to add bumpmapping for and add "tangentspace 1" anywhere in the node's parameters. Alternatively, you can tick the checkbox for the texture directly in mdledit, like DP said. One thing to note here is that if you're using the released version, you have to convert to ascii, then load that ascii and only then tick. Ticking the box when loading a binary model only works in the latest beta. 1 Quote Share this post Link to post Share on other sites
Salk 374 Posted July 26, 2018 45 minutes ago, DarthParametric said: You'll be wasting your time with normal or bump maps for leaves/branches. Aside from the fact that you'd not notice the difference, it's not compatible with alpha transparency. But to answer your question, no, you don't need Max/GMax. The flag can be set in the ASCII, as JC said, or in MDLEdit you can just go to Edit -> Textures and tick the box next to the one you want to use a bump/normal map. Note that if using a normal map it must be converted to a TPC. A TGA will cause the game to throw an error on loading. Hello and thanks for your advice. I am sure you are right about not noticing any difference but then I have to wonder why the original game comes with files like LKA_leaf01.tpc and its twin LKA_leafo1bump.tpc? Isn't the latter a map for the first? Thanks for telling me how to do it anyway. Quote Share this post Link to post Share on other sites
ebmar 893 Posted July 26, 2018 1 hour ago, Salk said: LDA_leaf02bump.tga LDA_leaf02bump.txi LDA_leaf02.txi LDA_leaf02.tga Want to report that drag-droppin' those files you attached [but I do delete 1 parameter inside the LDA_leaf02bump.txi; which is the isdiffusebumpmap 1. I chose to use the specular one] to the 'Override' do work on my end, and did not throw an error on loading. Here are some screencaps: Spoiler Those are nice works, @Salk! 1 Quote Share this post Link to post Share on other sites