Guppy Posted January 29, 2014 Share Posted January 29, 2014 Was searching the forums for how to include lower level of detail models for leadworks, when to my surprise I learned that the current incarnation of the engine doesn't support it. Is this something that is planned for 3.1? I'm not talking about automatic lod or anything fancy like that, just plain old swapping hi poly models for lower poly versions based on viewing distance of the instance 1 Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
YouGroove Posted January 29, 2014 Share Posted January 29, 2014 Yep i talked a lot about optimisations (model LOD, shader LOD, shadow resolution and quality choice). For now you'll have to code it in Lua : if (distance <20) then model_lod1.show() model_lod2.hide() model_lod3.hide() end if (distance > 20 and distance < 100 ) then model_lod1.hide) model_lod2.show() model_lod3.hide() end etc ... Good for static models, for animated ones, it will be complicated as you'll have to start at same frame and animation when switching LOD models. Hardcoded in the engine would be optimized and faster. The inconvenient is the Ram needed, LOD means several versions of the character, on some console games they avoided LOD to not use more Ram as Console have it more limited than PC. 1 Quote Stop toying and make games Link to comment Share on other sites More sharing options...
gamecreator Posted January 29, 2014 Share Posted January 29, 2014 If you want to get fancier you can check to see if the camera is facing the model first. If not, don't do anything as I think Leadwerks or OpenGL doesn't render unseen models. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 29, 2014 Share Posted January 29, 2014 We don't bother with it at this time. For most objects, saving a couple thousand polygons makes absolutely no difference in rendering speed, because the vertex pipeline is not the bottleneck. It increases the demands on the art pipeline. Tessellation can be used to automate much of this on the GPU. Now when I start adding features that improve large outdoor scenes, it will make sense then because of the scale of the scene. But in most cases, LOD is a somewhat antiquated design idea based around how the hardware used to work. One exception is animated characters, which can still benefit from this mainly due to having a lower number of bones to update during animation. 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...
Guppy Posted January 30, 2014 Author Share Posted January 30, 2014 If it's an antiquated idea then please do elaborate on how you would solve this scenario with out heavy use of LOD; God sim type game where you may have in the 1000s of units on screen at any one time but still have possibility to zoom in on a few (or even one) - without LOD support you would have to use low poly models even when up close. even with instancing you need different LOD models: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch02.html or maybe I'm missing something here? Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
YouGroove Posted January 30, 2014 Share Posted January 30, 2014 Nope instancing is instancing and don't really need LOD if you don't want to put it. LOD Antique ? i don't think, heavily used in AAA today games , even Skyrim uses that for trees and characters , level stuff, more visible in Guild Wars 2 mmo where you can see appearence transition and LOD for level structures, plants etc ... All depens in your game, if small game or camera like Top down RPG, as you'll never see the entire scene , no need for LOD, if you go skyrim and other styles, yes LOD will matter a lot. The GPUGems have great articles, could that be put in LE3 ? http://http.developer.nvidia.com/GPUGems3/gpugems3_ch16.html Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Guppy Posted January 30, 2014 Author Share Posted January 30, 2014 Nope instancing is instancing and don't really need LOD if you don't want to put it. I think you misunderstood me - I mean that even if you tried solving the scenario I put forth with instancing you would have to use LOD in addition that that anyway because instancing in it self isn't enough. I did not mean that instancing requires LOD, hope that clears it up As for the shader in g3ch16 I dont see any reason why you couldn't put that in your LE3 project Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
gamecreator Posted January 30, 2014 Share Posted January 30, 2014 You guys may have missed this sentence: when I start adding features that improve large outdoor scenes, it will make sense then because of the scale of the scene. Sounds to me like it's coming at a later point. But again, it's not that hard to implement yourself, especially in god games where the zoom level automatically determines which LODs you should use. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 30, 2014 Share Posted January 30, 2014 LOD would certainly provide some savings in the example you mentioned, but that isn't typical of all games. I would expect this to be added some time this year, and in the meantime it's pretty straightforward to implement your own. 1 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...
Josh Posted January 30, 2014 Share Posted January 30, 2014 The other reason for this is that I want to implement something more optimal than just switching objects. I want to be able to go into the model editor and tag different surfaces and bones to only render and animate at a certain LOD level. That way you just keep one entity, and all your logic stays the same for it, and it contains all the LOD information for optimal performance. This is a lot better than swapping entities like we did in Leadwerks 2, and it makes life a lot easier for the programmer. 2 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 January 30, 2014 Share Posted January 30, 2014 tag different surfaces and bones to only render and animate at a certain LOD level That sounds pretty tedious though. Most of the models I buy have LOD's to them. Being able to define what model files are what LOD in the model editor for a specific model seems easier to me. I would prefer this setup over naming conventions myself. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 30, 2014 Share Posted January 30, 2014 Yes model editor, naming convention will only complicate workflow, specially when you type the wrong name. The best would be able to view LOD in the editor as you move camera from or near the character. Quote Stop toying and make games 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.