Gilmer Posted August 2, 2010 Share Posted August 2, 2010 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... Quote Link to comment Share on other sites More sharing options...
Josh Posted August 4, 2010 Share Posted August 4, 2010 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. Quote 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 More sharing options...
Gilmer Posted August 6, 2010 Author Share Posted August 6, 2010 hmmm..thanks josh.. just one more question, how i can set the distance for the vegetation change to billboard? i think that change is very close to the camera.. Quote Link to comment Share on other sites More sharing options...
DaveLee Posted August 6, 2010 Share Posted August 6, 2010 Hey Gilmer, under the vegetation object that you would like to edit you can adjust the "LOD Distance" amount to change how close to the camera the LOD takes effect. Quote Link to comment Share on other sites More sharing options...
Rick Posted August 6, 2010 Share Posted August 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 6, 2010 Share Posted August 6, 2010 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. Quote 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 More sharing options...
Rick Posted August 6, 2010 Share Posted August 6, 2010 Ah ok. Do you ever think you'll expose a way for us to batch things up so we can benefit from this ourselves using LE commands? Quote Link to comment Share on other sites More sharing options...
Josh Posted August 6, 2010 Share Posted August 6, 2010 Meshes already use batching. The vegetation LOD system uses another method that doesn't work well with dynamic objects. Quote 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 More sharing options...
Rick Posted August 6, 2010 Share Posted August 6, 2010 So this other method vs mesh batching is a huge speed booster? Is this propitiatory information or can you share the other method? Quote Link to comment Share on other sites More sharing options...
Josh Posted August 6, 2010 Share Posted August 6, 2010 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. Quote 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 More sharing options...
Rick Posted August 6, 2010 Share Posted August 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 7, 2010 Share Posted August 7, 2010 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. Quote 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 More sharing options...
Recommended Posts
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.