Page 2 of 3

Re: New models

Posted: Fri Jul 28, 2017 11:23 pm
by Teromen
I would assume you move the model around in 3dsmax untill it is centered on the grid, right?

Which reference refers to a model with a collision model included? I wanna import a simple building and rig its collision.

My first real map will either be a airport or a geothermal plant so i'll need to be able to add complex physics.

Re: New models

Posted: Sat Jul 29, 2017 3:34 am
by machf
Teromen wrote:I would assume you move the model around in 3dsmax untill it is centered on the grid, right?
My old topic on this subject:

viewtopic.php?f=31&t=4431
Which reference refers to a model with a collision model included? I wanna import a simple building and rig its collision.
Buildings usually don't have physics boxes attached, they instead use standalone physics objects... take alook at the various buildings in the Town, or the Plantation House in JR.

Re: New models

Posted: Sat Jul 29, 2017 7:06 am
by Teromen
I got the crate physics to work. But when I try to import a physics object the level stops loading in the game. I copied an object from the stairs in ingen town.

Does each physics object import separately or can I use Exmpl-Box-SepPhys10.values.txt and do them all in one file? I haven't had luck with this file btw. Must be doing something wrong.

Re: New models

Posted: Sat Jul 29, 2017 7:27 am
by Draconisaurus
Teromen wrote:Which reference refers to a model with a collision model included? I wanna import a simple building and rig its collision.
You need to be careful with your wording, here. Trespasser uses two kinds of 'collision models' - $ubmodels and invisible-instances. The first is usually for moveable objects, the second always for non-moveable ones.

$ubmodel - "Exmpl-Cmpnd.values.txt" (these models use 'string Type = "Compound"')
invisible-instance - "Exmpl-Box-SepPhys.values.txt" (the physics are separate)
Teromen wrote:I got the crate physics to work. But when I try to import a physics object the level stops loading in the game. I copied an object from the stairs in ingen town.
Need some extra detail here... Can you provide the t-script for us?
Does each physics object import separately or can I use Exmpl-Box-SepPhys10.values.txt and do them all in one file? I haven't had luck with this file btw. Must be doing something wrong.
Multiple separate physics objects can be imported within a single TPM/values file combo, as well as the visible object(s) they go to. Checking the example file.. I don't see any issues with it. Be sure the model names match between the TPM and values files, and that the filename for the TPM and values file is the same. If you're still stuck, post it here (recommend to put it in 'Code' forum code tags).

Re: New models

Posted: Sat Jul 29, 2017 8:37 am
by Teromen

Code: Select all

group TTeroBunker10-00 = {
    int ext_GeometryType = 2
    string Class = "CInstance"
    bool Tangible = true
    bool Moveable = false
    float Density = 10.0
    string SoundMaterial = "[material]"
}

group FTeroBunker10-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}

group FTeroBunker11-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}

group FTeroBunker12-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}

group FTeroBunker13-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}

group FTeroBunker14-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}

Re: New models

Posted: Sat Jul 29, 2017 9:20 am
by Draconisaurus

Code: Select all

group TTeroBunker00-00 = {
    int ext_GeometryType = 2
    string Class = "CInstance"
    bool Visible = true
    bool Tangible = false
    bool Moveable = false
    float Density = 10.0
    string SoundMaterial = "[material]"
}
This one here - keep the geo type value, but the rest of these are quite unnecessary; not sure if their inclusion can cause errors, so I recommend removing all but that first value. Also, I see you've tried to use a Tres letter prefix; "T" happens to stand for "Terrain". A building such as a bunker would get the prefix "S", meaning "Stationary". Likewise you can use "P" for props.

Code: Select all

group FTeroBunker00-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}
These all look good to me. Be sure to assign a sound material at some point; "[material]" is a placeholder. Sound materials can be found organized in "OldSoundCatalogEdition8-1.txt", in "\Trespasser Twilight\Script Reference\TPA Listing". Alternatively you can find an object in Tres which makes a collision sound you like and use its SoundMaterial. If you want to know what a given sound material sounds like, assign it to a basic object in a level and bump it around to hear the sound. JPDS~testing has a location next to the Terminus specifically for this purpose, where various numbered/logo-covered boxes have a diverse selection. If you feel up to it, you might even wish to make your own small test level one day so that you don't pollute your main project(s) with test-imports.

