Author Topic: Problem transforming .TGA into .PLT  (Read 1209 times)

Legacy_Wallack

  • Full Member
  • ***
  • Posts: 221
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« on: June 26, 2014, 09:43:36 pm »


               

As some of you know, I'm working in a ASOIAF PW project and I need medieval looking stuff.


 


I never knew anything about modelling but I was able to export some objects from M&B Warband. I would love to create robes (if someone could create a robe for me from a model please, contact me) but for now I'm happy that I achieved creating helmets.


 


This is the helmet from the game using a .tga


 


L1oTfUF.png


 


I have a BIG problem that I don't know how to fix. If I transform that .tga into a .plt this happens:


 


v6PSl2X.png


 


Does anybody know what could I do to fix this problem? It looks like crystal !!



               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #1 on: June 26, 2014, 10:01:53 pm »


               

<examining different...>


 


I see two issues there.


The first is smoothing groups (i.e. the faces on top have *no* smoothing group assigned to them). This gives the crystaline facet look.


The second is that at least some of the metal pixels are on the leather or leather2 or cloth layer (the brown stuff) instead of metal1 or metal2.


 


So, on the model, select all the top faces and then assign a smoothing group (at the bottom of the mesh rollout).


For the plt, cut the pixels that are on the wrong layer and paste them into the right layer.


 


<...facets>



               
               

               
            

Legacy_Wallack

  • Full Member
  • ***
  • Posts: 221
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #2 on: June 26, 2014, 10:04:51 pm »


               

About the .plt I know what you mean, it was just a quick conversion to see how it looked but about the smoothing group don't really know how to do it with GMax. This is my greatest achievement now.


 


Any good tutorial for the smoothing groups? also how to select the faces? because by default I can only select the whole model.


 


Thanks '<img'>



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #3 on: June 26, 2014, 10:07:25 pm »


               

if you intend to retain the full color, don't use PLT, instead use OTR's trick to point to a fake tiny TGA texture and then do a TXI texture replace to keep this original texture. I can show you that if you like, or look up "using PLT and TGA on the same model" or something similar.


 


What you are probably seeing in your plt is a metal replacement of the underlying texture. Looks like you've chosen rusted metal as your color.


 


Also, from the looks of the crystalline helmet, it looks like the smoothing groups are either not sorted properly (use smooth modifiers in gmax to play with it), or that each individual face is not welded to the whole (which should have thrown a ton of non-fatal errors during export).


 


from the looks of the pings, everybody is answering you at the same time '<img'>



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #4 on: June 26, 2014, 10:08:43 pm »


               

1. You need to convert the tga to psd format and open it in GIMP (you'll need the GIMP plt plugin). Set the mode in GIMP to grayscale and make sure each layer has an alpha channel.


 


2. PLT files have 10 layers. You'll need to make sure your new texture has all these layers (from top to bottom):


  • Tattoo2

  • Tattoo1

  • Leather2

  • Leather1

  • Cloth2

  • Cloth1

  • Metal2

  • Metal1

  • Hair

  • Skin

3. Each layer corresponds to a color channel. Select the areas you want colored by each channel, invert the selection, and hit the "DELETE" key. This will turn the deleted sections transparent, leaving the remaining parts visible. What's visible is colored by that channel. If a layer does not apply to the model then delete every portion of the image in the layer, leaving an empty layer (it'll look like a checkerboard).


 


4. When you are done setting the channels, export the image as a PLT.



               
               

               
            

Legacy_Wallack

  • Full Member
  • ***
  • Posts: 221
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #5 on: June 26, 2014, 10:13:30 pm »


               


if you intend to retain the full color, don't use PLT, instead use OTR's trick to point to a fake tiny TGA texture and then do a TXI texture replace to keep this original texture. I can show you that if you like, or look up "using PLT and TGA on the same model" or something similar.


 


What you are probably seeing in your plt is a metal replacement of the underlying texture. Looks like you've chosen rusted metal as your color.


 


Also, from the looks of the crystalline helmet, it looks like the smoothing groups are either not sorted properly (use smooth modifiers in gmax to play with it), or that each individual face is not welded to the whole (which should have thrown a ton of non-fatal errors during export).


 


from the looks of the pings, everybody is answering you at the same time '<img'>




 


The first one is without a .plt is using the .tga directly. The second one is because I tried to convert that into a .plt. I know how the process works with GIMP and/or PSD the thing is about what you both said, the smoothing groups. Don't really know about them.


 


Can I just make the whole model smoother instead just faces to make it easier?


 




1. You need to convert the tga to psd format and open it in GIMP (you'll need the GIMP plt plugin). Set the mode in GIMP to grayscale and make sure each layer has an alpha channel.


 


2. PLT files have 10 layers. You'll need to make sure your new texture has all these layers (from top to bottom):


  • Tattoo2

  • Tattoo1

  • Leather2

  • Leather1

  • Cloth2

  • Cloth1

  • Metal2

  • Metal1

  • Hair

  • Skin

3. Each layer corresponds to a color channel. Select the areas you want colored by each channel, invert the selection, and hit the "DELETE" key. This will turn the deleted sections transparent, leaving the remaining parts visible. What's visible is colored by that channel. If a layer does not apply to the model then delete every portion of the image in the layer, leaving an empty layer (it'll look like a checkerboard).


 


