Jump to content

Screamer 4x4


Recommended Posts

Spoiler

759.jpg.7225dc1a818786720aa0c5dfc0e2784b.jpg


Spoiler

Screamer 4x4 (Pathfinder)

Archive 
*.cod -data container 

Mesh data (cars, drivers, prizes)
*.dat -mesh format (verticles.dat, faces.dat, norms.dat, fnorms.dat, mapcoord.dat, textures.dat)

Maps data 
*.tre -terrain objects ???
*.height -max terrain height data ???
*.min -min terrain height data ???
*.rgb -terrain color data ???
*.spl -???
*.dat -???

Textures
*.tga -standart TGA images format 
*.tex -texture format with Mip Maps data 
*.32  -UI textures format
*.32a -UI textures format with alpha

Sounds 
*.snd -sound 

Config
*.cfg -standart ASCII format 


Hey guys, there's this great game called Screamer 4x4, and I'm looking for a way to read models from it. Here's an example of a car model; strangely, the vertices, normals, and other data are separated into different files: Screamer4x4car.zip 

 

How is it possible to read this model formats?

 

UPD:

QuickBMS *.cod Unpack Script:  Screamer4x4.zip by h3x3r

plugin for Noesis *.cod  Unpack: fmt_cod.py by Durik256

plugin for Noesis *.dat  Mesh: fmt_4x4.py  by Durik256

plugin for Noesis *.height  Map Data: mt_height.py by Durik256

plugin for Noesis *.tex; *.32; *.32a; *.map  Texture Data: tex_tex_32a.py by Durik256

Edited by black_racer
Link to comment
Share on other sites

Hey, I have no idea what these repetitive blocks should mean.

It's 5 and 6 vertices more or less in line, then the next 11 ones:

# 0x2: verts= 1858
v 50.175781 -62.371094 -120.257813
v -12.082031 -62.500000 -120.257813
v 107.316406 -62.746094 -120.257813
v -17.449219 -63.000000 -120.257813
v -28.015625 -63.500000 -120.257813
v -12.988281 59.160156 -120.257813
v 14.417969 64.503906 -120.257813
v 3.808594 65.003906 -120.257813
v -127.796875 65.253906 -120.257813
v -1.433594 65.500000 -120.257813
v 60.824219 65.628906 -120.257813

edit: seems I had the wrong format (shorts instead of floats). Above vertices are simply WRONG.

In fact they are like so:

# 0x2: verts= 1858
v -20.149500 -4.579070 -16.799000
v -16.119101 -4.579070 -16.799000
v -12.088700 -4.579070 -16.799000
v -8.058240 -4.579070 -16.799000
v -4.027830 -4.579070 -16.799000
v 0.002593 -4.579070 -16.799000
v 4.033010 -4.579070 -16.799000
v 8.063430 -4.579070 -16.799000
v 12.093800 -4.579070 -16.799000
v 16.124300 -4.579070 -16.799000
v 20.154699 -4.579070 -16.799000
...

car.png

Edited by shak-otay
Link to comment
Share on other sites

5 hours ago, black_racer said:
  Reveal hidden contents

759.jpg.7225dc1a818786720aa0c5dfc0e2784b.jpg


Hey guys, there's this great game called Screamer 4x4, and I'm looking for a way to read models from it. Here's an example of a car model; strangely, the vertices, normals, and other data are separated into different files: Screamer4x4car.zip 

 

How is it possible to read this model formats?

Can you tell me how did you extract the files from the Game.cod file?

Link to comment
Share on other sites

10 hours ago, black_racer said:

How is it possible to read this model formats?

it's simple. first UShort as num. and then the data

i made plugin for Noesis fmt_4x4.py (only face and vert)

*(the names should be verticle.dat and faces.dat, just click on any *.dat in the folder)

**(normals and uvs for each triangle. but according to the checker it does not look correct. no time for this))

1.png.76c65220bbabdb2a3dac0b6a62692e9f.png