EDIT: Oh almost forgot - machf has compiled several, more up-to-date lists for Trespasser sounds, found in his signature, tho last I checked they are organized as-found in the TPA files rather than by type and can be more difficult to search through.

Re: New models

Posted: Sat Jul 29, 2017 10:22 am
by Teromen
Something about the main model wont let the level load in Trespasser. If I import the model separately it works, just not with the collision. And if I delete the main mesh and leave the collision physics the game runs fine and the collision works.

Re: New models

Posted: Sat Jul 29, 2017 11:48 am
by Draconisaurus
Definitely a missing detail somewhere. Again, leave only the geometry type value in the main model's script. There's no reason the presence of the main model and its physics at the same time would cause the level not to work when it works with only the one or the others. Let us know if you still can't get it to work.. Maybe attach the latest TPM file with all 6 models.

Re: New models

Posted: Sat Jul 29, 2017 11:55 am
by machf
Draconisaurus wrote: EDIT: Oh almost forgot - machf has compiled several, more up-to-date lists for Trespasser sounds, found in his signature, tho last I checked they are organized as-found in the TPA files rather than by type and can be more difficult to search through.
They do contain a "SoundMaterials" section, though, where such sound materials are sorted alphabetically... the sounds themselves aaren't needed for what he's doing right now.

Re: New models

Posted: Sat Jul 29, 2017 12:38 pm
by Teromen
I deleted the first section entirely and that fixed the crashing and collision. Just now there is no lighting lol. it never ends does it

I assume I just need to figure out the correct script.

Edit: TresEd has lighting, there's just none in game. All one brightness. Do you think the blocking physics are blocking light?

Re: New models

Posted: Sat Jul 29, 2017 12:53 pm
by machf
Teromen wrote:I deleted the first section entirely and that fixed the crashing and collision. Just now there is no lighting lol. it never ends does it

I assume I just need to figure out the correct script.

Edit: TresEd has lighting, there's just none in game. All one brightness. Do you think the blocking physics are blocking light?
Probably. Try adding "bool Shadow = false"

Re: New models

Posted: Sat Jul 29, 2017 12:59 pm
by Teromen
Exmpl-Box-SepPhys.values.txt

Code: Select all

group __[name]00-00 = {
    int ext_GeometryType = 1
    string Class = "CInstance"
    bool Tangible = true
    float Density = 10.0
    bool Visible = false
    bool Shadow = false
    string SoundMaterial = "[material]"
}

group [name]-00 = {
    int ext_GeometryType = 2
}
Is that first part for the physics model? Second part for the display model?

Re: New models

Posted: Sat Jul 29, 2017 1:06 pm
by Draconisaurus
That glowing building is very strange... That should only happen of the model has "bool Unlit = true". I can't imagine how even shadow-casting physics could result in that. Maybe something bizarre with the iterations of script it had with successive imports. Not sure what the solution is except deleting the model in TresEd and giving it a new values file before reimport. This time include the geometry type, which for intangible visible objects is 2.

Re: New models

Posted: Sat Jul 29, 2017 2:15 pm
by machf
Draconisaurus wrote:That glowing building is very strange... That should only happen of the model has "bool Unlit = true". I can't imagine how even shadow-casting physics could result in that. Maybe something bizarre with the iterations of script it had with successive imports. Not sure what the solution is except deleting the model in TresEd and giving it a new values file before reimport. This time include the geometry type, which for intangible visible objects is 2.
Well, when you import a model with "bool Unlit = true", it stays that way, even if you change it afterwards in TresEd...

Re: New models

Posted: Sun Jul 30, 2017 1:54 pm
by TheIdiot
Hmm. In my experience, aside from of course having the object set to bool Unlit = true, a glitch can occur when using 24-bit textures, causing the 24-bit texture to look somewhat Unlit, even if it isn't so. GeomAdd will warn you when you import that "24-bit textures are experimental" or something similar if the textures are 24-bit. The glitch seems to be more obvious when using textures with transparency, but it definitely happens when using normal textures. Are you using palletted, 256-colour textures when importing?