Page 1 of 1

Need help on scaling trees

Posted: 2007-03-03 08:35
by jedermann
I want to make a map with forest. To avoid uniformity I scaled the same tree models over and over. The problem is that my in-game collisions are screwed, although decal meshes look visually well in bf2 editor and in-game. It seems that ingame collision meshes are not scaled at all. Placing 20000 trees on two square km looks nice and does not seem to cause a bit of a lag. Also mem consumption is perfect for 1GB computers.

I scale them by placing them with Object.absoluteTransformation in StaticObjects.con, instead of Object.absolutePosition. Using Object.absolutePosition resets the transformation settings.

Example shows oak with scale factor 2 and pivot placed at position 10/10/10:
Object.create nc_oak01
Object.absoluteTransformation [2/0/0/0][0/2/0/0][0/0/2/0][10/10/10/1]
Object.isOvergrowth 1
If you want it hit the ground you need to substract the scaled anchor position from the terrains height at that location and set it as pivots position.

I have wasted yesterday on trying additional object parameters or using OvergrowthCollisions.con. Googling "Object.absoluteTransformation" returns zero hits. Maybe not any longer now ;)

To see ingame decal meshes start game with BF2_r.exe instead of BF2.exe and type in console:
CollisionManager.buildDebugCollisionMeshes
CollisionManager.drawMeshes 1

Anyway my bullets went straight through or appeared to hit the wrong position.

Any ideas to solve the collision mess up?

I want this working, the forest really is an eye candy. Never saw something like this on a bf2 map.

Posted: 2007-03-03 15:30
by IronTaxi
id think you would be better off to import them into max and then give them some scaled collision meshes as well...sound liek you are only scaling the visible mesh which wont do alot aside from visual changes...

Posted: 2007-03-03 17:21
by jedermann
'[R-DEV wrote:IronTaxi']id think you would be better off to import them into max and then give them some scaled collision meshes as well...sound liek you are only scaling the visible mesh which wont do alot aside from visual changes...
Any idea how to import the "nc_oak02.collisionmesh" in GMax?

Posted: 2007-03-03 19:13
by Griffon2-6
You need the importer tool. Look around on bfeditor.org/forums in the MAX section or the Object Editor section. I'd assume it's stickied.