Individual Billboard Origins.

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

Individual Billboard Origins.

Post 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.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
Anno1989
Goblin
Posts: 299
Joined: Mon Aug 25, 2008 2:50 pm
Location: Germany
x 6
Contact:

Re: Individual Billboard Origins.

Post 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.
http://www.espadon-online.eu/ MMORPG using Ogre3D
Post Reply