Double height physics objects error

Creating new content for Trespasser!

Moderators: TresCom Support Team, TresCom Board Managers, TresCom Developers

Post Reply
User avatar
Nick3069
Albertosaurus
Albertosaurus
Posts: 2361
Joined: Wed May 16, 2007 10:32 pm
Location: Ontario, Canada

Double height physics objects error

Post by Nick3069 »

I'm running into this very strange error where the physics objects have double the height in-game compared to 3ds Max and TresEd. I was making physics objects for a building in 3ds Max using the standard primitive box tool, which I've notice sets the object's origin at the bottom instead of the center. I didn't think it would cause any problem, but the game's engine doesn't seem to like that and essentially protrudes a copy of the box at the bottom. I've tried centering the origin point, but that didn't really help. Does anyone have any idea how I can fix this?
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5088
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Double height physics objects error

Post by tatu »

If you got access to the source, use the Mesh Tool MAX script from it. It got a "Center Pivot" feature (Center Pivot then Hard-Save below it).
This is the only way to actual save the Pivot position from 3ds Max when exporting to TPM, unless you import a model from Trespasser, combine the objects to use the imported models Pivot location. From what Draco told me, this is how he hacked the pivot back in the day to get it centered before we discovered the official script feature!

Trespasser with use the Pivot as the center and create a boundary box based on it. It doesn't calculate the center based on the faces/verts itself from my understanding.
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Double height physics objects error

Post by TheIdiot »

I use the "Reset X-Form" tool myself to fix any pivot-related problems. Place the pivot point where you want using the gizmo and then simply Reset X-Form. This also fixes problems caused by mirroring and scaling when you export your mesh. You have to rotate your physics box so that it is facing forward and vertical before you do this, however, as the bounding box for a physics object appears to be what the engine actually uses to calculate physics.
User avatar
Nick3069
Albertosaurus
Albertosaurus
Posts: 2361
Joined: Wed May 16, 2007 10:32 pm
Location: Ontario, Canada

Re: Double height physics objects error

Post by Nick3069 »

tatu wrote:If you got access to the source, use the Mesh Tool MAX script from it. It got a "Center Pivot" feature (Center Pivot then Hard-Save below it).
Thank you! That worked! :D I was afraid I'd have to redo all of that work.
TheIdiot wrote:I use the "Reset X-Form" tool myself to fix any pivot-related problems. Place the pivot point where you want using the gizmo and then simply Reset X-Form. This also fixes problems caused by mirroring and scaling when you export your mesh.
Thanks, I'll try to remember that in the case I might not have access to the Mesh Tool script. I was also going to ask about the mirrored object error, but even though 3ds Max still gives me a warning, the mirrored objects seem to have also been corrected by the Mesh Tool script.
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Double height physics objects error

Post by machf »

If you want a quick fix (because sometimes exporting an object as a .tpm, importing it into MAX and then reimporting it into the level after modifying it may mess up the object's normals), assign the object a physics box which is properly centered and of the right dimensions, I did that for the oxygen tanks at the end of TC Isle...
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14048
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Double height physics objects error

Post by Draconisaurus »

Another tip: You can keep a basic box physics object somewhere, and then when it's time to create a new physics model, bring it to the area of a model to be made physical, then use the single-direction uniform scale, in one of the 3 possible directions, until it fits. As long as the original obj has a truly centered pivot, this can be used to make the rest.
Post Reply