Need help on scaling trees

Making or wanting help making your own asset? Check in here
Post Reply
jedermann
Posts: 55
Joined: 2007-02-07 07:41

Need help on scaling trees

Post 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.
Last edited by jedermann on 2007-03-03 14:24, edited 1 time in total.
IronTaxi
Retired PR Developer
Posts: 4925
Joined: 2006-05-31 12:56

Post 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...
jedermann
Posts: 55
Joined: 2007-02-07 07:41

Post 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?
Griffon2-6
Posts: 2487
Joined: 2006-05-26 04:21

Post 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.
Post Reply

Return to “PR:BF2 Community Modding”