Salk

Help with issue with (re)Texture

Recommended Posts

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!

1800228042_StarWars_KnightsoftheOldRepublic2018-07-1408_19_53.jpg.689cb05106d29208f3e61db19eca8a42.jpg189843525_StarWars_KnightsoftheOldRepublic2018-07-1510_13_26.jpg.9835e10c14dd313c26e57dbdb9cdb218.jpg

Share this post


Link to post
Share on other sites

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.

  • Thanks 1

Share this post


Link to post
Share on other sites

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.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello again!
 

Using blending punchthrough did improve things dramatically but there are still imperfections. I am attaching a new screenshot.

CroppedImage.jpg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

2024996340_SalksDantooineLeafs-AlphaMerged.thumb.png.153f88e055fdcdc26ab50724da390a2b.png

Alternative 1 is my attempt. Alternative 2 is DP's latest attempt.

Edited by ebmar
Attached screencap set as hidden contents.
  • Like 1

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.

 

Star Wars_ Knights of the Old Republic 2018-07-19 10_44_06.png

  • Like 1

Share this post


Link to post
Share on other sites
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.

  • Dark Side Points 1

Share this post


Link to post
Share on other sites

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.

  • Light Side Points 1

Share this post


Link to post
Share on other sites
4 hours ago, Salk said:

Star Wars_ Knights of the Old Republic 2018-07-19 10_44_06.png

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Thanks 1

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

I am bumping my own topic because I am really trying to understand how bumping  ( :Dworks 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

  • Light Side Points 1

Share this post


Link to post
Share on other sites
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".

  • Thanks 1

Share this post


Link to post
Share on other sites

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... :)

Share this post


Link to post
Share on other sites

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.

  • Thanks 1

Share this post


Link to post
Share on other sites
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.

  • Thanks 1

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
1 hour ago, Salk said:

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

1415938845_SalksDantooineLeafs-Bump1.thumb.png.9749cd4296c8041ae7d2692b42aaa1cc.png761848571_SalksDantooineLeafs-Bump2.thumb.png.1b2bf4391ebd1dab27cb786663cc645f.png94510271_SalksDantooineLeafs-Bump3.thumb.png.832c69a1b0322418c7a4bff390765ced.png

Those are nice works, @Salk! :cheers:

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.