2.png.ecf2d09f12fe766dfeae1aa2e755dc66.png

Edited by Durik256
Link to comment
Share on other sites

14 hours ago, Karpati said:

Can you tell me how did you extract the files from the Game.cod file?

Hello, I used this tool: http://www.watto.org/game_extractor.html

 I think it makes sense now to write a script for QuickBMS. 

Screamer 4x4 *.cod

21 - Header (->Unique Pc HUNGARY<-)
3 - null
4 - Directory Length

// for each file
  128 - Filename (null terminated, then filled with "." for the remaining bytes)
  4 - Offset
  4 - Length

 

Link to comment
Share on other sites

Posted (edited)
11 hours ago, Durik256 said:

it's simple. first UShort as num. and then the data

i made plugin for Noesis fmt_4x4.py (only face and vert)

*(the names should be verticle.dat and faces.dat, just click on any *.dat in the folder)

**(normals and uvs for each triangle. but according to the checker it does not look correct. no time for this))

1.png.76c65220bbabdb2a3dac0b6a62692e9f.png

2.png.ecf2d09f12fe766dfeae1aa2e755dc66.png

This is amazing! Thank you very much for your help.

 

I still need to figure out the tracks data. I think they use heightmaps there.

 

Textures Data: 

*.tex  - with Mip Map data

tex.png.97ae2eba1f00676cf0421a7db147cf71.png

*.32a 

32a.png.4d4bceb7cf2dfd7801cd8f9a40a6a449.png

*.32 

32.png.939328de75618c101a5e15e228bc4530.png

Edited by black_racer
Link to comment
Share on other sites

#####################################
#	Scramer 4x4 - *.cod unpacker	#
#####################################
get BaseFileName basename

getdstring Sign 0x18
get TableSize uint32
xmath Files "TableSize/136"

for i = 0 < Files
	savepos StrBaseOffset
	get FileName string
	goto StrBaseOffset
	getdstring Dummy 0x80
	get Offset uint32
	get Size uint32
	string Name p= "%s/%s" BaseFileName FileName
	log Name Offset Size
next i

Also it seems like game runs unpacked. No need to repack *.cod.

Edited by h3x3r
Link to comment
Share on other sites

2 hours ago, h3x3r said:
#####################################
#	Scramer 4x4 - *.cod unpacker	#
#####################################
get BaseFileName basename

getdstring Sign 0x18
get TableSize uint32
xmath Files "TableSize/136"

for i = 0 < Files
	savepos StrBaseOffset
	get FileName string
	goto StrBaseOffset
	getdstring Dummy 0x80
	get Offset uint32
	get Size uint32
	string Name p= "%s/%s" BaseFileName FileName
	log Name Offset Size
next i

Also it seems like game runs unpacked. No need to repack *.cod.

Thanks, yes game running with unpacked data

Link to comment
Share on other sites

Posted (edited)
30 minutes ago, Durik256 said:

plugin for Noesis, for unpack *.cod fmt_cod.py


Thank you very much. Could you please tell me if it's possible to make Noesis read a heightmap and apply a texture to it? The location format looks like this, it contains a heightmap, collision data, and mesh objects in a different format than the previously researched .dat format. 

 

*.height - height map data 

height.png.447b227df18b9a4bd57c786f56f3091d.png

*.min - ???

min.png.66fdd189d950693e3e9b403ab614270e.png

*.rgb - texture map data?

rgb.png.f6b0b2a987dc462ccafe9e521b72017e.png

*.tre - Map mesh Format ? 

*.spl - ??? 

*.dat - Map object positions? ?

 

Cuesta_Juno.zip

Edited by black_racer
Link to comment
Share on other sites

2 hours ago, black_racer said:


Thank you very much. ...*.height - height map data 

I didn't look at the other files. but from *.height (height map) you can make a plane by taking (width, length and height). fmt_height.py

2.png.e204908be9fb8ca31daa8f9232d941e7.png

