Page 1 of 1

Individual Billboard Origins.

Posted: Tue Aug 02, 2011 4:59 am
by mkultra333
You can set individual billboard Y axis, but you can't set individual billboard origins. It would be very good if you could for the following two reasons.

To reduce batches, I put together as many billboard images as I can onto a big master texture, 4096*4096 (which compressed down to just 8 meg once in DXT1 format.) Here's an example:

Image

Uploaded with ImageShack.us

The first problem is that some bills need their origin at the centre (such as explosions) while other bills need their origin at the base (such as fire).

The second problem is that often the exact centre (or exact middle bottom, or whatever) isn't the ideal place for a handle.

I'm using captures of real explosions, and for maximum quality I'm avoiding resizing where I can. At the same time, I need to squeeze the images as close together as possible. This often means that the best bounding box will result in an an off-centre origin of the explosion, because the cloud will drift a little left or right.

Programmers are probably thinking "Just shift/resize" but that is not ideal, it means degrading the quality of the source or wasting space on the texture.

Re: Individual Billboard Origins.

Posted: Thu Feb 16, 2012 12:38 pm
by Anno1989
I'm not sure if I got your problem right. You are using the Ogre Billboards?
Write your own Billboardshader, like we did in espadon with our billboard vegetation.
You just need to store the center of the Billboard in each vertex and let them turn in the vertex program. So you can set UVs, Orientation and other stuff as you want and need. Cause every vertex has its own texture and "orientation" info, you can freely batch your stuff together.
Although you should get used to shader programming, but it offers you the freedom in programming you need.