therealmjp / bakinglab Goto Github PK
View Code? Open in Web Editor NEWA D3D11 application for experimenting with Spherical Gaussian lightmaps
License: MIT License
A D3D11 application for experimenting with Spherical Gaussian lightmaps
License: MIT License
Dear Guru(s),
Thank you very much for the great effort.
I have a question. I request you to help. Sorry for asking my question as a "issue". I could not find any option in github to post a message to you.
I have been looking for a library which generates shadow map images (Image Based Lighting) for each mesh of my scene. (2nd UV channel). I mean, when we bake lighting of a scene in 3D editors like Blender/Maya/3ds max, it generates lightmap images which contain shadow information. I want to generate the same images programatically without using any such 3d editors. I have attached a a sample image to this post.
Is it possible to achieve the same with BakingLab? If not possible, do you know any such library which is free/opensource?
I have seen many Path-Tracing/Ray-Tracing libraries but they all are rendering the complete scene without giving a clue how to generate those images. I have been struggling for more than 2 months.
I have a request too.
It will be great if BakingLab is split into two parts - Core and UI so that the core library can be used in any other application.
Awaiting your reply.
Thanks in advance.
Hi! first of all thanks for sharing this amazing work.
I was playing with the SH functions and i think there is a mistake:
In the ProjectOntoSH4 and ProjectOntoSH9 the negative sign is missing in the 1 / 3 / 5 / 7 coefficient.
I think it should be:
SH9 ProjectOntoSH9( const float3& dir ) {
SH9 sh;
// Band 0
sh.Coefficients[0] = 0.282095f;
// Band 1
sh.Coefficients[1] = -0.488603f * dir.y;
sh.Coefficients[2] = 0.488603f * dir.z;
sh.Coefficients[3] = -0.488603f * dir.x;
// Band 2
sh.Coefficients[4] = 1.092548f * dir.x * dir.y;
sh.Coefficients[5] = -1.092548f * dir.y * dir.z;
sh.Coefficients[6] = 0.315392f * (3.0f * dir.z * dir.z-1.0f);
sh.Coefficients[7] = -1.092548f * dir.x * dir.z;
sh.Coefficients[8] = 0.546274f * (dir.x * dir.x-dir.y * dir.y);
return sh;
}
( see "Stupid Spherical Harmonics (SH) Tricks / Appendix A1 Polynomial Forms of SH Basis " )
Regards
Question.
After playing around with BakingLab i am asking myself if Blender Cycles as Path Tracer for baking LightmapSG s and Blender EEVEE for fully show off would be working?
A fan.
Would it be possible for you modify the code that it's compilable with older Visual Studio editions?
When I set the Platform Toolset to v120 (VS 2013) and try go compile the BakingLab, i only get a handful of issues:
1>DirectXTex.lib(DirectXTexUtil.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexImage.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexDDS.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexWIC.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexD3D11.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexConvert.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2005: "public: __cdecl std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QEAA@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2005: "public: __cdecl std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QEAA@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2005: "public: struct std::_Iterator_base12 * * __cdecl std::_Container_base12::_Getpfirst(void)const " (?_Getpfirst@_Container_base12@std@@QEBAPEAPEAU_Iterator_base12@2@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2005: "public: void __cdecl std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QEAAXXZ) already defined in msvcprtd.lib(MSVCP120D.dll)
1>DirectXTex.lib(DirectXTexCompress.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(BC.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(BC4BC5.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(BC6HBC7.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in App.obj
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo
1>DirectXTex.lib(DirectXTexImage.obj) : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo
1>DirectXTex.lib(DirectXTexDDS.obj) : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo
1>DirectXTex.lib(DirectXTexD3D11.obj) : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo
1>DirectXTex.lib(DirectXTexConvert.obj) : error LNK2001: unresolved external symbol __imp__invalid_parameter_noinfo
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2019: unresolved external symbol "void __cdecl `eh vector constructor iterator'(void *,unsigned __int64,unsigned __int64,void (__cdecl*)(void *),void (__cdecl*)(void *))" (??_L@YAXPEAX_K1P6AX0@Z2@Z) referenced in function "long __cdecl DirectX::_Generate2DMipsTriangleFilter(unsigned __int64,unsigned long,class DirectX::ScratchImage const &,unsigned __int64)" (?_Generate2DMipsTriangleFilter@DirectX@@YAJ_KKAEBVScratchImage@1@0@Z)
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2019: unresolved external symbol "void __cdecl `eh vector destructor iterator'(void *,unsigned __int64,unsigned __int64,void (__cdecl*)(void *))" (??_M@YAXPEAX_K1P6AX0@Z@Z) referenced in function "public: void * __cdecl DirectX::TriangleFilter::TriangleRow::`vector deleting destructor'(unsigned int)" (??_ETriangleRow@TriangleFilter@DirectX@@QEAAPEAXI@Z)
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *,unsigned __int64)" (??3@YAXPEAX_K@Z) referenced in function "public: void __cdecl std::default_delete<struct DirectX::TriangleFilter::Filter>::operator()(struct DirectX::TriangleFilter::Filter *)const " (??R?$default_delete@UFilter@TriangleFilter@DirectX@@@std@@QEBAXPEAUFilter@TriangleFilter@DirectX@@@Z)
1>DirectXTex.lib(DirectXTexMipMaps.obj) : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *,unsigned __int64)" (??_V@YAXPEAX_K@Z) referenced in function "public: void * __cdecl DirectX::TriangleFilter::TriangleRow::`vector deleting destructor'(unsigned int)" (??_ETriangleRow@TriangleFilter@DirectX@@QEAAPEAXI@Z)
1>X:\BakingLab-master\BakingLab\Debug\x64\BakingLab.exe : fatal error LNK1120: 5 unresolved externals
1>
1>Build FAILED.
1>
If I understand correctly, since most of this looks like it's coming from DirectXTex.lib, recompiling DirectXTex with Platform Toolset v120 would possibly be all that is required.
This would allow for a broader range of people interested in this project to tinker with the code, and should not hinder VS 2015 users in any way.
Hi, I realize this is under the MIT license, but I would consider it rude of myself not to contact you and let you know that I wish to use this as the base of a beginner's game engine? Your code makes it so much easier for me to understand how things work. It would be used in a free game.
Also: I noticed that the SampleFramework version seems to change from project to project. Which version is the "best"? I notice that not all versions come with a version number, so I'm slightly confused.
Thank you for your time.
Hi,
I've really enjoyed reading your blog posts about spherical gaussians and learning more about radiosity lightmaps. Is there any sample code in the baking lab that would illustrate how to light dynamic meshes? Thanks!
Hi, I was wondering about this line:
BakingLab/BakingLab/ToneMapping.hlsl
Line 105 in 1a04311
1.8f
is probably an exposure tweak. But should it be applied to the HDR value instead: output = LinearTosRGB(ACESFitted(color * 1.8f));
?A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.