tigrouind / AITD-roomviewer

A room / level viewer for Alone in The Dark series
MIT License
24 stars 4 forks source link

is there a way to rip textures with this tool? #11

Closed Philhubk98 closed 1 year ago

Philhubk98 commented 1 year ago

Hi again! you might remember me from our last talk about the 3d models. it works for me but I noticed it only rips the models and not the textures so I was wondering if there might be a solution to rip not only the sprites from those games but also the textures? would be really nice to save those!

tigrouind commented 1 year ago

There is no textures in the game. What you see on models is some kind of shading done by the software renderer at the very last step (when filling the pixels).

Here is the different materials used by the game :

You can fake those in Blender with shaders. See this message for more info. Gradients can be simulated by mixing two colors, depending Window coordinates (from "Texture Coordinate" node).

AITD model viewer also generate fake UV coordinates for it's own purposes (that do not exists in the game). Those are exported and can be used in Blender.

Philhubk98 commented 1 year ago

the backgrounds are still covered by sprites right? would be nice to find a way to get those thanks for clarifying about the textures! I could screenshot the models up close with the viewer to copy the colors and make up my own set of palettes with exactly the ones used from the game so I don't have to make the colors myself using Blender. It might be easier to apply the textures using material as I don't need to make any adjustments for the texture to appear how I want it if its only solid colors and no other complex details. Plus screenshots would make a excellent guide to help myself remember which part of the model used that color and where to apply it.

Im not a expert with Blender but I am familiar with some of the basic features as I used to play around with Blender since 2017 lmao. 

On Friday, September 15, 2023 at 06:18:46 PM GMT+8, tigrouind ***@***.***> wrote:  

There is no textures in the game. What you see on models is some kind of shading done by the software renderer at the very last step (when filling the pixels). Rendering textures is very expensive, too slow for computers of that era.

Here is the different materials used by the game :

You can fake those in Blender with shaders. See this message for more info. Gradients can be simulated by mixing two colors, depending Window coordinates (from "Texture Coordinate" node).

AITD model viewer also generate fake UV coordinates for it's own purposes (that do not exists in the game). Those are exported and can be used in Blender.

Time Gate has textures and those are exported by model viewer.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

tigrouind commented 1 year ago

EDIT : to extract backgrounds, you can use jmimu tool as suggested in his message below. If you need to export some other data, please check this post.

Sprites : there is no such things for backgrounds. Each background contains a set of 2D polygons, used to "cutout" some pieces : background + 2D polygons = what will be drawn on top of actors to cover them

jmimu commented 1 year ago

Hi, If it is of any help, my pak editor (https://github.com/jmimu/AITD_PakEdit) extracts the background images with the correct palette.

tigrouind commented 7 months ago

Quick update: it seems PakEdit can only extract AITD1 background to BMP (or at least I haven't been able to make it work with AITD2 and AITD3).

Due to popular demand, I have created a new tool that extracts all backgrounds automatically (with correct palette) : https://github.com/tigrouind/AITD-tools?tab=readme-ov-file#pakextract

It should work with all game versions, including Time Gate.