Join also our Discord channel! Click here.

Video tutorials on model formats reversing

Read or post any tutorial related to file format analysis for modding purposes.

Do you think I should make more tutorials?

yes
82
100%
no (its not understandable)
0
No votes
no (its uncomfortable to view)
0
No votes
no (for other reasons)
0
No votes
 
Total votes: 82

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2094
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 52 times
Been thanked: 1637 times

Re: Video tutorials on model formats reversing

Post by daemon1 » Sun Mar 12, 2017 3:00 pm

TLoU part 2. Includes TLoU vs Uncharted 2 part, EDGE decompression and weights. After all, EDGE proved to be different in different games, though, nothing impossible.

https://youtu.be/VBqYEaqCzxY

Image

JohnHudeski
mega-veteran
mega-veteran
Posts: 176
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 57 times

Re: Video tutorials on model formats reversing

Post by JohnHudeski » Tue Jun 05, 2018 9:42 am

It ended?

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2094
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 52 times
Been thanked: 1637 times

Re: Video tutorials on model formats reversing

Post by daemon1 » Tue Jun 05, 2018 9:47 am

what exactly is ended?

mono24
ultra-veteran
ultra-veteran
Posts: 490
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 197 times
Been thanked: 93 times

Re: Video tutorials on model formats reversing

Post by mono24 » Wed Jun 06, 2018 4:30 am

I think he's trying to find out if you ended the tutorials, or there will be more in the future in various ways/games and such.

User avatar
zaykho
mega-veteran
mega-veteran
Posts: 213
Joined: Fri Dec 03, 2010 1:20 pm
Location: France
Has thanked: 151 times
Been thanked: 33 times

Re: Video tutorials on model formats reversing

Post by zaykho » Sun Jul 29, 2018 10:57 pm

Hum interesting, I can already read and make tools to export mesh, the only thing I'm unable to do is : read/export Bones/Skeleton animation and sometimes textures/palettes, so I think it's time for me to watch those tutorials. ; )

Thank you again daemon1 for your contributions.

JohnHudeski
mega-veteran
mega-veteran
Posts: 176
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 57 times

Re: Video tutorials on model formats reversing

Post by JohnHudeski » Tue May 14, 2019 11:07 am

Is it possible to do a tutorial on how to find encryption keys
or how to find out how exe read un-common structures

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2094
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 52 times
Been thanked: 1637 times

Re: Video tutorials on model formats reversing

Post by daemon1 » Fri May 17, 2019 4:14 pm

JohnHudeski wrote:
Tue May 14, 2019 11:07 am
Is it possible to do a tutorial on how to find encryption keys
or how to find out how exe read un-common structures
find encryption keys - not very good idea. Such things are better kept private.
As for "how exe read" - this is rather generic, so no need to do special video about game formats, there are many existing tutorials in reverse engeneering area to cover this.

JohnHudeski
mega-veteran
mega-veteran
Posts: 176
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 57 times

Re: Video tutorials on model formats reversing

Post by JohnHudeski » Sat May 18, 2019 5:27 pm

But if the archive file containing the model asset or the ai lua is in an encrypted file.
For example, there was a game that encrypted all the game settings xml in blowfish
It really sucked cos the game had broken AI

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2094
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 52 times
Been thanked: 1637 times

Re: Video tutorials on model formats reversing

Post by daemon1 » Thu Jan 30, 2020 5:51 pm

People asked me to make a video of real reversing process, from start to finish, thinking, making mistakes and so on.
I take an example from Twisted Metal (2012) game on PS3.

https://youtu.be/YXVuRl1QPrg
https://youtu.be/b9-kkkL8Q2s

JakeMiles
ultra-n00b
Posts: 4
Joined: Wed Aug 12, 2015 11:59 pm
Has thanked: 2 times

Re: Video tutorials on model formats reversing

Post by JakeMiles » Thu Feb 13, 2020 10:30 pm

Thanks for you! For sharing tutorials and tips :)

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2094
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 52 times
Been thanked: 1637 times

Re: Video tutorials on model formats reversing

Post by daemon1 » Tue Feb 18, 2020 5:04 pm

2 more tutorials using same twised metal game as an example, so you can better understand how the above work was done:

Basic things about 3d data reversing: how 3D data looks like in hex: compression, encryption, common data types (ints/floats), main data structures (geometry/bones/textures)
https://www.youtube.com/watch?v=i_uWw-UDpEo

Finding geometry buffers and their properties
https://www.youtube.com/watch?v=swdOXDVkGUU

EPYCSPYDER
beginner
Posts: 22
Joined: Thu Feb 06, 2020 12:48 pm
Has thanked: 6 times
Been thanked: 3 times

Re: Video tutorials on model formats reversing

Post by EPYCSPYDER » Tue Mar 31, 2020 3:01 am

Thanks for making the tutorials, I followed Twisted Metal PS3 reversing and wrote your code got the car .obj from ui.ngp
How can I make it work with little endian.

HJA_test

Code: Select all

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Globalization;

