Jump to content

  • Log In with Google      Sign In   
  • Create Account

fbx tree with billboard leafs, but leaf quads are already made


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.


  • You cannot reply to this topic
2 replies to this topic

#1 winsrp   Members   -  Reputation: 277

Like
0Likes
Like

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.

 

alpha.png

 

no alpha.png



#2 eppo   Crossbones+   -  Reputation: 4269

Like
1Likes
Like

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.


#3 winsrp   Members   -  Reputation: 277

Like
0Likes
Like

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.




PARTNERS