Game Development Community

UVMapper and Milkshape question

by Vijay Myneni · in Artist Corner · 12/15/2004 (2:52 pm) · 18 replies

Hi,

Quick question. I've created a model in Milkshape, exported it as an OBJ to use UVMapper on it, and created a texture and texture coordinates in UVMapper. Now, I know I can export another OBJ from UVMapper. But is there any way to get just the texture coordinates back onto my original .ms3d model?

The reason I want to do this is that someone else on my team has already done rigging and animation using that original .ms3d model. I would hate for him to have to redo all that work on this new OBJ model.

Alternatively, is there a way to separately get these texture coordinates into the DTS that will ultimately be created. Or is the only possible workflow using these tools to do everything on the OBJ once you've done texturing?

Thanks,
Vijay

#1
12/15/2004 (3:12 pm)
"I would hate for him to have to redo all that work on this new OBJ model."

Then maybe use his version and redo the uvmapping. Animation is a lot harder than uvmapping.

Sorry I can't actually answer your question though. I don't know the tools very well. What you're talking about does sound possible though.
#2
12/15/2004 (3:46 pm)
If I use his version and redo the UVMapping, then I'm still stuck (after the UVMapping) with an OBJ file with no joint/animation information.

What I need is a way to merge texture coord data and bone assignments from two different models.

Such a tool must exist, otherwise everyone using Milkshape and UVMapper together would never be able to redo their uvmapping if they didn't like it later on without losing their animation. Is that the case?
#3
12/15/2004 (4:01 pm)
I'm afraid to say that it is probably the case.

edit: I just looked at milkshape and it might be possible to export to half-life's smd format.... reload the object into milkshape, and then reimport the SMDs....

maybe.

edit2: I just tested this and it appears to work.... some joints get rotated a little funny on mine... thigh and chest, but it is a simple matter of rotating them on the y axis and keyframing the change.... better than starting over at any rate.

when you reimport the SMD.. make sure you deselect triangles so you keep your new triangles rather than just pulling the old ones back in.
#4
12/15/2004 (4:29 pm)
David, thanks for helping me with this. I tried what you said: I exported the file with the skeleton as an smd, then I imported it back onto the file with the correct texture assignments but no skeleton. The skeleton comes in, but there are no vertex assignments. So the mesh isn't bound to the skeleton.

Did I do something wrong?
#5
12/15/2004 (4:48 pm)
I don't think so... I just did a quick test back onto the same model I exported from. The idea then I guess is that it's alot easier to reapply the vertex weights than it is to reanimate, right?

The bones animate though right? I think we are on the right path, even if this isn't the exact solution.
#6
12/15/2004 (4:54 pm)
Ya, the bones come in correctly, but if they're not then bound to the mesh, this is more or less the same as saving your animation and skeleton into a file, and then doing a File->Merge right?

But you're right, re-binding the skin to the skeleton is not that bad. I guess our workflow should be:
1. make model
2. export obj file, uvunwrap, make sure you get it right, import back to milkshape
3. create skeleton, bind it, animate it.

And if at that point, we want to change the uv coords, we:
1. export obj file, uvunwrap, import back to milkshape
2. merge in the skeleton and animation (using SMD if necessary)
3. rebind the skeleton to the new mesh

I can live with that. Thanks David!
#7
12/15/2004 (4:58 pm)
Heh, I guess so. I had a really complicated solution worked out using like 5 different exporters and stuff but I guess I just don't know what milkshape is capable of anymore. : ) Glad this is at least liveable.
#8
12/15/2004 (5:01 pm)
Well, what's your complicated solution? If it's not too bad, it would still be nice to have a way to do this. I'm willing to try anything (I hate rigging that much :) ).
#9
12/15/2004 (8:10 pm)
I'm sure it would never work, as it required GMAX or MAX... and relied on transfering polygons with the .smd format (which I don't think is the case). Half-life's models were in md2, I think, and only the bones were in the SMDs.
#10
12/15/2004 (9:29 pm)
Cool. Thanks anyways.
#11
12/16/2004 (2:25 am)
Hate to see that work has already been done, but:
in Lithunwrap you can save the UV mapping indepently of the model.
Just open yours save the UV.
Have him save as OBJ (only if it will save the animations too)
open his in Lithunwrap and apply your mapping to his model. add your textures to his model and that should be done.

hope that helps, its been a while but i've done it.
#12
12/16/2004 (10:02 am)
Hi Alaric, thanks for the post. I think the problem with this approach is that you can't save as OBJ and keep your skeleton/animation data. UVUnwrap also allows you to save the mapping independently of the model. Thanks for the suggestion though.
#13
12/26/2004 (3:06 pm)
I just saw a post about importing and exporting DTS shapes with animations into lithUnwrap.. definitely check their site as I think that will solve all your problems!
#14
12/26/2004 (3:16 pm)
Thanks David, I'll check it out. That would definitely come in handy.
#15
12/26/2004 (3:32 pm)
I don't think the dts importer exporter in lithunwrap is that capable from what I have been told.

If your gonna make models (I hate to say this) the proscess is usually Mesh, texture , Rig, export. You have to remember that in the future. I have really never heard anyway around it no matter the software you use.

Matt
#16
12/26/2004 (4:22 pm)
I think that the commercial version of LithUnwrap is Ultimate Unwrap 3d, but I have never used it. The UU3d product can apparently import and Export DTS objects, but again, I have never used it.

Search forums for Ultimate Unwrap 3d is my suggestion.
#17
12/28/2004 (7:47 am)
I have UU3d and I don't see any capability to import/export DTS files.

I am however at the stage where I need to do what Vijay is looking for (two people, one mapping and one rigging the same model at the same time).

One thing I do already know is that UU3d directly opens and saves to Milkshape files and can save the UV map to a separate file.

So this is what I'm going to try:

1) Me: Open a copy of the Milkshape file in UU3D as it stands today (unrigged).

2a) Me: UV map it in UU3D.
2b) Someone Else: Open the same file in Milkshape and rig it.

3a) Me: Export the UV map to an external file from UU3D.
3b) Someone Else: Save the rigged file in Milkshape.

4) Me: Open the newly rigged Milkshape file in UU3D.

5) Import the previously created UV map.
6) Save the Milkshape file in UU3D.

This should now be the combined UU3D mapped and Milkshape rigged file.

Only steps 4 through 6 need to be done in isolation (i.e. while only one person has the file open).

From what I know of the tools I'm betting that it works. I'll let you know.
#18
12/28/2004 (8:08 am)
Careful Jeff. I had the same thought but couldn't see a way to do step 5. If you figure it out, definitely let us know. But make sure it's possible before you get too far into it. Don't want you to make the same mistake I did.