Shadow132 Posted July 2, 2017 Share Posted July 2, 2017 Was wondering if the engine could support destroy-able vegetation, and if so could I create something that doesn't damage performance too much, or at all. Quote Link to comment Share on other sites More sharing options...
nick.ace Posted July 2, 2017 Share Posted July 2, 2017 Destructible vegetation is a very complex topic. I doubt the vegetation system as is can support it because it uses transform feedback to do GPU culling, so if vegetation could essentially move in any way, then it vastly complicates how this is handled (maybe even impossible in some cases). That being said, you could place objects and take advantage of instancing (which is automatic in Leadwerks) to make destructible vegetation. You would need to place vegetation by hand. What did you have in mind exactly? Quote Link to comment Share on other sites More sharing options...
karmacomposer Posted July 6, 2017 Share Posted July 6, 2017 Or, you could model vegetation (say, a tree or some bushes), to be destroyed by cutting up the mesh into chunks (some modeling programs let you do this). Then, place the normal veg and when hit, replace it in code with the destroyed veg (and I would have a bit of code that explodes the chunks and some particles to make it more exciting). Mike Quote MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 980 GTX with 16gb vram / SSD drives MSI Dominator Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1060 GTX with 8gb vram / SSD drives Alienware Laptop - Core i7 - 8 cores / 3ghz / 32gb RAM / Nvidia 1070 Ti with 16gb vram / SSD drives My Patreon page: https://www.patreon.com/michaelfelkercomposer My music for sale: https://www.tgcstore.net/category/513?format=all&perpage=30&textures=undefined&price=all&order=default&artists[]=87213 Custom synths and sounds - http://www.supersynths.com Link to comment Share on other sites More sharing options...
gamecreator Posted July 6, 2017 Share Posted July 6, 2017 That's how I did it for the last tournament for destructible rocks. However, I didn't have many so I didn't notice a performance impact. Quote Link to comment Share on other sites More sharing options...
Josh Posted July 6, 2017 Share Posted July 6, 2017 There is no such thing as individual instances of vegetation. There are only grid sections in which one or more vegetation instances may appear. That said, it would be possible to convert all instances in one section to regular models, and remove that area from the vegetation grid. Crazy, I know, but that's why it is so awesome. Read my book to learn more. 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...
tournamentdan Posted July 6, 2017 Share Posted July 6, 2017 9 hours ago, Josh said: There is no such thing as individual instances of vegetation. There are only grid sections in which one or more vegetation instances may appear. That said, it would be possible to convert all instances in one section to regular models, and remove that area from the vegetation grid. Crazy, I know, but that's why it is so awesome. Read my book to learn more. Didn't you use a geometry shader to create the instances? If so can't we just use the invocation value to identify the single instance? Quote Link to comment Share on other sites More sharing options...
nick.ace Posted July 10, 2017 Share Posted July 10, 2017 @Josh Yeah, I know, but I meant that the OP could place instances (models) by himself for destructible vegetation. @tournamentdan I don't remember seeing any geometry shaders for the vegetation last time I checked. I doubt that would be a good idea though. I think I remember Josh trying that, and he said something about it not having great performance. Quote 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.