• Advertisement
Sign in to follow this  

Billboard independent distance size how to?

This topic is 910 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

I use this scale function to scale billboard to the cosntant size, but size enlarge on the near left and right borders. 

float scale = size * dist * 2.0 * tan(fov)/(screenWidth/ratio)

 

How to make 3d billboard same saize on the whole screen space? Without ortho projection))

Share this post


Link to post
Share on other sites
Advertisement
You have to tweak the scale factor :
const float ScaleFactor = 5.0f;
const float ScreenScale = ( BillboardCenter - CameraPos ).Length() / ScaleFactor;

You scale the billboard using this ScreenScale factor.

Edited by Alundra

Share this post


Link to post
Share on other sites

Bilboard distort on the edges of the display, becomes bigger than on the center of the screen. I thought about some angle function between camera look forward and billboard camera look vectors. But dobt know how.

Edited by Turbochist

Share this post


Link to post
Share on other sites

It's a problem something else, because billboard is just 2 triangle for a quad, it can't distort on the center.

You should check your view and projection matrix I guess.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement