Jump to content

Billboards


Gilmer
 Share

Recommended Posts

Hello, I wonder, how can I work with billboards? I saw the example of the billboard at Spruce Private folder. And I realized that it is a 1024x512 image containing all the sides of the model. But I wonder if you need to put some additional control, some shader?

 

I think unfortunate way, that has many things in leadwerks that does not contain the documentation, and no article on the site about them. One example is the cubemap shader, which was added to shaders.pak and was not warned or anything...

Link to comment
Share on other sites

Billboards are built into the vegetation system. Just check the "Use billboards" checkbox in the vegetation settings panel for that layer.

 

Automatic billboards are not supported for individual models, because the cost of rendering those would be the same as if you just use a low-res LOD mesh.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Automatic billboards are not supported for individual models, because the cost of rendering those would be the same as if you just use a low-res LOD mesh.

 

What does this mean? I would think slapping a texture on 2 planes (crossing them to make it look like it has depth) would be cheaper than rendering a low resolution LOD mesh.

Link to comment
Share on other sites

Under a certain threshold, there's not really any difference between rendering 2 or 200 triangles. The cost of starting and stopping that operation becomes more significant than the actual draw time itself.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I'd rather not share the details. It may be possible to implement billboarding for static meshes, but the potential savings are uncertain and it's not a high priority.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

A good way, but maybe somewhat limited, might be to have a huge texture divided into multiple texture sizes. Each "zone" in this massive texture would be it's own texture of a given tree. Then via the shader you determine which zone to offset the texture by on the plane. That way 1 plane mesh can be used for all billboards, but you could offset each one to represent a range of different tree textures. Niops(?) on the boards here did this with an ambulance once when we were talking about instanced meshes and how we can get get different materials on them. The only issue with that was you are limited in how many tree images you can place on this one texture, although depending on the res I seem to remember it being a decently high number that might satisfy vegetation.

 

This massive texture could be made dynamically by the editor/game if each tree placed also provided a texture of it in billboard form. I wonder what the performance on that would be since it's just 1 plane instance and 1 material. Maybe if I find time I'll play around with something like that.

Link to comment
Share on other sites

I think they did something similar in the STALKER games. If you poke around the files, there are some textures with a bunch of billboard images merged onto them.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...