Jump to content

Home

Lightsaber mapping/in-game problems


PalnGipanji

Recommended Posts

Hi everyone...

 

This is my first attempt at inserting a custom model into JK2, and I thought I'd start with a saber, since I had one already made. I'm working on a fully CG lightsaber duel animation, and I had a low poly version of my character's (Paln Gipanji) saber hilt, so I got it in-game. The thing is that it worked fine before I attempted to map UVs on it. Once I added a UV set to it, I was never able to put it in-game, because it says that I have 1850 verts. I know for a fact that the actual hilt has around 775 verts, but it has 1850 UVs.

 

To better help those who can take the time to help me, I will go over my process here to see if there is an incorrect step I'm taking...

 

STEP 1 - First, I have the model in Maya Binary format, because I know that package the best. I create a UV map for the model using Automatic Mapping. I export the map using Windows->UV Texture Window. The UV map is very clean, but I suppose it's too dense. At this point, the UV map is 1850 UVs.

 

saber.jpg

 

STEP 2 - Next, I open the file with Right Hemisphere's Deep Exploration and save it out as a 3ds file. I uncheck Save Lights, Save Cameras, Save Default Camera and "Remove UV scale, offset from materials". At any rate, it saves the file out with material info and preserves the UV map.

 

STEP 3 - Now I import the file using GMAX. Once I have the model aligned the way I want it and place the tag_flash tag, I export it as an MD3. In GMAX, is says the Vertex count is Editable, and the UVs are 1850.

 

STEP 4 - I open the saber_w.md3 with MD3Viewer and export it as a glm. It always says it can't find the TGA I have in the skin file, but it may be because I don't have the working directory in the GameData folder. (Should it be?? As an alternative, I have been making a Quake3 Control file with the skin path there. However, since I have been having trouble with UVs, I haven't actually had the skin mapped in-game.)

 

STEP 5 - I pack the files into a PK3, copy it to the GameData/base folder and test. At this point, the game loads until I try to select my hilt, and then gives me an error that the saber has more than 1000 verts (1850).

 

I actually got the model to work in-game minus the UV map, and it was just the default gray color. So my question is, why are UVs considered vertex points? And how can I fix this?? I suck with texturing, which is why I thought the Automapping of UVs with Maya was going to be a godsend. If you look at that UV map, it is extremely clean... I didn't touch it at all. I thought that would help me in the long run, but it looks as if it's not.

 

Also, I tried selecting all the verts in the model in GMAX and welding vertices with a tolerance of .01 . This reduced the Vertex count, but still kept the same UVs. How can I remap the UVs without it looking all jumbled? Is there a better way I can do it in Maya to give me less UVs? In the Automatic Mapping options, I chose "Less distortion" over "Fewer Pieces"... maybe I should go back and try "Fewer Pieces".

 

Anyway, I will post a screen of the saber once I have the model in-game with UVs intact. Thanks for your help!!

 

By the way, quamosity, your sabers are great! I was hoping when I wrote this that you would respond. If you have some time, I hope you can help me out! :)

 

*Edit* : I just tried it with "Fewer Pieces"... it only reduced the UV count to 1725. Doh.

Link to comment
Share on other sites

Try making your maps 512*512. As for your vert count....Um..You gotta start with simple objects. Especially with lightsabers that are so small an unnoticable, There is no reason why you should pass 500 polys.

 

You might wanna bring out the trusty WELD tool. Maybe you could post a pic of your saber model in wireframe and flatshade.

Link to comment
Share on other sites

Twisted Vertex : The map is 512 * 512. :)

 

The thing is, I really have nowhere to reduce polys. I deliberately modeled this so that every poly has some function. I can get you a screen soon...

 

The interesting thing is that although there are only 775 verts, there are about 1400 faces. That is rather odd to me. Oh well. :toothrot:

Link to comment
Share on other sites

Twisted Vertex : Yes, I actually did do this. :) What I said was that I kept receiving an error when trying to import the skin into MD3Viewer. I don't have my working directories in my JK2/GameData/base directory because I already have enough junk in there. :) I was asking if I needed to have it in there or not, to get the skin to import correctly.

 

