Hi inteja,
We used 2D Plane with transparency of realistic image of tree. Then had trees (and bushes) lookAt(cam.position).
Surprisingly, as we walked around/through the trees and bushes, always turning toward the cam - it was not easy to notice everything rotating. It made me more curious about this technique.
We “stacked” leaves of bushes to get a good 3D illusion. For trees, I stopped at single 2D (good enough), but was inspired by an example where many 2D planes were used to make trees.
Recently we experimentes with the technique of “stacking” multiple 2D planes in 3D space (for nebula and galaxy) and came away with 60FPS. From the side it looks like an accordion, but after all are parented to a “master” and the master looks at the camera - it is never possible to tell if it is 2D or 3D or a stack… of 2D images.
Also it gives a nice realistic parallax, which could be be achieved with foliage.
If this sounds possible for you I’m happy to share the code for a test.
The reason we like this approach is:
- getting realistic 2D images is easy.
- easy to modify to get the exact look you want.
- surprisingly difficult to tell where 2D and 3D overlap
- -> 60 frames per second <-
We pushed the limit with the space scene… which would be similar for a forest.
It renderw … 30 transluscent stacked frames, at 1000x1000. With BABYLON.Engine.Alpha_MAXIMIXED and ONEONE…
Then animated a CAM through all the 2D frames
And to our surprise 60FPS.
I dont know why.
To render a forest in the distance - we just need the illusion of a tree, not a full 3D tree. Similar for a galaxy, we do not want to render a full 3D Galaxy… just the look of it. So the illusion is all that is needed, we found stacked 2D to be a good performant approach.
Below, is example of lookAt 2D trees and bushes on fire… (in AR)… easily improved.
Below, is example of “stacking”, 10 2D planes on the z axis to get real depth, with blending, for both a nebula and galaxy at same time at 60fps.
Not using LookAt. The purple ball is the “master”.
They don’t appear 3D, until cam is moving, and you go into them…
Then it is very 3D. We color each layer separately… maybe makes a nice forest? Idk.
The next experiment, we try to use this to make a massive army of enemies (in the distance).
Moving from 30 2D planes to 300, is more like a forest. And see if it is still 60FPS.
So experimental, and not for everyone.
: )