You can also find out a little about what these files are by looking at the .cfg, for example CatasTrophy.cfg:


Dirname        = Single/Cuesta_Juno                ;Directory of the terrain

DrawTree       = draw.tre                   ;Terrain objects draw data
PhyTree        = phycoll.tre                ;Terrain objects phy. data

DrawTrophy     = catastrophyD.tre                   ;Terrain Trophy objects draw data
PhyTrophy      = catastrophyP.tre                ;Terrain Trophy objects phy. data

spline = catastrophy.spl

Config.cfg:

...
Xsize          = 256                        ;X meret (egysegben)
Ysize          = 256                        ;Z meret (egysegben)
Multiply1      = 72.0                       ;Szorzo (x & z)
Multiply2      = 5.25                       ;Szorzo2 (y)
...

 

Edited by Durik256
Link to comment
Share on other sites

1 hour ago, Durik256 said:

I didn't look at the other files. but from *.height (height map) you can make a plane by taking (width, length and height). fmt_height.py

2.png.e204908be9fb8ca31daa8f9232d941e7.png

You can also find out a little about what these files are by looking at the .cfg, for example CatasTrophy.cfg:


Dirname        = Single/Cuesta_Juno                ;Directory of the terrain

DrawTree       = draw.tre                   ;Terrain objects draw data
PhyTree        = phycoll.tre                ;Terrain objects phy. data

DrawTrophy     = catastrophyD.tre                   ;Terrain Trophy objects draw data
PhyTrophy      = catastrophyP.tre                ;Terrain Trophy objects phy. data

spline = catastrophy.spl

Config.cfg:

...
Xsize          = 256                        ;X meret (egysegben)
Ysize          = 256                        ;Z meret (egysegben)
Multiply1      = 72.0                       ;Szorzo (x & z)
Multiply2      = 5.25                       ;Szorzo2 (y)
...

 

Wow, this looks amazing! Did you just apply the texture *.rgb? I'm not quite sure how texture maps are applied to surfaces, but there are four textures for each map (txt/1.tex, 2.tex, 3.tex, 4.tex). Do you think there was support for UV0 / UV1 / UV2 / UV3 back then? 

.tre seems to differ from the cars format?

 

Link to comment
Share on other sites

On 4/5/2024 at 6:32 PM, black_racer said:

Wow, this looks amazing! Did you just apply the texture *.rgb? I'm not quite sure how texture maps are applied to surfaces, but there are four textures for each map (txt/1.tex, 2.tex, 3.tex, 4.tex). Do you think there was support for UV0 / UV1 / UV2 / UV3 back then?

 

I think the textures are indicated (for each section) in the file "demo1.txt"

Spoiler
#by Durik256
from inc_noesis import *

def registerNoesisTypes():
    handle = noesis.register("Screamer 4x4", ".height")
    noesis.setHandlerTypeCheck(handle, CheckType)
    noesis.setHandlerLoadModel(handle, LoadModel)
    noesis.logPopup()
    return 1

def CheckType(data):
    return 1