However, it is still of little consequence, as I still cannot get the hilt to load in-game to view the texture mapping anyway. :(

Link to comment
Share on other sites

*ick* That map is horrid! That just show why it's best to do a custom mapping. As for your vert and poly counts, it's hard to say without seeing pictures of it flatshaded with edge lines showing, but it could be that some of your vertexes aren't welded properly or that you have almost every face 2-sided. Meaning, you're going to have to take a look on the inside of the model for visible faces. Best way is to make the model REALLY large, then zoom in until you're inside of it. If the model dissapears then you have backfaces cull on. You should turn that off. That way the reverse side of a face will display as black and you can more easily distinguish the front faces from the back ones.

Link to comment
Share on other sites

Psynex : Horrid?? That's as clean as you could possibly ask for. :) Granted, there are too many sections, but still clean. Almost no distortion to speak of, but, almost no sanity either.

 

Anyway, I promise to get that screen on here soon. Next post, really. :D When I do, I will also post an image of the UVs you'd rather me clean up and see if you'd touch it with a 1000-foot pole. :p

Link to comment
Share on other sites

Ah, the much awaited, highly anticipated screens! :bdroid2: :bdroid2:

 

Please be aware that the first two screens of the saber hilt are high res captures (1366x940). The third screen is of the default UV set, which I refuse to unwrap. :)

 

Saber hilt X-RAY

jk2HiltHelp1.jpg

 

Saber hilt SMOOTH SHADED (Basically same as flat shaded.)

jk2HiltHelp2.jpg

 

Insane Default UV map

blorfUVs.jpg

 

Thanks for the feedback so far! Please feel free to crit!

Link to comment
Share on other sites

I'd say an average polycount for any saber should be around 5-800 with 1000 as a max for a really good blade. I took one of the pics of your model to show you competely unescessary bits on your model that could just as easilly been done in the skin. You wil never see those details in the handle as most will be covered by the hand. And those little ridges up top will barely be 1-2 pixels in profile. You'll be able to maximize your uv space by mirroring each side to your cilindar on the handle. Just a few tips because I was feeling generous.

Example Pic

Link to comment
Share on other sites

KMan : Thanks for the advice, although, I really do not need to reduce the poly count, as far as I am concerned. It has loaded without the UV map, and seemed to do just fine, so I really see no point unless I cannot get it to work without that step. (A last resort, basically.) We will see, I suppose, since I am generally one to find out things the hard way. :p But I'll keep that in mind when editing this saber hilt. Thanks again!

Link to comment
Share on other sites

I have the saber in-game again through using cylindrical UV mapping (approx. 800 UVs), but now it's not loading with the skin file on. These are the contents of the directory for my saber hilt. Please note that I'm NOT working out of the GameData directory or any of its subdirectories... if I need to be, please let me know.

 

models/weapons2/saber_paln_gipanji

============================

 

saber.tga - skin image for saber

saber.jpg

 

saber_w.skin

--------------------

w_saber,models/weapons2/saber_paln_gipanji/saber.tga

--------------------

 

saber_w.qc

--------------------

// Quake III Arena MD3 control file, generated by MilkShape 3D

//

$model "models/weapons2/saber_paln_gipanji/saber_w.md3"

// reference frame

//$frames -1 -1

// frame 1-1

$frames 1 1

$flags 0

$numskins 0

 

// you can have one or no parent tag

//$parenttag "tag_flash"

//$parenttag "tag_parent"

//$tag "tag_flash2"

 

// tags

$tag "tag_flash"

$tag "tag_parent"

 

// meshes (surfaces)

$mesh "w_saber"

$skin "models/weapons2/saber_paln_gipanji/saber.tga"

$flags 0

--------------------

 

saber_w.md3

saber_w.glm

w_icon_lightsaber_na.tga

 

============================

 

I saw 2 tutorials with 2 different ways to get the skin onto the model, by using a Quake3 Control file and by using the SKIN file. I have both, and it seems neither works. What I am getting is the saber in-game as if you tried to set the model to a skin it doesn't have. I made sure the model of the hilt itself inside the MD3 file was w_saber.

 

saberNoSkin1.jpg

saberNoSkin2.jpg

 

Any ideas?

Link to comment
Share on other sites

honestly, get rid of some polys. its just bloody pointless, your not making a saber for the movies here.

 

now, the skin...

your directories should be set up as follows:

c:/base/models/weapons2/saber

or if you want it mod compatible:

c:/base/models/weapons2/<your saber's name>

