• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1winsrp  Members

Posted 01 February 2014 - 11:35 AM

Hi all,

I imported an fbx tree model into an editor I'm doing, and saw that the tree already came with the leafs as quads (tons of quads actually), and I would like those to work as billboards, and all the leaf quads come in a single modelmeshpart section.

To be honest looking at the tree image I think they are way too many quads and its actually a waste of quad to put them all as billboards, but for learning purposes I would like to make them work as billboards. Is there a way to make already made quads work as billboards?

thanks in advance for all the help.

Here is an image of the tree with and without alpha blending.

### #2eppo  Members

Posted 01 February 2014 - 02:31 PM

If the quads are pre-oriented, you'll need to find a way to undo this transformation.

- Perhaps the orientation is stored within the mesh. Likely not, but maybe the author of the tool thought it might be useful for deformations (wind etc.).

- If the quads are uv mapped you can use that map, plus the directions of two edges on the quad to re-construct the quad's orientation (similar to what you do when normal mapping).

The quad's vertices multiplied by the inverse of the transformation (matrix) will give you the original quad. This you can then transform as a regular billboard.

Or simpler, you can take the average of the four vertices of the quad, the distance from this centroid position to one of the vertices and build a new quad.

Edited by eppo, 01 February 2014 - 02:32 PM.

### #3winsrp  Members

Posted 03 February 2014 - 09:11 AM

Those are all good ideas, I'll give it a try on trying to get the centroid, and the work on it as a regular billboard to see what comes out. Thanks for the ideas.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.