Aller au contenu

Photo

Problem transforming .TGA into .PLT


  • Veuillez vous connecter pour répondre
35 réponses à ce sujet

#1
Wallack

Wallack
  • Members
  • 121 messages

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 !!


  • Anamorphose aime ceci

#2
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<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>


  • MerricksDad aime ceci

#3
Wallack

Wallack
  • Members
  • 121 messages

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 :D



#4
MerricksDad

MerricksDad
  • Members
  • 1 608 messages

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



#5
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

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.


  • Estelindis et MerricksDad aiment ceci

#6
Wallack

Wallack
  • Members
  • 121 messages

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

 

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



#7
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<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>


  • Michael DarkAngel, OldTimeRadio et MerricksDad aiment ceci

#8
MerricksDad

MerricksDad
  • Members
  • 1 608 messages

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


  • Michael DarkAngel et Rolo Kipp aiment ceci

#9
MerricksDad

MerricksDad
  • Members
  • 1 608 messages

This is an awesome display of people trying to help really hard :)


  • Michael DarkAngel et Rolo Kipp aiment ceci

#10
Michael DarkAngel

Michael DarkAngel
  • Members
  • 368 messages

Since we have others doing it, I won't post screenies :D

 

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


  • Rolo Kipp et MerricksDad aiment ceci

#11
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<crowing...>

 

I love this place :-)

Ok, I love the people.

Er, most of them.

 

<...like a raven :-P >


  • MerricksDad et Anamorphose aiment ceci

#12
Bannor Bloodfist

Bannor Bloodfist
  • Members
  • 924 messages

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.


  • Rolo Kipp et MerricksDad aiment ceci

#13
MerricksDad

MerricksDad
  • Members
  • 1 608 messages

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.


  • Rolo Kipp aime ceci

#14
Wallack

Wallack
  • Members
  • 121 messages

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)


  • Estelindis, Michael DarkAngel, MannyJabrielle et 3 autres aiment ceci

#15
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<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>


  • MerricksDad aime ceci

#16
Michael DarkAngel

Michael DarkAngel
  • Members
  • 368 messages

Bannor is probably right as to smoothing group limit.  What that limit is, I don't know.  I do know that I just created a model that uses 9 smoothing groups and the ascii representation of that looks like this

 

    34 31 38    1  51 48 55  1
    36 39 38    1  53 56 55  1
    38 39 34    1  55 56 51  1
    40  3  6    2  57 19 23  1
     6  2 40    4  23  2 57  1
     2  1 40    8   2  1 57  1
    40  1  0   16  57  1  0  1
     0  8 40   32   0 25 57  1
    40  8  9   64  57 25 26  1
     9  4 40  128  26 21 57  1
    40  4  3  256  57 21 19  1
    35 34 36    1  52 51 53  1
    36 34 39    1  53 51 56  1

 

The fourth column represents the smoothing group.  Until I perform some more extensive testing, it appears as if my 9 smoothing groups will work.

 

icon_zdevil.gif

 MDA



#17
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages

<blink, blink...>

 

"An error occurred. You have reached your quota of positive votes for the day."

 

Seriously? 

 

Wow.

 

Guess I'm supposed to get all negative now...

 

<...blink>


  • Pstemarie, Estelindis, OldTimeRadio et 1 autre aiment ceci

#18
Michael DarkAngel

Michael DarkAngel
  • Members
  • 368 messages

<blink, blink...>

 

"An error occurred. You have reached your quota of positive votes for the day."

 

 

That's a first.

 

Ran a test.

 

Compiled my model on export and then re-imported.  My model now has only 7 smoothing groups, not the 9 I exported it with.  The two faces that were smoothing group 8 and 9 were both given smoothing group 1.

 

Guess that answers our limit question.  At least as far as exporting goes.  What the game engine renders...  That requires more testing for a later time.

 

Right now, it's dinner time.

 

icon_zdevil.gif

 MDA



#19
MerricksDad

MerricksDad
  • Members
  • 1 608 messages

I just exported this weird little crystal shape as an appearance and ran it in a torch lit area so I could make certain all 10 smoothing groups were utilized, and they were.

 

To test it out, just copy any non-pc creature appearance type and change its model name to md_testfaces. Unzip md_testfaces.7z to your override folder. Hop in game, debug mode 1, SetAppearance to your new appearance index. Stand up against any light emitter and spin in place and you can see easily all 10 smoothing groups are utilized.

 

https://www.dropbox....md_testfaces.7z

 

