Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Diablo immortal models

Featured Replies

  • Author
  • Localization

sanktanglia, posted Sat Jan 29, 2022 6:15 pm (69453)


I'm working on writing an importer for diablo immortal files, using a template https://github.com/CucFlavius/Zee-010-Templates. I can render out the mesh, but im currently stuck on the texture coordinates. The vertex buffer has the following structure
VECTOR4H tangentAsQuat;
VECTOR2H uv;
but the uv values arent in the 0-1 as id expect, instead normally being between .3 and .5 and -.3 and -.5 Im assuming this has something to do with the tangent but the math behind it is a bit above my knowledge level. Im attaching some copies of models. I will also pay whoever helps solves this!

https://www.dropbox.com/s/2up7266hjpsb2 ... .Mesh?dl=0
https://www.dropbox.com/s/siqi6dr1vuqqv ... .Mesh?dl=0
https://www.dropbox.com/s/4y7xoi5hgt22m ... .Mesh?dl=0
*links fixed by aluigi*
  • Author
  • Localization

coredevel, posted Sun Jan 30, 2022 5:48 pm (69490)


Your links are broken.
  • Author
  • Localization

aluigi, posted Sun Jan 30, 2022 5:49 pm (69491)


I found his original topic on xentax and copied the correct links from there
  • Author
  • Localization

coredevel, posted Sun Jan 30, 2022 9:23 pm (69502)


Thanks for the fix. :)

Do you have more samples to look at? This game has like 7 or more different vertex formats. Include textures too if possible, as they have to match up with the UVs.
  • Author
  • Localization

sanktanglia, posted Mon Jan 31, 2022 10:38 pm (69522)


https://www.dropbox.com/s/wxho440m56p17 ... s.zip?dl=0 is some textures as well. The format covers the majority of the vertex types, and as far as I can tell, the P3F_N4B_T2F format has uv that are not transformed, im working on visualizing that now to confirm, but any of the vertex buffers with the tangentAsQuat are included have uvs i cant use and i dont know enough about the math to be able to derive them. thanks for looking into it!
  • Author
  • Localization

sanktanglia, posted Mon Jan 31, 2022 10:39 pm (69523)


https://www.dropbox.com/s/5eqe5yulubtom ... c.zip?dl=0 is textures for the leoric model too
https://www.dropbox.com/s/nmboojth9vvbc ... erial?dl=0 ive also added an example material for leoric. One thing to note in the material file the textures are guids but i have translated them into the textures i provided in the zip
  • Author
  • Localization

coredevel, posted Tue Feb 01, 2022 12:47 am (69527)


Yeah, the mesh file doesn't seem to have any material data in it. The other thing missing is a skeleton, as the mesh has skin weights and bone indices.
If you have the boss_leoric skeleton, I wouldn't mind seeing it.

But, anyway, it appears H means half-float. This is a standard half-float stored as a WORD. There's nothing game-specific about it.
You can find code on Github to read half-floats or grab it here:

https://blog.fpmurphy.com/2008/12/half- ... at_14.html

Q4H_T2H has one UVset.
Q4H_T2H_T2H has two UVsets.

P3F_N4B_T2F Uvset are floats, but I don't see anything unusual about it. But, if the UVs seem to be offset or scaled, then I would suspect the missing information would be found the material file. This seems to contain some shader-specific data. There could be some special scaling or offset listed here at the shader level.
  • Author
  • Localization

sanktanglia, posted Tue Feb 01, 2022 1:13 am (69528)