namespace HJA_test
{
    class BinaryReaderBE : BinaryReader
    {
        private byte[] a16 = new byte[2];
        private byte[] a32 = new byte[4];
        private byte[] a64 = new byte[8];
        public BinaryReaderBE(System.IO.Stream stream) : base(stream) { }
        public override float ReadSingle()
        {
            a32 = base.ReadBytes(4);
            Array.Reverse(a32);
            return BitConverter.ToSingle(a32, 0);
        }
        public override UInt16 ReadUInt16()
        {
            a16 = base.ReadBytes(2);
            Array.Reverse(a16);
            return BitConverter.ToUInt16(a16, 0);
        }
        public override Int16 ReadInt16()
        {
            a16 = base.ReadBytes(2);
            Array.Reverse(a16);
            return BitConverter.ToInt16(a16, 0);
        }
        public override Int32 ReadInt32()
        {
            a32 = base.ReadBytes(4);
            Array.Reverse(a32);
            return BitConverter.ToInt16(a32, 0);
        }
        public override UInt32 ReadUInt32()
        {
            a32 = base.ReadBytes(4);
            Array.Reverse(a32);
            return BitConverter.ToUInt32(a32, 0);
        }
        public override long ReadInt64()
        {
            a64 = base.ReadBytes(8);
            Array.Reverse(a64);
            return BitConverter.ToInt64(a64, 0);
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            NumberFormatInfo nfi = new NumberFormatInfo();
            nfi.NumberDecimalSeparator = ".";

            float x = 0;

            var sw = new StreamWriter(Path.GetFileNameWithoutExtension(args[0]) + ".obj");
            sw.Write(x.ToString("0.######", nfi));
        }
    }
}

TM2012

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;

namespace TM2012
{
    class BinaryReaderBE : BinaryReader
    {
        private byte[] a16 = new byte[2];
        private byte[] a32 = new byte[4];
        private byte[] a64 = new byte[8];
        public BinaryReaderBE(System.IO.Stream stream) : base(stream) { }
        public override float ReadSingle()
        {
            a32 = base.ReadBytes(4);
            Array.Reverse(a32);
            return BitConverter.ToSingle(a32, 0);
        }
        public override UInt16 ReadUInt16()
        {
            a16 = base.ReadBytes(2);
            Array.Reverse(a16);
            return BitConverter.ToUInt16(a16, 0);
        }
        public override Int16 ReadInt16()
        {
            a16 = base.ReadBytes(2);
            Array.Reverse(a16);
            return BitConverter.ToInt16(a16, 0);
        }
        public override Int32 ReadInt32()
        {
            a32 = base.ReadBytes(4);
            Array.Reverse(a32);
            return BitConverter.ToInt16(a32, 0);
        }
        public override UInt32 ReadUInt32()
        {
            a32 = base.ReadBytes(4);
            Array.Reverse(a32);
            return BitConverter.ToUInt32(a32, 0);
        }
        public override long ReadInt64()
        {
            a64 = base.ReadBytes(8);
            Array.Reverse(a64);
            return BitConverter.ToInt64(a64, 0);
        }
    }
    class tm2012
    {
        static void Main(string[] args)
        {
            NumberFormatInfo nfi = new NumberFormatInfo();
            nfi.NumberDecimalSeparator = ".";

            int i;
            float x, y, z;

            var fs = new FileStream("C:\\ui.ngp", FileMode.Open, FileAccess.Read);
            var br = new BinaryReaderBE(fs);
            var sw = new StreamWriter("ui.obj");

            fs.Seek(0x29ef30, SeekOrigin.Begin);
            int nv = 0x12f8;
            for (i = 0; i < nv; i++)
            {
                x = br.ReadInt16() / 4096f;
                y = br.ReadInt16() / 4096f;
                z = br.ReadInt16() / 4096f;
                sw.Write("v " + x.ToString("0.######", nfi));
                sw.Write("  " + y.ToString("0.######", nfi));
                sw.Write("  " + z.ToString("0.######", nfi));
                sw.WriteLine();
            }

            fs.Seek(0x298500, SeekOrigin.Begin);
            int nf = 0x3513 / 3;
            int f1, f2, f3;
            for (i = 0; i < nf; i++)
            {
                f1 = br.ReadUInt16() + 1; f2 = br.ReadUInt16() + 1; f3 = br.ReadUInt16() + 1;
                sw.WriteLine("f " + f1 + " " + f2 + " " + f3);
            }

            sw.Close();
        }
    }
}

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2094
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 52 times
Been thanked: 1637 times

Re: Video tutorials on model formats reversing

Post by daemon1 » Tue Mar 31, 2020 6:25 am

Change this:

Code: Select all

var br = new BinaryReaderBE(fs);
to this:

Code: Select all

var br = new BinaryReader(fs);
It will use the "usual" BinaryReader, which is little endian.

EPYCSPYDER
beginner
Posts: 22
Joined: Thu Feb 06, 2020 12:48 pm
Has thanked: 6 times
Been thanked: 3 times

Re: Video tutorials on model formats reversing

Post by EPYCSPYDER » Tue Mar 31, 2020 7:05 pm

Any chance you would do a code tutorial on the smd mesh/skeleton blender tools you used with The Last of Us?

Post Reply