Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / Terrain Experiment.

Author
Message
JDforce
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 26th Oct 2005 00:50 Edited at: 26th Oct 2005 00:54
Hi all.
As many of you have followed (like me) the findings on how terrain works, how to model them and put them to work, I present here the results of my experiments.

General notes,
Modeling:
The model can be modeled on any program which can output X format. Make them preferably solid geometry, as other engines using ODE require so.
They have to be UV mapped and texture can be any format accepted by fpsc.( jpg,tga,dds).

Formatting for FPSC:
Make them an entity. The minimum parameters on the attached fpe are here:


Actually not sure if AI is needed. Probably not. What is certain is that the final game probably need the texture parameter, because when building, the compiler does not placed the texture automatically. I had to put textures by hand on the output folders.
For test mode, as presented here works just fine.

Problems usually found:
a) No sound when walking.(not very important)
b) Player stuck to terrain on some parts.
c) Enemies falling down thru terrain. (extremely important to solve)

Some clues:
Hitman sent me a terrain object where reportedly was sound when walking over, so I analized its geometry. Enemies were passing thru but there was sound. The first terrain he sent did not work on problems aforementioned.
I was testing and found acceptable to put normal segments underneath the terrain in order for it to emit sound, but never tested with enemies. Sound is emmited in that way, because the engine founds collision with the segment underneath. Nothing to do with 3d sound. It's material index sound.

Found:
I arrived to the solid conclusion that it was a collision problem, due to the size or geometry of the terrain object. At first I was mistaken and have the theory that it was the size and quantity of triangles of the model, which, I supposed, did not trigger proper collision. I made a model with four triangles per segment unit(the size of a ground segment tile) and it worked. It had a span of 3 x 3 segment squares.

Not the triangles nor geometry:
Making a model triple the size, (9 x 9) with the same geometry, I was absolutely sure that it would work. It didn't. But if I reduced the size (scale parameter) to 3x3, it worked again.

Bad news:
It meant only one thing: The engine can not properly calculate collision for objects that span more than 3 x 3 segment units.
Additionally, per each segment unit the model must have at least 2 triangles. If it has less or too many, the physics engine gets confused and the player gets stuck.

So, young people, no terrain can have more than that size. If it is larger than that, no sound, enemies falling thru and player stuck.
Unless....

Good news:
I thought all night and finished up with a method that slices a big terrain object into squares no more than the size required. The resulting sliced terrain segments must be output as a single multimesh object. Alignment is a must, because the player can get stuck into the seams. You can use them as "terrain segments" and tile them carefully on the editor.

So, here is attached a terrain for all to beta test. It is a beach front from my already in production "Normandie beach pack", and has a clear mark of its "blocky" origin.
It has almost the vertical size of one layer, so you can use it as a ramp or in series with another layer. Is not so big, but this kind of "segmented multimesh terrain" seem the only -working- way to go at this time. You can experiment with scale parameter,but is not recommendable that it be much more larger than the present size, which I tested and still has some "stuck" spots.

Please test it and post results for all to learn.

Important note to test:
The player and enemies usually must start on a real segment. Many times if enemies are over the terrain at game start, they get stuck.

Video Bonus:
I took a video of this terrain in action. I placed three contiguous instances of the terrain on one layer and three on the upper layer. There are clacky enemies and a bazooka guy. The player (me) was too bad at play, because (plain excuses) the frame rate dropped when doing the screen capture. The video uses Divxx codec to play and has 17MB size. Hope my server endures the downloads.

Well padawans, use the force.

Video here: www.demosys.com/files/JDforcevideo.zip

May the 3d force B with U

Attachments

Login to view attachments
The Hitman
19
Years of Service
User Offline
Joined: 22nd Sep 2005
Location: usa
Posted: 26th Oct 2005 04:49
hey great info. thanks for figuring it out

If you dont have what it takes to create "Spend Alot Of Money"
Pantaloon
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: About two blocks East
Posted: 15th Feb 2006 21:58
sooo If i were to get a terrain generator of some sort, make a terrain, then import it into a modeling program (which i'm not sure if one Could, considering size) then i could cut it up into 3x3 segment lengths and just put it back together in FPSC?

Imagination is the gateway to freedom, fore in the confines of our mind we hold endless space and time.
Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 16th Feb 2006 04:04
Theoreticly yes, but you must consider the map size limit that FPSC has. I've experimented with this myself and it works.

JEEZ!You people just STFU! You waste more space complaining about people wasting space than the people your bashing! Man, I thought I had no life.

Login to post a reply

Server time is: 2024-11-23 00:29:17
Your offset time is: 2024-11-23 00:29:17