def LoadModel(data, mdlList):
    ctx = rapi.rpgCreateContext()
    bs = NoeBitStream(data)
    
    w,h = 256, 256
    
    txt_path = rapi.getInputName().replace('.height', '.txt')
    data = rapi.loadIntoByteArray(txt_path)
    bs0 = NoeBitStream(data)
    
    tx = []
    for y in range(h):
        tx.append(bs0.read('%iB'%w))

    vbuf, uvbuf = b'', b''
    for y in range(h):
        for x in range(w):
            vbuf += NoeVec3([x,bs.readUByte()/16,y]).toBytes()
            uvbuf += NoeVec3([x,y,0]).toBytes()
           
    rapi.rpgBindPositionBuffer(vbuf, noesis.RPGEODATA_FLOAT, 12)
    rapi.rpgBindUV1Buffer(uvbuf, noesis.RPGEODATA_FLOAT, 12)
           
    ibuf = b''
    for y in range(h-1):
        for x in range(w-1):
            rapi.rpgSetMaterial('tex_%i'%(tx[y][x]+1))
            ibuf = noePack('4I', x+(y*w), (x+1)+(y*w), x+((y+1)*w), (x+1)+((y+1)*w))
            rapi.rpgCommitTriangles(ibuf, noesis.RPGEODATA_UINT, len(ibuf)//4, noesis.RPGEO_QUAD)

    rapi.rpgOptimize()
    rapi.rpgSetOption(noesis.RPGOPT_TRIWINDBACKWARD, 1)
    try:
        mdl = rapi.rpgConstructModel()
    except:
        mdl = NoeModel()
    
    mdl.setModelMaterials(NoeModelMaterials([], [NoeMaterial('default','')]))
    mdlList.append(mdl)
    return 1

 

 

Edited by Durik256
Link to comment
Share on other sites

I released the 3D Object Converter v10.603 (Windows) that supports the following file formats:

  - Screamer 4x4 (verticle.dat, mapcoord.dat, faces.dat, textures.dat) *.dat format for load,

  - Screamer 4x4 *.height/txt format for load,

 

  - Screamer 4x4  *.32a texture format for load,

  - Screamer 4x4  *.map texture format for load,

  - Screamer 4x4  *.rgb texture format for load.

 

How to get the 3D Object Converter v10.603:

- Download the 3D Object Converter from http://3doc.i3dconverter.com and install it or download and use the portable version (if you don’t have it yet).

- Just use the Help/Check for updates... function to get the v10.603.)

 

 

Screamer_4x4_materials.jpg

Screamer_4x4_textured.jpg

Screamer_4x4_height_gouraud.jpg

Screamer_4x4_height_textured.jpg

Edited by Karpati
Link to comment
Share on other sites

Guys, thank you so much for this tremendous help. Could you please advise if you've noticed during the analysis where the information about the wheel bones is stored? In the game, a physical component is attached to them, animating the vehicle suspension.

And the second question concerns reading objects on the map in a format *.tre they seem structurally similar or differ from vehicle *.dat format?

Link to comment
Share on other sites

1 hour ago, Durik256 said:

?? all work

for preview .spl fmt_spl.py

*(*.tre they seem structurally similar or differ from vehicle *.dat format?) no, they differ

I apologize, it seems there was a conflict with Python scripts in Noesis. I updated it, and now everything works fine. Thanks

Link to comment
Share on other sites

On 4/10/2024 at 8:04 PM, Durik256 said:

??所有工作

对于预览 .spl fmt_spl.py

*(*.tre 它们在结构上似乎与车辆相似或不同 *.dat格式?不,它们不同

hey guy,sorry that bothering u.I've recently been unpacking a game called nishuihan, its models are very beautiful, I've tried to convert its .wad file to a .dat file, but I really don't know how to extract the models and skeletons from the .dat file, by looking at it with 010 editor I think that there are 3dmax models and skeleton files in it, can you please help me to look at it, thank you very much!

 

6.zip

Link to comment
Share on other sites

On 4/18/2024 at 9:25 AM, alin00 said:

hey guy,sorry that bothering u.I've recently been unpacking a game called nishuihan, its models are very beautiful, I've tried to convert its .wad file to a .dat file, but I really don't know how to extract the models and skeletons from the .dat file, by looking at it with 010 editor I think that there are 3dmax models and skeleton files in it, can you please help me to look at it, thank you very much!

 

6.zip 24.38 MB · 5 downloads

Hi, you need to create a new topic for your mesh format, that's the only way you can get help. This thread research only Screamer 4x4 game formats

Link to comment
Share on other sites

On 4/19/2024 at 6:34 PM, black_racer said:

Hi, you need to create a new topic for your mesh format, that's the only way you can get help. This thread research only Screamer 4x4 game formats

okay thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...