im familiar with half floats and how they work, my point was that for the Q4H_T2H vertex buffers, you cant use the uv values as provided. My belief is that they are transformed in some way by the quat that comes with the uv coordinates, but i havent been able to figure that out. Ive been reading up on tangent space and assume it has something to do with that. I brought up P3F_N4B_T2F to note that the uvs in that buffer format do not need transforming and come through fine(see https://imgur.com/a/arlj85A). Im currently diving into how the shaders work/which shaders are used for which model but theres 5 gigs of different shaders when uncompressed, its not clear which ones are used. https://www.dropbox.com/s/ukrxm8p3oop9x ... leton?dl=0 is a link to the skeleton though im not planning on supporting animation, though the templates cover the majority of the animation files and data too
  • Author
  • Localization

sanktanglia, posted Tue Feb 01, 2022 5:35 am (69536)


well damn im definitely the idiot then cuz I just followed the formats description of
uint16 / 32767.0f
Im doing my reading in typescript so ill work on adapting the link you shared in that language, much appreciated
  • Author
  • Localization

matt1bord, posted Tue Feb 01, 2022 11:18 am (69539)


This is useful information
  • Author
  • Localization

sanktanglia, posted Tue Feb 01, 2022 5:26 pm (69546)


Can confirm I was able to render out the leoric model once I swapped out my half float parsing, thanks again!
  • Author
  • Localization

coredevel, posted Wed Feb 02, 2022 5:08 pm (69580)


I have one more request if you're still around.
  • Author
  • Localization

coredevel, posted Sun Feb 13, 2022 7:32 am (69849)


For anybody who's interested in Diablo Immortal data files, I found this tool:

Diablo Immortal Data Tool
https://github.com/CucFlavius/DIDT

It lets you download all the data files for the game. For me, it downloaded about 6GB of data, and the entire
process took about a hour or so. I had to compile DIDT with Visual Studio 2017. Older VS versions gave me errors.
Target framework was set to net5.0 (windows 10?), but I was able to compile it with net 4.8.

After download is complete, a lot of files are still unnamed, but DIDT has extra tools to rename the files.
There is also a third step. All the files have a ZZZ4 header, indicating they are LZ4 compressed. DIDT has
a tool to decompress all files.

Steps:
1. Download files.
2. Rename files.
3. Decompress files.

It dumps a lot of data, like 3d models, textures, sounds, movie clips, etc... I'm not sure if the entire process was complete, as there were quite a few unnamed files leftover from the process.
  • Author
  • Localization

zaramot, posted Thu Feb 17, 2022 11:14 am (69940)


Models are looking pretty straightforward. What have you used for textures? It's saying they are mip compressed, which I suppose not all what is wrong with them xD

Image
  • Author
  • Localization

sanktanglia, posted Thu Feb 17, 2022 6:32 pm (69948)


im currently using the template to write a custom tool that extracts out the texture data chunks and feeds them to pythons astc lib, works pretty good
  • Author
  • Localization

zaramot, posted Thu Feb 17, 2022 8:16 pm (69950)


Nice! Could you explain more detailed the process? It will be useful for a lot of people, including me!
  • Author
  • Localization

coredevel, posted Sat Feb 19, 2022 1:45 am (69992)


If you're familiar with .ktx files, they're just containers for compressed textures. You could write a script to output a valid .ktx header and dump the ASTC data into it. PVRTexTool can then be used to read it. PVRTexTool also reads raw .ASTC files, which might be easier to output.
  • Author
  • Localization

DJ Normality, posted Sat Feb 19, 2022 2:34 am (69994)


Image
If you install PVRtools and then go to folder. Backtrack to this folder here and go do CLI
Image
Use PVRTexToolCLI.exe with a .bat i think the command was this:
for /r %%i in (*.pvr) do PVRTexToolCLI.exe -i "%%i" -d
  • Author
  • Localization

zaramot, posted Sat Feb 19, 2022 9:24 am (70007)


Thanks everyone! I should examine and have more experience with this PVRTexTool! :) I managed to convert textures using it, maybe because I'm not dealing with mobile games a lot, this one was something new to me

Image
  • Author
  • Localization

sanktanglia, posted Sat Feb 19, 2022 6:36 pm (70016)


What rendering engine are you using? I see you've got bump mapping working and I've been struggling with that on my own
  • Author
  • Localization

coredevel, posted Sun Feb 20, 2022 4:43 am (70026)


I think he writes scripts in Max, so that is 3ds max render.

Things like vertex normals and tangents are pre-computed data. You don't actually need to use the model data if you know how to calculate them yourself.

Compute tangents from UVs:
https://marti.works/posts/post-calculat ... mesh/post/

If you want to test your normal mapping, then I would suggest downloading a normal map test pattern from Google, like a bumpy wall pattern, and render it on a simple flat plane.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.