To determine if the limit is 16, or as I suspect, a full 32 ( I won't bother testing further than that ), here is an updated md_testfaces.mdl with 18 groups. Due to the height of the torches in my test module (not included), it becomes harder to tell if the newly extruded and manually smoothed faces are rendered separately, but with some positioning of the camera, it does become clear that the limit is somewhere above 16. There is no rounding of any edges on the shape and clear seam lines can be seen at certain camera angles and certain distances from the light source.

 

I'm going with full 32 smoothing groups, which would make use of an entire unsigned 32 bit integer worth of smoothing groups. Due to zero being code for no smoothing group, this actually may be capped at 31 specified groups, and 0 left open to not smooth.

 

https://www.dropbox...._testfaces18.7z

 

But the real interesting question is: what happens if you have 18 specified groups, and 20 polys (40 faces) without specified smoothing (exported as 0). What is the cap on the engine's groups? This freakish file shows just how interesting the NWN engine still can be. All 18 specified groups and 20 dynamically calculated polygons are rendered in separate groups, making at least 38 groups available at run time.

 

https://www.dropbox....aces18plus20.7z


  • Pstemarie, Michael DarkAngel et OldTimeRadio aiment ceci

#20
Bannor Bloodfist

Bannor Bloodfist
  • Members
  • 924 messages

what toolset are you using to export the mdls you used for testing?



#21
OldMansBeard

OldMansBeard
  • Members
  • 152 messages

Theoretically, you can have up to 32 smoothing groups per mesh in ascii models. As MDA has posted, they are represented as bit flags in the 4th field of the faces data and anything that reads those numbers as unsigned 32-bit integers will understand them. A face can be a member of any, all or none of the groups.

 

The game engine doesn't use smoothing groups at all. Smoothing groups don't exist in binary models. They use vertex normals. The compilers use the smoothing groups to compute the vertex normals, then throw them away. The decompilers reconstruct them but there's no unique way of doing that so if you compile and then decompile, the resulting numbers may look different from the original ascii model. Doesn't matter.

 

The AutoSmooth and TurboSmooth functions in GMax/3dsMax correspond well to the way the NWN engine works.

 

Have fun.

 

OMB


  • Estelindis, Michael DarkAngel, OldTimeRadio et 1 autre aiment ceci

#22
Wallack

Wallack
  • Members
  • 121 messages

Will focus this afternoon in creating more medieval helmets.

 

Anyway I tried to create a robe from one of the models of the same game and I ran into the problem that I don't know how to animate it. I just imported a .mdl and replaced its robe with mine:

 

lNYGgbQ.png

 

T-shape is an issue but the animation is a bigger one. Anyways this is too big for me, at least for now.

 

If anyone is feeling in the mood to try, here is the brienne's robe: http://hieloyfuego.com/robe.rar (I have to try ... xD)

 

Thanks everyone!


  • Anamorphose aime ceci

#23
Estelindis

Estelindis
  • Members
  • 3 699 messages

Oh my God, Brienne's armour!   <3 <3 <3  Amazing stuff.   :)  Which game is this model from?  The Game of Thrones RPG?  I got that in one of the Humble Bundles but haven't played it yet...

 

Anyway, near as I can tell, the basic way to animate a robe involves a skeleton, i.e. a combination of linked dummy nodes (for body parts that you don't want hidden by the robe) and very basic, shadow-only meshes (for parts that you do want hidden): one for every part of the body whose movement you want to affect part of the armour.  It's often easiest to load an existing robe into Max and just delete the actual, properly-textured robe part; you should be left with the supportive skeleton (the "bones").  You then want to apply a skin modifier to your robe, add the bones to that, and then paint vertex weights for each bone.  The CC guide goes into it at better length!  http://web.archive.o...ad.php?id=19587  Anyway, I'm gonna have a try at that Brienne robe.  

 

By the way, I am still working on the "Skyrim" armour (it wasn't first in Skyrim or something?).  I am making it so that you can have a variety of chest models visible just sort poking out at the neck and shoulders.  If this turns out to be too much hassle, I'll revert to the previous version, but we'll see.


  • MerricksDad aime ceci

#24
Wallack

Wallack
  • Members
  • 121 messages

Hi!

 

Thanks for the answer.

 

The model comes from Mount and Blade Warband with a lot of different GoT armors. I'm creating a PW based on song of ice and fire and those would be PERFECT for me.

 

I will try follow that tutorial. The skyrim one, yes, is skyrim :) I was able to convert it to a robe as well, because is fully animated as is a creature, but with this one I have a lot of problems, but will try :) Thanks for the tutorial!

 

The skyrim one ... just used the robe just exactly like you, one piece but without arms or legs. Good thing about those models, they are in a full piece (model and texture). Bad thing ... I don't know how to turn the arms as they are one fully piece. But we are close thanks to all of you guys :)

 

Don't really know what you mean by variety of chest models, are you creating it as a chest model instead of a robe?

 

God, so many things I want to do ...

 

EDIT: by the way I really love this tutorial but without imgs is pretty hard: http://ccg.animecafe...php?title=Robes



#25
Estelindis

Estelindis
  • Members
  • 3 699 messages

Yes: I agree that the tutorial would be better with images.  :)  Anyway, parts of a mesh can be moved and rotated by selecting them at the vertex or face level of the editable mesh.  I am currently trying to move the arms down.

 

Thanks for the info about the games!