4. When you are done setting the channels, export the image as a PLT.




 


Thanks! I knew about that 2 days ago '<img'> I was using plt editor initially but gimp works better. Anyway, the main problem I think should be fixed with the smoothing Kipp and MerricksDad say, but have to try it yet as I don't know how to do it.


 


Any good tutorial or example or maybe just doing it to the whole model instead?


               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #6 on: June 26, 2014, 10:17:17 pm »


               

<smoothing a few...>


 


Under the "editable mesh" rollout is a icon for picking faces


Mxn1THI.png


 


Pick your faces and scroll down the rollout to the bottom and assign a group.


l0vhzWy.png


 


The thing to remember about smoothing groups is edges between faces *inside* a smoothing group are "smoothed" with a shading algorithm. Edges between faces with no smoothing group or belonging to *different* smoothing groups are sharp creases (no smoothing shading applied).


 


<...ruffled feathers>



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #7 on: June 26, 2014, 10:20:47 pm »


               

With a mesh selected, you should see a panel on the right of gmax that has a tab called "modify" or may have the blue rainbow looking icon. Anyway, it should be the second tab from the left.


 


In that tab you can choose to select by type, including vertex, edge, face, poly (actually face groups), element (again face groups). The Selection panel lets you switch between these settings, or you can also open the mesh tree and view the tree branches that match up with those selectable types.


 


4sMcvCu.png


 


So as Rolo was suggesting, the panel to change smoothing groups (instead of using my smooth modifier), scroll down in the modify tab and you'll find the "Surface Properties". This should appear only if faces, polys, or elements are selected ( don't quote me on that ). Under surface properties, you'll see a bunch of features for dealing with smoothing groups. I think Rolo is suggesting you put them all at smoothing group 1. So with all faces selected, just click the 1 box on the chart there. That would be easiest, and then you can pick and choose the others later and switch them to 2 or 3 or something.


 


CYpkzX2.png



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #8 on: June 26, 2014, 10:21:51 pm »


               

This is an awesome display of people trying to help really hard '<img'>



               
               

               
            

Legacy_Michael DarkAngel

  • Hero Member
  • *****
  • Posts: 627
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #9 on: June 26, 2014, 10:31:57 pm »


               

Since we have others doing it, I won't post screenies '<img'>


 


Instead, I'll just add...


 


After selecting all faces, I generally use the "Clear All" button to erase whatever smoothing groups may have been applied by default, then use "Auto Smooth" to set new smoothing groups.  If I'm not mistaken, the spinner value next to the Auto Smooth button is the threshold angle between two faces that auto smooth uses to determine the smoothing groups.  45.0 has always worked out pretty good for me.


 


Setting all faces to one smoothing group may not give the results you are looking for, as in there will be a lot less definition where there are sharp creases in the model.  The creases are still physically there, but when rendered in game it may not look like it.


 


icon_zdevil.gif


 MDA


               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #10 on: June 26, 2014, 10:32:09 pm »


               

<crowing...>


 


I love this place :-)


Ok, I love the people.


Er, most of them.


 


<...like a raven :-P >



               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #11 on: June 26, 2014, 10:37:22 pm »


               

Pardon my forgetful mind, but are there not limits to how many smoothing groups that the NWN engine can use?  I am sure I am not remembering this correctly, but I thought the actual limit was 2 possibly 3 total smoothing groups per object or mdl definition?  IE as in the engine will only use/modify what is displayed by a maximum number of smoothing groups?  And if there is a maximum, doesn't it apply to the entire .mdl file as in the entire tile if you are working on a tile, or the entire creature,  regardless of the number of sub-objects?


 


I can remember running into issues with the number of smoothing groups, but I can no longer remember what those limits are/were etc.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #12 on: June 26, 2014, 10:42:41 pm »


               

I think Bannor Bloodfist is right. On humanoid models, I have used a very large quantity of smoothing groups (probably 10 on a chest piece). I am also not certain exactly how they are put in the mdl file, but it seems like they become a binary flag system. Like smoothing group 1 is 1, 2 is 2, 2 and 1 together is 3. Yes you can mix them and get more options, such as s-curves around a smoothing group (I can show you if you like). I've seen some really high integer smoothing group numbers, so it may be a limit of 16 or 32 groups.


 


Edit: If I am not mistaken, each individual mesh node has its own smoothing group container, distinct and not shared with other meshes, which is why in my tileset tutorial I discussed making sure those seams between tiles are manually smoothed from tile to tile with the extra edging. Group1 in tile one is distinct from group 1 in tile two. I believe that rule pertains to all types of model.



               
               

               
            

Legacy_Wallack

  • Full Member
  • ***
  • Posts: 221
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #13 on: June 26, 2014, 11:35:13 pm »


               

WAAAAAAAAAAAAAAAA


 


QnrlUyo.png


 


Really nice guys, really nice !!


 


Tomorrow I will create the texture with gIMP to make it with two metal tones (helmet and visor)



               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Problem transforming .TGA into .PLT
« Reply #14 on: June 26, 2014, 11:44:07 pm »


               

<sniffing a...>


 


I'm no art critic, but I'm kinda digging that copper-bronze burnt sienna-like tint on the armor... definitely unusual :-)


 


<...snifter of fine cognac>