Help with UV data anyone ?

Programming related discussions related to game research
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Help with UV data anyone ?

Post by DJ Normality »

So I been pulling models from Twisted Metal 2012 and so far I’ve been able to get all the mesh. But the only problem is I don’t know what I’m doing with the UVs. So far I got this.
Image

If I set the uv data to this on Model Researcher I get something. I can only see stuff if I pad to 2. Which seems to be right. Every other number gives me crazy information. But when I save the obj and open it in cinema I get this

Image

Now it’s close but it should be split open. Or unwrapped I should say. This just seems like some sort of frontal projection.
So I tried moving the bytes over.
Image

And then saved as an obj again and got this.
Image


Which looks like another flat projection. Am I doing something wrong or does anyone know what’s going on. The UV polygons look like this when I draw them.

Image

Image


Here is what the map should look like. I made this myself with a UV layout program.
Image

I have so many pieces doing this to each one for each model would take years. And I’ve already spend 8 months on this project. So if anyone could help it would be greatly appreciated. Thank you.
Anexenaumoon
Posts: 119
Joined: Sun Dec 27, 2015 10:22 pm

Re: Help with UV data anyone ?

Post by Anexenaumoon »

Are there potentially UV indices in the file? That could potentially be why your uv maps look this way. Either that, or your coordinates are wrong. Try switching x and y, because the uv maps don't look exactly right either. (Maybe it has multiple layers). Can you upload this sample file and dictate for us where vertices and faces are stored as well as the provided UV table?
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Help with UV data anyone ?

Post by DJ Normality »

I'm not sure, it just goes Face, Vertex, Face, Vertex. But I read that UV's can be within the Vertex data. An I'm just getting weird angles of the geometry.
Here's everything I know.

Image
Face Offset
Image
End Face Data + Count
Image
Vertex Offset
Image
End Vertex Data + Count
Image
Render
Image
Assumed UV data ?
Image
UV X and Y ?
Image
Render
Image
Change padding to 2
Image
Some kind of mapping ?
Image
If I shift over to the next set of bytes.
Image
Different kind of mapping ?

Heres is all the files including my offsets. There has to be some kind of mapping in this. If not im going to be very disappointed because that means i will have to manually UV map every vehicle.

Download
https://drive.google.com/file/d/1RF16xG ... sp=sharing

Image
This is around 20+ hours.

I could really use help with this. I know I'm going to have to go back and redo the extraction once I find the UV's and that's fine. I just need to know the method of extracting them. I've been working on this project for about a year now and could use a little help. Not the type to ask but I really don't know what I'm looking at when it comes to the UV's. Thank you for your response and I hope that there is a way.
Lazov
Posts: 20
Joined: Thu Apr 06, 2017 9:47 am

Re: Help with UV data anyone ?

Post by Lazov »

The texture coordinates of the short type are shared by the program, in my opinion, by 256. Also converted later, if they are less than 1. I will try to look at the format in my free time.
DJ Normality
Posts: 647
Joined: Tue Jul 24, 2018 8:52 am

Re: Help with UV data anyone ?

Post by DJ Normality »

Thanks Lazov. There’s 2 files actually. There’s the .ngp and the .vram. The .ngp is how I’m pulling the models. And the .vram is how I got the textures. But I’m wondering if the UV data is in the .vram. I do see some kind of uv data down below where I start finding errors in the .ngp files. Not sure if the first UV would be that far away from the original offset of the geometry but I guess anything is possible. If not then it has to be some kind of rendering process. I was going through the files and seen these .rtt textures. Did some research and they are render to texture files. Using some kind of vray as a diffuse I was reading. Makes sense because the original texture is just white with no decals or spots. And all the different color skins are rendered separately. If it’s not possible to find within the .ngp files then I’ll just have to go in and do them myself. The time it would take to research that could be spent just doing it myself. Here is the current sweerbot render.
Image
It don’t take long but I guess with a little photoshop it is possible to get the same effect. Just this process overall now has taken over 150 hours. And I still have about so much more to do. Found the weapons and stuff tonight in the ui.ngp. Some trees rocks and other stuff like streets and power lines. I am running into a bunch of errors with data that looks like vertex data but I really don’t know it seems to be something else when I hit render. Just a bunch of squares and triangles. I’ll post a picture, either way I hope that the data is within the .ngp’s. Thanks again for your response.