Guest

Superimposition in Texture Maps

Recommended Posts

Guest

So I'm currently trying to superimpose sections from two textures that use the same body model to make a custom one. However, it feels like I'm just randomly moving pieces around rather than dividing the parts with precision to place them exactly where they should be onto the other layer. The results aren't horrible, it just feels I'm doing this in the most amateur way possible. It doesn't look bad in-game, but the map is a mess when you compare it to the original ones. Also, some areas of the map don't seem to show up at all, so clearly I'm not reading the texture map right.

Is there a way to prevent you from moving/placing the section you want to superimpose beyond the edges of the layer? Part of the issue comes from that, but also being unable to select and replace the areas with care.

I'm using the Free Select Tool from Gimp for this, but only with straight lines.

Share this post


Link to post
Share on other sites
Guest
On 6/4/2020 at 7:16 PM, DarthParametric said:

The are no tools for Maya. The main I/O script is for 3DS Max/GMax. There's also one for Blender which is less functional, but sufficient enough for generating UV maps.

I installed Gmax and KOTORmax, but I can't find I way of loading the model, as if the program couldn't read them. I selected OpenGL during installation.

Share this post


Link to post
Share on other sites
Guest

I'm still stuck here and I have no idea what I might be doing wrong. I extracted the .mdl and .mdx using KTool but I can't open them in KOTORmax with neither the load or import options. If I try to import the model writing its name manually it says the file doesn't exist. Is there a previous step to this? Should I convert it to some other format first?

Share this post


Link to post
Share on other sites
Guest

Hey, thanks again. I had MDLedit already for porting models. Didn't know I needed it for this as well.

Okay, so I've read the Help info on file types and I see what the problem is now. So I simply opened the model and saved it as .mdl.ascii. But now when loading the model in Max I had three errors saying "CoCreateInstance() failed". Not sure what I'm supposed to be seeing, but this is what I see:

 

max.png.11af7307e1646edc039545d2cbc3fa47.png

 

In case this is it, is the process the same as anything else using Gmax? Are there good tutorials out there on how to use the UV maps for retextures?

Share this post


Link to post
Share on other sites
Guest
3 minutes ago, DarthParametric said:

You are using KOTORMax, not NWMax, right?

It says KOTORmax by bead-v in red. It also says "extended from NWmax" though. 

Share this post


Link to post
Share on other sites

Yes. that's fine. @bead-v will have to pipe in with what the "CoCreateIntance() failed" error refers to. But you appear to have the body meshes imported, which should be sufficient to export UV map templates.

The thing you have to remember is that GMax is crippleware. It can't really do anything - that's the entire point of it. But there are ways around the limitations. I cooked up a way to create UV templates from it over a decade ago, and amazingly all the links still appear to work. Go check out step #2 in this tutorial -  https://web.archive.org/web/20151013150937/http://lucasforums.com/showthread.php?t=195825

The tools mentioned: UVMapper Classic and Renx OBJ Tools.

The only thing you need to do for a character model is to delete all the bones and such first. Click on the "Select By Name" button in the toolbar (or press the H key) and enable the "Display Subtree" option down the bottom. Then scroll down until you see the skinned meshes. For a body they should be something like "torso", ArmL" and "ArmR". Anything named "xyz_g" is a bone. CTRL click to select all three and hit the Select button. Now go to "Edit -> Select Invert" and delete. Now you should have just the body model ready to grab the UVs from using the method described in the tutorial.

  • Thanks 1

Share this post


Link to post
Share on other sites
Guest

Reached step 9 after clicking on Export and got the message "Runtime error: Map support not enabled for specified map channel: 1"

Reached step 10 after loading the .obj in the mapper and got "the model you have loaded contains out of range UV coordinate data". I wasn't sure what do so I clicked on "correct". Then the mapper showed something so odd I wouldn't know how to describe it. Then after opening the .bmp file in Gimp the same happened. I obviously did something horribly wrong either before converting the .mdl to ASCII or during the tutorial. I swear I followed every step though.

 

EDIT: Hold on, forgot to do this.

On 6/11/2020 at 6:02 PM, DarthParametric said:

The only thing you need to do for a character model is to delete all the bones and such first. Click on the "Select By Name" button in the toolbar (or press the H key) and enable the "Display Subtree" option down the bottom. Then scroll down until you see the skinned meshes. For a body they should be something like "torso", ArmL" and "ArmR". Anything named "xyz_g" is a bone. CTRL click to select all three and hit the Select button. Now go to "Edit -> Select Invert" and delete. Now you should have just the body model ready to grab the UVs from using the method described in the tutorial.

 

Not sure what you meant by using the ctrl key since that way not all the bones are selected and I end up deleting almost everything. But anyway, the results at the end were pretty much the same.

Here's the list just in case:

bones.png.d22063b8083570078a0b5c2e0bf80e0d.png

This is what I see after getting rid of the bones:

nobones.png.f39965e58ed610502630242aff3f5368.png

Share this post


Link to post
Share on other sites
Guest

Ah! Should've figured.

325528583_nobones.png.1b6424e111e997d8e868e2a3306de89b.png

 

