News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

stunt files for noobs

Started by cody, April 24, 2008, 07:55:07 AM

Previous topic - Next topic

cody

i finnally got a kvm switch so i can use my 386 with my p4, well, going through my old files on the 386, i found stunts!
i decided i wana try to mod it. as of now i build cars for other games like Flatout 2, so i have 3d modeling experiance. today i whipped up a 136 polygon car model assigned to a single 64x64 texture. i'll try getting this ingame, but i need to know what files are what, like, what file has acctual car geomatry, what have texture or color assignment. can someone tell me what each of these do?
CARXXXX.RES -CARS CONFIG FILE, i.e. GEARS, TOURQE, DESCRIPTIONS
STXXXX.P3S -?
STDAXXXX.PVS -?
STDBXXXX.PVS -?

Well, i'll upload a .3ds file and texture for u folks to see what i have done already, u'll need either 3ds max, zmodeler, blender etc to import the file.

JTK

Hi cody and welcome to the Stunts Community. There is a thread about dissecting the Stunts file and modelling new cars, you can find it here: http://forum.stunts.hu/index.php?topic=1137.0
Vintage Stunts Racing at http://www.kalpen.de

dstien

Howdy cody! We've just figured out the 3d shape format, there's more information on the wiki: Car files, Resource file format. I'm adding 3d shape support to my resource file editor, so your car may very well go into the history books as the first user-made vehicle. ;)

You can't use custom textures, Stunts offers only a fixed set of materials. You're limited to 256 vertices and polygons, but a wheel only occupies 6 vertices and 1 polygon. Further, polygons can have up to 10 sides, so try to use triangle fans or n-gons instead of triangle strips.

With a little patience I think we can get this shape in-game.

Duplode

Indeed your arrival was with spectacular timing, cody - two months ago we would be able to do very little about your idea... welcome! 8) Be sure to check both the wiki and the "Dissecting" thread - the latter has loads of useful and messy information we're trying to distill to the wiki.

cody

thx for the welcome, i wont mind doing cars for stunts, once we completly figure it out. well im use to making hi-poly cars (5000-17000 poly) for other games but decided to go back to my roots. for me, making cars is like breathing. the 3ds file i made is only 136 poly, now i can make others with 256 poly!

Duplode

Quote from: cody on April 25, 2008, 08:02:42 AM
for me, making cars is like breathing. the 3ds file i made is only 136 poly, now i can make others with 256 poly!

Good, now we have a modeler with a vocation  :) And about the resolutions, having moodels with different levels of detail may be useful anyway, as the on-track car model is scaled down 1:20 in relation to the displayed in the showroom (at least until we learn to tune the scalings, if that's possible).

cody

got one question for now, what are the default materials? and dstien, do you have a format u would like? ie, .3ds .max .???

cody

by the way, the program i use is Zmodeler, u can get the shareware version that can do everything, except inport cars, except for .z3d you can get it here http://www.zmodeler2.com/?mode=downloads

Duplode

Quote from: cody on April 26, 2008, 02:06:03 AM
got one question for now, what are the default materials?

That's a bit of an issue. The default materials are, basically, all 3D shape textures you can see in the game, from standard car body panels to buildings, loop surfaces and grass... their indexing within the .p3s files is arbitrary. A descriptive list is available on this post of the "Dissecting" thread.

cody

well, i know the 7 parts, but what controls color of parts (script, bitmap texture?), i have no idea, i need an actual car file to look at to reverse engineer it.

Duplode

First, setting a point straight: in order to hex-manipulate the car shape .P3S files, you will need to unpack them first using the stunpack tool from dstien (available somewhere near the beginning of the "Dissecting" Thread). The unpacked file is the one having the structure described in the wiki. In order to load it into the game, replace the original .p3s with it and change the extension to .3SH

Now, by "seven parts" you refer to the seven colours of each car, to the seven shapes in each ST*.3SH file or to the seven available colours for each polygon in the mesh? Assuming you meant the latter, each polygon in one of the .3SH shapes has a 7-byte long (for "standard" cars) sequence that tells the game which texture to use for each polygon. The hex values and the corresponding textures are roughly described in the spreadsheet list I referred in the last post. As for where the textures themselves are stored, we currently do not have that (incredibly useful) piece of information...

cody


Duplode

#12
So you meant the shapes in the .3SH. Their colours are defined polygon-by-polygon, so you have to find to the shape in the .3SH using the offset list in the header (dstein explained this point to me with this example for GAME2.3SH, the only difference being that for car files the base offset for the byte counting is 0x003E instead of 0x01DE as in the example). After that, with some more byte counting you'll skip the vertices and the unknown-function pieces of data present on the shape (use the structure descriptions at "Resource file format" on the wiki as a guide) to finally reach the polygon list for the shape. As an illustration, here is the data for the 8th polygon of STPMIN.3SH's car1 shape (you might want to try and find it yourself and then check the "answer" below):

03 02 32 4e 36 3e 42 46 5a 2a 2b 30

This sequence of bytes starts at offset 0x0b45, and tells the following information about the 8th polygon:

  • It's a triangle (the first byte)
  • It has depth clipping 2 (the second byte)
  • It has different textures for each colour option available for the Indy (the following seven bytes, check those values at the texture list I posted and you'll see the colours are what you would expect for an Indy body panel).
  • It uses the 43th, 44th and 49th vertices of the vertices list (the four indices 0x2a, 0x2b and 0x30 respectively - those indices count the vertices of the shape in hex and starting from zero)
The polygon is, actually, the upper part of Indy's nose (I didn't find that out by trial-and-error, but by using a few scripts and tools to produce a 2D map of the polygons on the shape, like those shown at the "Dissecting" thread).

Krys TOFF

Welcome aboard the Stunts community Cody.
It seems that dstien and Duplode work of dissecting Stunts files is bringing here some 3D modelers, great great great ! :)

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the title of the ZCT269 track, from ZakStunts season 2023?:
Shortcuts: ALT+S post or ALT+P preview