you should have md3view and the rest of the tools in the base folder, your md3, .skin file and textures in the saber folder

 

your .skin file should read w_saber,models/weapons2/saber (or <your saber's name>)/saber.jpg

before you convert the md3 to glm you must goto file/import .skin... and select your .skin file

 

if you did all this it should work.

Link to comment
Share on other sites

Actually, I found out that it really doesn't matter what you call it... it still works as long as the skin is imported and everything is exported to glm correctly. They just probably forgot their naming conventions until going back to apply the skin before exporting. :p

 

Anyway, I finished the saber. Looks great... although, is it possible to have a bump map applied to a surface, or does it need to be baked into the file texture? Oh well... I'm satisfied with the texture as is. I'll post some screens in a few minutes. Thanks for all the help!

Link to comment
Share on other sites

So what exactly did it take to fix it? I too am having issues with my saber hilt. I followed everything exactly here and mine is only around 330 polys and my skin won't display. I opened it in md3view and applied the skin file and everything. Although the original tutorial for sabers had the file structure set up so that you would get an error from importing the skin file, but the path inside pointed to what would be the final packages filestructure. Should it really make a difference.

Link to comment
Share on other sites

Actually, it really does make a difference. I had the same impression as you... I thought if I had the skin file pointing to the correct texture path then I could just write out the file as a glm whether the skin loaded there or not. What it actually does when it loads the file is it appends the parent directory of the application's path to the beginning of the path found in the .skin file. So if you had:

 

C:\Program Files\Lucasarts\JK2EditingTools\Tools\MD3Viewer.exe

 

and your skin is

 

models/weapons2/saber/saber.jpg

 

then it actually tries to import

 

C:\Program Files\Lucasarts\JK2EditingTools\base\models\weapons2\saber\saber.jpg

 

So, what I had to do was set up the directory structure in the base directory that comes with the editing tools. That solved my skinning problem. I believe it only saves the texture path in the glm if it successfully loads in MD3Viewer... that's my guess, anyway.

 

Still working on job stuff, but I'll get those screens on here before I go to bed.

 

Good luck Psynex!

Link to comment
Share on other sites

Well, it seemed the forums were messing up last night, so I couldn't stay up to wait on it to fix itself to post images. Anyway, when I looked at the images this morning, I found a problem with the texture, but it can be easily fixed. The only part I'm not too happy with is the red/blue button borders around the two silver buttons, but I can live with it. Anyway, here are the screens of it now. I'll fix the texture problem later and post more updates. Enjoy!

 

JK2palnSaber1.jpg

JK2palnSaber2.jpg

JK2palnSaber3.jpg

JK2palnSaber4.jpg

JK2palnSaber5.jpg

Link to comment
Share on other sites

Good info to know. I'll have to move my files over to that directory as well and give it a shot.

 

I like you saber design, and the window idea I've actually had drawn up for about a month, so that's cool as well.

2 things though:

1 - there's a seem running right down the middle of the saber in the first screenshot. You should smooth that out.

 

2 - friendly tip - drop the flash tag down insided the saber just a bit. It'd be cool to see the blade actually rising up through the window, and being able to see through the window when it's not activated.

Link to comment
Share on other sites

That whole appending thing is messing me up. I was actually receiving a different error before because I didn't have the glm file named accordingly. Now I'm getting the "texture cannot be found" error. I set up a base folder structure in my editing tools folder, and even tried moving md3view into the base folder under there and nothing seems to be working. Help please?

Link to comment
Share on other sites

This is my WIP directory structure for my saber hilt:

 

E:\Program Files\LucasArts\JK2EditingTools\base\models\weapons2\saber_paln_gipanji

 

I didn't move any of the tools, just the textures and md3 of the saber. If you feel it necessary, save the md3 to your saber directory in this path from gmax (or whatever other modeling program you're using). Then, open the md3 in the MD3Viewer. Import the skin from this directory, then export as glm to this directory. Pack and test. That's all I did, and it worked perfectly. I hope this helps!

Link to comment
Share on other sites

there's gotta be something else I'm missing. My Tools didn't install to a jk2editing directory. I wonder if this has something to do with it. I can't explain it I checked the paths numerous times and they all match up, but it continues to tell me it can't find the JPG. I ignore the message and pak and test it, but it still comes out without my texture.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...