Importing/Exporting .msh files and applying .dds texture ??

Post questions about game models here, or help out others!
IuriDrago
ultra-n00b
Posts: 9
Joined: Wed May 06, 2020 8:13 am
Has thanked: 4 times

Importing/Exporting .msh files and applying .dds texture ??

Post by IuriDrago »

Hello guys, i'm new on 3ds Max and i would like to know if anyone has any scripts to import .msh files and apply .dds texture. And if possible I would also like to know some way to save models as .msh and texture in .dds to use in the game in question (Lost Saga Online).

Note 1: I am using 3ds Max 2019, 3ds Max 2010, Blender 2.63 and Blender 2.82, that is, it can be a script for any of these programs, mainly 3ds max.
Note 2: I will be linking a file (on Google Drive) with 2 examples of .msh files and 2 .dds textures of the respective.
https://drive.google.com/open?id=1OD0Cn ... MQNDI4EYy8

Edit:
Link for more samples:
https://drive.google.com/file/d/1IqEjXN ... XE9pQ/view

Thanks, guys :]
Last edited by IuriDrago on Thu May 07, 2020 3:13 am, edited 1 time in total.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4134
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1124 times
Been thanked: 2154 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by shakotay2 »

mephisto_weapon.png
(by hex2obj, view 2nd link in my sig)
(My time for writing scripts is limited but the format looks simple. Should not be too hard to write one for yourself. :) )
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Thu May 07, 2020 5:49 am, edited 1 time in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Some things will never change. [roll]
"You quoted the whole thing, what a mess."
IuriDrago
ultra-n00b
Posts: 9
Joined: Wed May 06, 2020 8:13 am
Has thanked: 4 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by IuriDrago »

shakotay2 wrote: Wed May 06, 2020 1:11 pm mephisto_weapon.png(by hex2obj, view 2nd link in my sig)
(My time for writing scripts is limited but the format looks simple. Should not be too hard to write one for yourself. :) )
Well, as i said i'm new (can't make a script properly), but i will check your link. If you can give me a script i would thank you so much :]
jayn23
mega-veteran
mega-veteran
Posts: 250
Joined: Sun Jul 17, 2011 9:30 pm
Has thanked: 61 times
Been thanked: 232 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by jayn23 »

Well, as i said i'm new (can't make a script properly), but i will check your link. If you can give me a script i would thank you so much :]
you should check out the tutorial section its filled with great stuff by many users including shakotay2 ,Bigchillghost and chrox which i found very helpful.

Please upload at least 2-3 more samples, i have the format sorted out except for start of vertex buffer and i need more samples to find the pattern
IuriDrago
ultra-n00b
Posts: 9
Joined: Wed May 06, 2020 8:13 am
Has thanked: 4 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by IuriDrago »

jayn23 wrote: Wed May 06, 2020 10:29 pm
Well, as i said i'm new (can't make a script properly), but i will check your link. If you can give me a script i would thank you so much :]
you should check out the tutorial section its filled with great stuff by many users including shakotay2 ,Bigchillghost and chrox which i found very helpful.

Please upload at least 2-3 more samples, i have the format sorted out except for start of vertex buffer and i need more samples to find the pattern
OK, i will try checking.
I uploaded 4 more samples... pls check and tell me if you get any script working 8D

More samples link:
https://drive.google.com/open?id=1IqEjX ... PNkU0XE9pQ
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4134
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1124 times
Been thanked: 2154 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by shakotay2 »

H2O files for midnight_weapon:

0x10FFC 2808
Vb1
12 99
0x54 766
020000
0x6624 8

0x125EC 1224
Vb1
12 99
0x54 1086
020000
0x6624 8

formulaes (poorly checked):

UVaddr = vAddr + vCnt_arr[SMcnt]*24 ;
FIaddr, first submesh = UVaddr + vCnt_arr[SMcnt]*40 +8 + 16*SMcnt ;

SMcnt is the maximum submesh count. So for weapons with 2 submeshes use SMcnt=2 only.
(submeshes seem to share the same vertex addr and uv addr, afaics. )

For first H2O above:
(vAddr= 0x54)
UVaddr = 0x54 + 1086(!)*24 (dec.)= 0x6624 (for both submeshes)
FIaddr_SM1 = 0x6624 + 1086(!)*40 (dec.) + 8 + 32 (dec.)= 0x10FFC

