saindd Posted September 28, 2015 Share Posted September 28, 2015 Although the realtime lighting in T3D looks OK, it really shows some age compared to other open-source rendering engines like Ogre and Panda. This could be "easily" fixed by introducing lightmapping, instead of refactoring the engine into supporting a modern approach like PBR and realtime GI (as seen in Tesseract). Right now, i'm lightmapping my scenes in Blender. This has the disadvantage that i have to build all the scenes in Blender and export everything as a single mesh. And i can't use terrains. Is there any plans of adding a lightmapping solution to T3D? Maybe using an open-source offline rendering solution like:https://github.com/tunabrain/tungstenhttp://www.mitsuba-renderer.org/ Quote Link to comment Share on other sites More sharing options...
Azaezel Posted September 28, 2015 Share Posted September 28, 2015 For what it's worth, I'll simply note two things in case someone with the time wants to hop on the notion:1) Those .ml files spit out by basic lighting represent an extremely old version of lightmapping, so that might be a point to drill into.2) Head already supports lightmapping usage, (UV2) just not generation. (As does PBR. so not an either/or situation.) Quote Link to comment Share on other sites More sharing options...
saindd Posted September 29, 2015 Author Share Posted September 29, 2015 This? https://github.com/GarageGames/Torque3D/blob/c152ae86f3f09b3c1d736954b352723d274582f1/Engine/source/materials/materialDefinition.cpp#L225 Quote Link to comment Share on other sites More sharing options...
Azaezel Posted September 29, 2015 Share Posted September 29, 2015 https://github.com/GarageGames/Torque3D/blob/c152ae86f3f09b3c1d736954b352723d274582f1/Engine/source/materials/materialDefinition.cpp#L228 for the material entryhttps://github.com/GarageGames/Torque3D/blob/c152ae86f3f09b3c1d736954b352723d274582f1/Engine/source/T3D/levelInfo.cpp#L157 for flipping on the render target it draws to then blends in. (off by default in head) Quote Link to comment Share on other sites More sharing options...
saindd Posted September 29, 2015 Author Share Posted September 29, 2015 Each individual material has a lightmap entry? That seems odd. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted September 29, 2015 Share Posted September 29, 2015 Extremely. But that is apparently what http://www.garagegames.com/products/purelight plugs into, so a bit hesitant to do much beyond ensuring that the sample @Steve_Yorkshire was kind enough to throw my way to make sure that end didn't break, what with all the other little things on the present personal plate. Quote Link to comment Share on other sites More sharing options...
saindd Posted May 16, 2016 Author Share Posted May 16, 2016 No ideas on how to plugin Blender lightmapping into this? Would be really useful to understand how Torque handles lightmaps from external tools. Quote Link to comment Share on other sites More sharing options...
ThomasPittman Posted May 20, 2016 Share Posted May 20, 2016 You should be able to put the lightmaps that you generate yourself from Blender into the same material lightmap slots. There's no support currently for generating UV2's or baking lightmaps directly inside of Torque3D. We had planned once on integrating pureLIGHT directly into the Torque3D editor but those talks fell apart years ago.I don't remember all the details of how the Torque3D lightmapping works, its been many years since I last looked at it. There were flags to indicate which lights were included in the lightmaps to avoid double-lighting meshes. I don't know if much has changed since then.I did experiment once with changing the way Torque3D internally stores its lightmaps. It wasn't too hard to make them assignable per mesh and point them at a part of a larger lightmap atlas instead of a separate texture like it currently requires. I believe I still have the code for doing that kicking around on my computer, though that would have been for a version of Torque3D many years old by now. Quote Link to comment Share on other sites More sharing options...
Duion Posted May 20, 2016 Share Posted May 20, 2016 So Torque had internal lightmapping support once? Quote Link to comment Share on other sites More sharing options...
Azaezel Posted May 21, 2016 Share Posted May 21, 2016 (edited) @ThomasPittmanNot breaking purelight was one of the self-set priorities this end when doin the work thusfar (I wasn't about to be the one to tell folks they blew 500 bucks on nothing with no alternate), so hasn't been much change there. The render target in the backend's been bumped up a from a floating 2nd to a (once we get pbr in) fixed 3rd, and cubemaps assigned to mats on the pbr end multiply into em, but the secondary UV lookup, represented in lightmap ect ect are all still there. Even kept around the hooks for the basic lighting partial lightmapping generators (though don't believe those .ml *results* have been hooked up for quite a while now). By all means, knock yourself out, Edited May 21, 2016 by Azaezel Quote Link to comment Share on other sites More sharing options...
JeffR Posted June 6, 2016 Share Posted June 6, 2016 You should be able to put the lightmaps that you generate yourself from Blender into the same material lightmap slots. There's no support currently for generating UV2's or baking lightmaps directly inside of Torque3D. We had planned once on integrating pureLIGHT directly into the Torque3D editor but those talks fell apart years ago.I don't remember all the details of how the Torque3D lightmapping works, its been many years since I last looked at it. There were flags to indicate which lights were included in the lightmaps to avoid double-lighting meshes. I don't know if much has changed since then.I did experiment once with changing the way Torque3D internally stores its lightmaps. It wasn't too hard to make them assignable per mesh and point them at a part of a larger lightmap atlas instead of a separate texture like it currently requires. I believe I still have the code for doing that kicking around on my computer, though that would have been for a version of Torque3D many years old by now. If you've still got the code, I wouldn't at all mind having a gander at it. I've been mulling on getting baked lighting back into the fold for 4.0-ish, so anything that'd jumpstart on that would be incredibly useful. 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.