KatsBits Community

Game Editing => General Content Creation => Topic started by: yeedoo on December 28, 2010, 04:29:47 PM

Title: [CoD4] question about xconv(v1.5.1 beta)
Post by: yeedoo on December 28, 2010, 04:29:47 PM
hi all!
I use blender export .obj model with uv mapping. But in cod4Radiant UV mapping looks wrong. I make the model with blender v2.49 and UV mapped with a picture.

1. I export the model to .obj with the option  like the screenshot below
2. I use asset manager convert the uv image to the cod4 materials
3. I use xconv  with above material and obj file make the xmodel_exprot
4. use asset manager convert xmodel_exprot to the xmodel

But UV display is not correct, I don't know wrong with it. Please help me how to fix that?
Thanks in advance.
Title: Re: [xconv]question about xconv (v1.5.1 beta)
Post by: kat on December 29, 2010, 12:10:00 AM
That possibly looks like the UVW map is flipped relative to the texture. Easiest way to find out would be to re-open the texture in your photo-editor and flip the image either left-to-right or top-to-bottom - load the model back into game and see if doing that fixes the issue.

Alternatively, download der_tons MD5 viewer (http://www.katsbits.com/tools/#md5) and load the OBJ file into it to check if the model itself doesn't have any fundamental UVW problems (the UVW map on the OBJ being flipped rather than it being a problem caused by converting to CoD4).
Title: Re: [CoD4] question about xconv(v1.5.1 beta)
Post by: yeedoo on December 29, 2010, 01:42:27 PM
I load the model in the modelviewer, uv mapping is correct then just you like say, i flip the UV image left to right, 90 degree, 180 degree neither of these works, finally flipping top to bottom looks right. See the screenshot below. [cod4] http://www.screencast.com/t/M2sMQC969

But there is a unacceptable problem,note the red mark, i don't know the reason (maybe the tool xconv? it is a beta vision). Is there any other way or script to export xmodel (cod4 using) with uv mapping for blender?

By the way, while English isn't my native language, I try writing acceptable English. kat, thank you for wasting time in reading my poor words. there must be many mistakes of spelling and grammar ;), you could point out or edit it straightly. After all it also is a chance to learn native English.
Title: Re: [CoD4] question about xconv(v1.5.1 beta)
Post by: kat on December 29, 2010, 04:49:36 PM
Can you post a shot of the UVW over the texture in Blender? Not quite sure what the errors are you're highlighting except texture stretching perhaps? silicone_milk was working on "TOXEC" which converted OBJ->xmodel but it looks like that's obsolete now (can't find it). He started a new tool called "AXE" (DAE Xmodel_Export), but I don't know what the status of that is, so you're kind of stuck with the tool you're using at the moment unfortunately.

Don't worry about the language thing, katsbits has a lot of international traffic ;)
Title: Re: [CoD4] question about xconv(v1.5.1 beta)
Post by: yeedoo on December 30, 2010, 02:25:11 PM
I show you the problem in details. I paint the uv image in different color so that we could see the problem clearly. This is what i want in cod4Radiant finally (right side is the uv layout) - blender screenshot (http://www.screencast.com/t/Z0lQfJWEDMdW) and If I do not rotate the uv image, after converted into cod4, It looks like this [cod4] cod4radiant screenshot with original uv image (http://www.screencast.com/t/iINGb88mJNk0) It is completely wrong.

I rotate the uv image(flip top to bottom), then converted into cod4, it looks like this fliped uv image (http://www.screencast.com/t/uKLshBDb) [cod4] screenshot in cod4radiant (http://www.screencast.com/t/jb8VIA9zxApN). It has almost right, but notice the number. Something like mirror of the UV image happens. That's what is confusing me. I have finded a post by Silicone_Milk about that. It is almost two years ago :o. and i am still not sure what cause the problem.
Title: Re: [CoD4] question about xconv(v1.5.1 beta)
Post by: kat on December 30, 2010, 09:35:27 PM
I don't quite understand how it's doing that. At first I though the face-normals had been flipped, which would explain why the texture appears backwards (flipped). But that doesn't explain why the right arm is where the left arm is in the actual model, that implies the model has been flipped on its left-to-right axis.

The only thing I can suggest is to 'mirror' the mesh left-to-right before export and see what that does (so the left arm is where the right one is and visa-versa). Or, use the "Rotate X90" option when you export to OBJ from the script options (as shown in this screenie you posted earlier (http://www.screencast.com/t/eTYieEkLMoz)).
Title: Re: [CoD4] question about xconv(v1.5.1 beta)
Post by: yeedoo on December 31, 2010, 02:22:21 PM
Yes, i mirrors the mesh along X aix,then export to obj,UV is correct finally.
No matter how complex the process is ,the result  is acceptable :)

[cod4] screenshot (http://www.screencast.com/t/g9ouWPvM)

Happy new year,Wish all of your dreams come true.