Important information: this site is currently scheduled to go offline indefinitely by end of the year.

.tmd2 UV issues . need help!

Post questions about game models here, or help out others!
Post Reply
kurokozeref
beginner
Posts: 21
Joined: Tue Mar 13, 2018 6:56 pm
Has thanked: 5 times
Been thanked: 1 time

.tmd2 UV issues . need help!

Post by kurokozeref »

Script used : viewtopic.php?p=166307#p166307
Sample Files : https://drive.google.com/file/d/19kdwSI ... Fr_oq/view
(included the model that have no issues for investigation pl01cos04)


I managed to open it but some of the model will export with super tiny UV (can't be scale, and some UV r just mess up).
The only reason I find out some r fked some r not it's becuz they're from previous game.
but using gintama rumble script the uv still fked
Image
I tried to change rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vertStride, vertStride - 16)
vertstride - 16 to others number it just crash or still messed
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: .tmd2 UV issues . need help!

Post by shakotay2 »

From what I can see the script sets the UV1BufferOfs to 48 for all submeshes for the sample I checked, but for the first submesh it's 40.
So replacing -8 by -16 (for the troublesome models only!) should do the trick.
.
First submesh only:
pl17Cos00_00_0_1-tmd2.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
kurokozeref
beginner
Posts: 21
Joined: Tue Mar 13, 2018 6:56 pm
Has thanked: 5 times
Been thanked: 1 time

Re: .tmd2 UV issues . need help!

Post by kurokozeref »

shakotay2 wrote: Sat Aug 05, 2023 12:33 pm From what I can see the script sets the UV1BufferOfs to 48 for all submeshes for the sample I checked, but for the first submesh it's 40.
So replacing -8 by -16 (for the troublesome models only!) should do the trick.
.
First submesh only:
pl17Cos00_00_0_1-tmd2.jpg
I changed the bottom script from
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vertStride, vertStride - 16)
else:
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vertStride, vertStride - 8 )
to
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vertStride, vertStride - 16)
else:
rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vertStride, vertStride - 16)

and for "From what I can see the script sets the UV1BufferOfs to 48 for all submeshes for the sample I checked, but for the first submesh it's 40."
I didn't found any 48 number except self.inFile.seek(0x48, NOESEEK_ABS)

This is the screenshot after i changed the vertstride from 8 to 16. the uv r visible now but still buggy. (Picture model is Pl17Cos00_00_0.cat, mesh 1 in noesis . should be 2nd mesh since noesis start counting from 0)
https://media.discordapp.net/attachment ... /image.png



but yes! Thank you so much! It does fix alot of the face mesh
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: .tmd2 UV issues . need help!

Post by shakotay2 »

kurokozeref wrote: Sun Aug 06, 2023 5:39 am I didn't found any 48 number except self.inFile.seek(0x48, NOESEEK_ABS)
That line is not related. It's a matter of formulas. You'll need to be a coder to get this.
The difference between 16 and 8 is 8. Since the original script outputs 48 where it should be 40 the workaround was to subtract 16 instead of 8.

This is an ugly patch only. Should be replaced by correct code. Some day.

I'd suggest to do it mesh-by-mesh - maybe using Hex2obj. Or AMR or ModelResearcher.

Once you got a whole model (of those with uv's error) that way you can think about patching the script.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
nudgenudgenudge
ultra-n00b
Posts: 7
Joined: Wed Apr 06, 2016 4:31 am
Been thanked: 2 times

Re: .tmd2 UV issues . need help!

Post by nudgenudgenudge »

I have never used Noesis so I tried importing its tmd2 file into blender.
After modifying the tmd2 importer script for Neptunia x Senran Kagura, it is now possible to import correctly including UV maps.
I'm not sure if this script is correct in determining data format, but I hope this helps you.

Image
You do not have the required permissions to view the files attached to this post.
nudgenudgenudge
ultra-n00b
Posts: 7
Joined: Wed Apr 06, 2016 4:31 am
Been thanked: 2 times

Re: .tmd2 UV issues . need help!

Post by nudgenudgenudge »

I made a noesis script for this tmd2 model.
The uv map is also read correctly in all the sample files.

This addon script may not read files with up to 8 weights per vertex correctly.
You do not have the required permissions to view the files attached to this post.
Post Reply