Jump to content
Sign in to follow this  
eggbeast

model import scrambles uv map - any ideas?

Recommended Posts

we have acquired a very high quality model of a custom built (for unsung) XM16E1 rifle, complete with 3 scopes, bayonet, scope mounts, etc

 

everything imported fine to p3d except for the AN-PVS2 which seems to have lost its texture mapping - see pics below

bottom pic is the model in the authors model program (3ds max)

and the top pic is our p3d conversion in buldozer.

 

this is an eyesore, but we have no idea how to fix it.

we are due to release the mod update in december, and i am worried we will have to shelve this lovely model unless we can somehow fix it.

 

please can anyone help us? we have the obj / mtl and fbx file and tga textures etc

 

anpvs21_zpsj6nezwqk.jpg

  • Like 1

Share this post


Link to post
Share on other sites

how many UV sets do you currently have? can you check the UV editor in both your modelling software and O2 and compare?

Share this post


Link to post
Share on other sites

maybe that works, in o2 in the resource library open up last entry, Sections, check if there are more then one for each texture used. sometimes it imports faces without mapping as a kind of second layer. so one section has proper mapping and a second section, identical number of points and faces without mapping. usually u check that right after import, cause when u assign a texture, and there really where 2 identical sections, you make one section out of it. so try it with fresh imported model.

its rather rare to have such a problem, but since you mentioned it was high quality model i think that could be it. no guarantees :)

Share this post


Link to post
Share on other sites

does this help?

 

texture set is:

    texture="uns_weap_w\a_Optic\ANPVS2_M16\data\anpvs2_co.paa";
    texture="uns_weap_w\a_Optic\ANPVS2_M16\data\anpvs2_nohq.paa";
    texture="uns_weap_w\a_Optic\ANPVS2_M16\data\anpvs2_smdi.paa";

 

 

anpvs22_zpsg7de9l4l.jpg

 

this is the texture we use - derived from tga from the author - maps exactly to that image,uv viewer image  is from the troublesome p3d - seems ok right?

 

 

anpvs2_3_zps369lgmz5.jpg

Share this post


Link to post
Share on other sites

6 uv sets in uv editor (tabs at top), doesnt seem right, check the other ones and delete them if possible (all except UVset 0). also 3.5k points seems rather high tbh.

 

edit: and i need to learn to count, its 7 uv sets :)

Share this post


Link to post
Share on other sites

it has nothing to do with that, that can be fixed later on. I cannot debug it like that, i could have a look over the .p3d, in that case send it to me in PM.

 

PS: always triangulate the mesh before export

Share this post


Link to post
Share on other sites

he imported a .obj, as far i know only 3 point faces possible in .obj, so it was triangulated as it was exported.

mapping is off, UVset0 is obviously ok, meaning, it isnt the uvset shown in preview, or not?

Share this post


Link to post
Share on other sites

he imported a .obj, as far i know only 3 point faces possible in .obj, so it was triangulated as it was exported.

mapping is off, UVset0 is obviously ok, meaning, it isnt the uvset shown in preview, or not?

nope. have a look over his viewport before posting. both obj and FBX supports quads. FBX i think supports ngons as well. O2 doesn't support ngons, so that would turn into an error by itself.

O2 doesn't allow _co/_ca to be mapped to any other uvset but UVSet0 anyways

Share this post


Link to post
Share on other sites

pm sent mate thank you! I included a new export from luchador (the artist) he just did for us, one triangles and one quads, in 3ds format.

others have tried to fix it tonight and cannot seem to get the single uvmap to work

every other model we had from luch is perfect, works out of the box.

Share this post


Link to post
Share on other sites

yeah well, i have tried everything i could think of. i even opened max file provided, collapsed, reset xform, exported as bitxt as well, same result (tried with .3ds, .obj and .fbx provided, as well as with self generated .3ds, .fbx and .bitxt)

the weird thing is it displays correctly in the DX viewport, so UVs work correctly, but it screws over in buldozer, something i have never seen before

cac0cae6be035d31841dcc61b8473ffb.png

d12fd8a36299c3813760306ba4cb225b.png

checked the .paa auto converted as well, no issues there either

c93614b22e3fcb71fa40623fc82b6744.png

i have no clue, have never seen this shit before...(just when i though i have seen it all)

Share this post


Link to post
Share on other sites

could it be the nohq?

edit - no i removed the rvmat completely and it is still borked

 

ok well thanks for trying, we will just have to bin this model and replace it with an older, much less detailed  one we have.

 

shame!

Share this post


Link to post
Share on other sites

could it be the nohq?

nope, i didn't even assign a rvmat. i have assigned as texture the nohq, it is still the same. the textures are fine they are 8bit/chnl 2048x2048px.

 

i'll ask internally maybe someone seen this before, because i haven't

  • Like 2

Share this post


Link to post
Share on other sites

no one seems to be having any sort of idea so far (asked internally in RHS where the collective knowledge base is not too shabby if i can say so, and on discord modelling channel). What i would do is copy paste the UV coordinates to a secondary UV set and then back to primary UV set. I have tested after posting the exports between multiple software, including marmoset and all seems fine, bar buldozer...i am to be honest 100% puzzled 

Share this post


Link to post
Share on other sites

heard it was fixed and the error was due to a few verts were waaaay outside in the UV 0-1 space. wanted to leave it here if any other have issues with it. props to ianbanks for finding the error.

Share this post


Link to post
Share on other sites

sharing this solution

 

The problem is that there is a portion of the UV map that is waaaaaaaay outside the normal (0, 0) to (1, 1) coordinates of the UV square, Normally all your UV coordinates should be around 0-1 or (sometimes) just outside it, but your model has UV coordinates that are thousands of times that distance away from the main UV square:

UrYXEDq.jpg

 

On the left half is the UV map, and in the bottom right corner is the entire UV map except for the inside of the scope.

Most programs don't care about it (they just wrap back both the x and y's to 0..1) but ARMA tries to compress the UV by rounding away decimal points; your entire UV map (except for the inner tube) was being rounded down to 0. ;)

 

ianbanks Unsung team says a MASSIVE THANK YOU!

:)

  • Like 1

Share this post


Link to post
Share on other sites

yeah well it wasn't me lol. it was these amazing mofos

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×