Trees On Dynamic Terrain

For the week-end, first (still buggy) attempt : Test Babylon SP Terrain
This would probably be better with instances and instance buffers … I’ll check later.

runs really faster in Chrome than in FF here

10 Likes

JB, those are good trees. I like how they could double as rock clusters, if they were grey at a lower yPOS and radius. Nice work. : )

actually I could have added also rocks from a different model

1 Like

Lovely!

1 Like

So, SP is a model. Even better. Looks procedural. Maybe I see rotations now. Nice.

The SPS is good at managing low poly models, but instances are better for higher poly models.
So, now InstanceBuffers are avalaible, I’ll try to implement the instance management from the Dynamic Terrain.

1 Like

I want a bike on it like motocross madness :slight_smile:

2 Likes

I wish I can implement the DynamicTerrain instance manager before the end of the week and show a first demo that could be quite nice if it works as expected (not sure before it’s done).

No rush i bet it will be awesome !!!

first prototype … now the DynamicTerrain accepts also instances as recyclable objects
http://jerome.bousquie.fr/BJS/test/terrainInstances.html

F12 => 1187081 fixed trees in the map rendered by 9000 recycled instances

1 Like

Oh man I want this bike more and more :slight_smile:

just updated / polished

http://jerome.bousquie.fr/BJS/test/terrainInstances.html

4 Likes

I notice it’s only 20 fps on my laptop at home whereas it’s60 fps on my strong desktop computer at work. I need to tweak this so it gets a better perf everywhere.

1 Like


just implemented the instance colors also

4 Likes

link to the announcement for people finding this thread in the future :

1 Like

Just updated the live example so it’s lighter (less trees).
I hope this can run faster on weaker computers than mine at work : Test Babylon Instances Terrain

2 Likes

Well, it’s better, but its still not as good as I expected on my laptop : 28 fps
Time is spent in the render call, the profiler says.
I can also see something about evaluateActiveMeshes().
For my information, does instance.alwaysSelectAsActiveMesh = true has really the same effect on instances than on standard meshes ?

[EDIT] I don’t want to freeze all the meshes in the scene, only the instances and eventually their source meshes as I manually update their world matrix (and color buffer if requested)

1 Like

Correct

just having an idea to speed up the rotation computations … stay tuned

[EDIT] implemented and merged. Not such a big though.

Just tweaked again …
Just fly lower if your computer can’t render 60 fps at the highest altitude :blush:

1 Like