Got it.

 

2110064264_texturemap.png.702490d6619795e1bef8a66d77326179.png

 

I opened the texture as well and I'm comparing them now. Is anything that's not within the boxes not visible? Doesn't seem to be so when you look at the torso, which is that shattered mess at the top left.

So the tutorial continues applying a random metallic texture. How should I continue if what I want is mixing parts of textures that use the same model, but selecting and superimposing them with precision?

EDIT: I deselected what I thought was useless material the second time round for deleting the bones, but looks like I got rid of some information I did need. I fixed the issue with the torso though.

 

texturemap.png.b4fbfaf7dc9102c8f4d7120b6a70eadd.png

Share this post


Link to post
Share on other sites

It seems that UVMapper doesn't handle the separate meshes very well. It's a simple fix. You just need to unify everything into one mesh before exporting. Once you have deleted all the bones, etc., select one of the meshes. Doesn't matter which, let's just choose the torso as an example.  With it, select the Modifier tab (little blue pipe-thing icon on the right). You'll see a stack of modifers - Skin, OdysseyTrimesh, Editable Mesh. Right click on one of them and choose "Collapse All". You may get a warning message, but if so just select OK (and if you do there should be a checkbox to disable future messages about it). Now you should just be left with an Editable Mesh. Further down you should see a sub-heading called "Edit Geometry". Under that is an "Attach List" button. Click that and a selection window will pop up. Select the other two meshes and hit the Attach button. Now the three meshes have been combined into one. Export the OBJ again and you should get a proper UV template. Here's a test output vs 3DS Max:

UV_Comparison.thumb.jpg.29d7a39fc7e9303148e4009f08bafe66.jpg

Edit: Ah yes, my original instructions in that linked thread say as much - "A note concerning multi-object GMax files. The OBJ script only exports a single mesh object at a time. If you have a multi-part model (like a body for instance) you'll have to join them all together into a single mesh before exporting. You should also delete any bones and helper objects if there are any. "

Share this post


Link to post
Share on other sites
Guest

All right, I'll try again in a couple days or so. However, I take it I'm the only one in a long time to try to do this this way? Is this still the usual way or are we taking this route because KOTORmax sort of screwed up for me/I screwed something up? Or is it that most don't bother using anything other than Gimp or Photoshop?

I'm also still curious as to how to use the bitmap image in Gimp. So this will allow me to match what I'm seeing in the texture file with the different sections of the UV map/template. So anything that's not within these sections is not visible in-game, right? But I'd still have to figure out what's what since I'm only seeing a 2D surface with no labels. Is there no way to see the changes applied to the model in a viewer? I noticed some screenshots in the forum show isolated body models with textures applied.

Also, if I want to take a bit of the legs from one .tga  to use it for the other (say, boots that are adjacent to the pants), the UV map isn't of much help, is it? Because it'd be making changes withing the same section. So I'd still have the problem of having to resort to the messy free select tool from Gimp to select the boots from the pants, drawing the line manually when it curves, and being unable to tell if I'm accidentally leaving any boot pixel behind.

I'm not giving up on this method though, I'd just like to have some perspective on how these things are usually done, being new at this and all.

 

EDIT: Well, I've been trying some stuff out with the free select tool and it seems the most effective thing is to just set the zoom to 2000% or something ridiculous like that, and just build stairs pixel by pixel when the line curves. It still has the potential problem of getting rid of colors that blend what you're selecting with the adjacent section, which seems inevitable. The only way to smooth the transition between sections/colors would be to change the color of the adjacent pixels yourself. Can't think of any other way better than that.

I also seem to be able to drag the section I'm superimposing pixel by pixel, as well as comparing it with its original position on the other layer switching between layers. So I guess that issue is solved. All it took was practice I guess.

 

EDIT: Figured out this is the program that allows you to view models with their textures applied. You just have to trick the program by renaming the texture you want to load to whatever texture it asks you to locate.

 

bastila.png.0aff549dbffed43d99a215df7de7eac5.png

Share this post


Link to post
Share on other sites
Guest

All right, third time's a charm. Here's the proper texture map. Sorry about the first try.

texturemap.png.c861a66a56eb32779cb0fe7a197a5848.png

What's that little circle next to the foot sole supposed to be exactly? It's on one of the thighs.

Share this post


Link to post
Share on other sites
Guest

So I thought I'd make a quick update after doing some tests and a couple edits to my previous post. I'm still getting the errors, but apparently after messing with the model viewer, one of my main problems was not having the texture in the same location as the model and model extension files. So, along with the use of the model viewer, I'm finally able to view the model like this:

kotormaxzoom.png.44f961dad239ef86ff8f7d1189812de7.png

bastilamax.png.f4c2534bb1b5b10507eb4dcd5e3c5243.png

bastilazoom.png.78ccf1a6359481988009541ce4b684bd.png

 

And that's Bastila's booty.

 

It sure was a pain to figure out how the zoom tool worked. Turns out it's pretty handy. I guess I'm all set to work on retextures, now that the technical difficulties are out of the way. Sure beats launching the game every single time.

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.