FIaddr_SM2 = FIaddr_SM1 + 2808*2 (dec.) = 0x125EC
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Some things will never change. [roll]
"You quoted the whole thing, what a mess."
jayn23
mega-veteran
mega-veteran
Posts: 250
Joined: Sun Jul 17, 2011 9:30 pm
Has thanked: 61 times
Been thanked: 232 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by jayn23 »

SMcnt is the maximum submesh count. So for weapons with 2 submeshes use SMcnt=2 only.
(submeshes seem to share the same vertex addr and uv addr, afaics. )

For first H2O above:
(vAddr= 0x54)
UVaddr = 0x54 + 1086(!)*24 (dec.)= 0x6624 (for both submeshes)
FIaddr_SM1 = 0x6624 + 1086(!)*40 (dec.) + 8 + 32 (dec.)= 0x10FFC

FIaddr_SM2 = FIaddr_SM1 + 2808*2 (dec.) = 0x125EC
I got a working script yesterday and noticed some meshes were getting extra faces on UV and consequently textures were shown incorrectly , but was to lazy to debug why (was 1 AM) i should have thought about sub-meshes, thanks for this it will definitely speed up my script fix up. :)

IuriDrago Please add some samples for character models, all samples you have provided are static mesh.
Karpati
ultra-veteran
ultra-veteran
Posts: 456
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 92 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by Karpati »

Here I attached the converted files in Wavefront .obj format.

All of your files except the mephisto_weapon.msh have 2 objects, but I think the second object does not use the main texture.
You do not have the required permissions to view the files attached to this post.
jayn23
mega-veteran
mega-veteran
Posts: 250
Joined: Sun Jul 17, 2011 9:30 pm
Has thanked: 61 times
Been thanked: 232 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by jayn23 »

i found a bit of time today to rework the script, one issue i still need to fix uv of second mesh, everything else is working
script has auto texture loading as well, still waiting for skinned charecters....

Image

fmt_LostSagaOnline.rar
You do not have the required permissions to view the files attached to this post.
Karpati
ultra-veteran
ultra-veteran
Posts: 456
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 92 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by Karpati »

I think the second object's UVs are fine and the second object does not use the main texture.
changeon_Unwrap_UV_and_texture.png
You do not have the required permissions to view the files attached to this post.
Karpati
ultra-veteran
ultra-veteran
Posts: 456
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 92 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by Karpati »

IuriDrago,

Can you tell me how can I unpack the Lost Saga's map.iop file?
IuriDrago
ultra-n00b
Posts: 9
Joined: Wed May 06, 2020 8:13 am
Has thanked: 4 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by IuriDrago »

jayn23 wrote: Thu May 07, 2020 11:31 pm i found a bit of time today to rework the script, one issue i still need to fix uv of second mesh, everything else is working
script has auto texture loading as well, still waiting for skinned charecters....
Hey Jayn, i tried using your script but i got the following error, can you please tell me what to do?
Image
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4134
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1124 times
Been thanked: 2154 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by shakotay2 »

fmt_LostSagaOnline.py is a script for Noesis, not for blender! Place it into Noesis' subfolder plugins\python.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Some things will never change. [roll]
"You quoted the whole thing, what a mess."
IuriDrago
ultra-n00b
Posts: 9
Joined: Wed May 06, 2020 8:13 am
Has thanked: 4 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by IuriDrago »

shakotay2 wrote: Sun May 17, 2020 12:03 pm fmt_LostSagaOnline.py is a script for Noesis, not for blender! Place it into Noesis' subfolder plugins\python.
Oh, thanks man! By the way, is there any way to model on noesis, or export in any format that i will be able to re-model those meshs on Blender or 3ds Max (mainly Blender)??
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4134
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1124 times
Been thanked: 2154 times

Re: Importing/Exporting .msh files and applying .dds texture ??

Post by shakotay2 »

IuriDrago wrote: Sun May 17, 2020 9:00 pm, or export in any format that i will be able to re-model those meshs on Blender or 3ds Max (mainly Blender)??
From Noesis you can export (File/Export) to .obj or .dae for example.

(You may need to check the uvs of mesh1, mesh0 uvs look good.)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Some things will never change. [roll]
"You quoted the whole thing, what a mess."
Post Reply