Tree billboard rotation

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Fabio451
Posts: 17
Joined: Sun Nov 08, 2015 4:50 pm

Tree billboard rotation

Post by Fabio451 »

Hi guys.
I'm using billboards to add trees to my scene.
Since billboards always face camera, it seems that the trees detach from the ground when rotating on an horizontal axis.

Is there a way to make a billboard rotate only on the vertical axis?
Should I implement my own code to get this particular rotation?

Bye.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Tree billboard rotation

Post by hendu »

Image

It's common to use static crossing quads. They look better than just one rotating quad.
Fabio451
Posts: 17
Joined: Sun Nov 08, 2015 4:50 pm

Re: Tree billboard rotation

Post by Fabio451 »

Thank you, Hendu.
Is there some example or tutorial?
It's not clear to me how to do it.
Fabio451
Posts: 17
Joined: Sun Nov 08, 2015 4:50 pm

Re: Tree billboard rotation

Post by Fabio451 »

I'm doing it by creating planes with createPlaneMesh().
The effect is not so bad.
Is this the correct way? Or there is a better way?
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Tree billboard rotation

Post by Cube_ »

you could just make it a 3D model with two crossed planes, this has the benefit of allowing you to instantiate them for potentially large performance gains.
"this is not the bottleneck you are looking for"
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Tree billboard rotation

Post by Mel »

There is really no right or wrong way of doing something. Eficient or ineficient maybe... but not wrong or right per-se (maybe wrong or right to some degree if you take as right some eficient and wrong something ineficient, but that's just starting to rant :P) Ahem.

irr Billboards are nice if you render a few, but it renders faster to submit a lot of polygons instead of just two, as the irrlicht billboards do. Besides, sending the polygons by yourself, you have the chance to do with those polygons whatever you want, so i'd encourage you to learn how to handle meshes on your own and that you generated your trees... The results may be surprising :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: Tree billboard rotation

Post by REDDemon »

In some old post buried in the forum there's the tree generator wich has the axis aligned billboard scene node, it is a pity the axis aligned bill board was not included in irrlicht api
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Post Reply