Page 2 of 2

Re: Video tutorials on model formats reversing

Posted: Sun Mar 12, 2017 3:00 pm
by daemon1
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

Re: Video tutorials on model formats reversing

Posted: Tue Jun 05, 2018 9:42 am
by JohnHudeski
It ended?

Re: Video tutorials on model formats reversing

Posted: Tue Jun 05, 2018 9:47 am
by daemon1
what exactly is ended?

Re: Video tutorials on model formats reversing

Posted: Wed Jun 06, 2018 4:30 am
by mono24
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.

Re: Video tutorials on model formats reversing

Posted: Sun Jul 29, 2018 10:57 pm
by zaykho
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.

Re: Video tutorials on model formats reversing

Posted: Tue May 14, 2019 11:07 am
by JohnHudeski
Is it possible to do a tutorial on how to find encryption keys
or how to find out how exe read un-common structures

Re: Video tutorials on model formats reversing

Posted: Fri May 17, 2019 4:14 pm
by daemon1
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.

Re: Video tutorials on model formats reversing

Posted: Sat May 18, 2019 5:27 pm
by JohnHudeski
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

Re: Video tutorials on model formats reversing

Posted: Thu Jan 30, 2020 5:51 pm
by daemon1
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

Re: Video tutorials on model formats reversing

Posted: Thu Feb 13, 2020 10:30 pm
by JakeMiles
Thanks for you! For sharing tutorials and tips :)

Re: Video tutorials on model formats reversing

Posted: Tue Feb 18, 2020 5:04 pm
by daemon1
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

Re: Video tutorials on model formats reversing

Posted: Tue Mar 31, 2020 3:01 am
by EPYCSPYDER
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();
        }
    }
}

Re: Video tutorials on model formats reversing

Posted: Tue Mar 31, 2020 6:25 am
by daemon1
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.

Re: Video tutorials on model formats reversing

Posted: Tue Mar 31, 2020 7:05 pm
by EPYCSPYDER
Any chance you would do a code tutorial on the smd mesh/skeleton blender tools you used with The Last of Us?