pco38 Posted May 26, 2015 Share Posted May 26, 2015 Hi, Is somebody know where I could find an example of code that explain how to use light maps with babylon? Thanks for your help... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 26, 2015 Share Posted May 26, 2015 Lights maps have to be generated by any DCC tool (3dsmax, blender, unity, etc..)once you have a light map, you can use it like any other texture. Just use it on this slot: material.ambientTexture = lightMapTexture Quote Link to comment Share on other sites More sharing options...
pco38 Posted May 26, 2015 Author Share Posted May 26, 2015 I tried this option, but it does'nt work... The result was a black object...I have generated my light map from 3ds.I need to put simultaneously the standard texture on the slot diffusetexture and the light map on the slot ambienttexture, or only the light map? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 26, 2015 Share Posted May 26, 2015 Both and you need a light as well. If you don't want to use a light put your standard texture in the emissiveTexture channel Quote Link to comment Share on other sites More sharing options...
pco38 Posted May 27, 2015 Author Share Posted May 27, 2015 Ok, thanks for your help.Regards Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 27, 2015 Share Posted May 27, 2015 Like this: http://www.babylonjs-playground.com/#1MFDDU Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted December 15, 2016 Share Posted December 15, 2016 @Deltakosh AmbientTexture Or LightmapTexture ... For light maps ... Whats the deal with these two properties... I am trying to make totally emissive with no lights (except for maybe an ambient light for now) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 15, 2016 Share Posted December 15, 2016 So use either EmissiveTexture (additive) or LightMapTexture (multiplicative) Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted December 15, 2016 Share Posted December 15, 2016 7 hours ago, Deltakosh said: So use either EmissiveTexture (additive) or LightMapTexture (multiplicative) Wow... I'm still not sure about this @Deltakosh ... Here is says EITHER emissiveTexture OR lightmapTexture But you said the steps are EXACTLY correct BUT I'm using BOTH emissiveTexture and lightmapTexture: So for FULLY BAKED lighting with STANDARD material: 1... DO NOT SET diffuseTexture at all 2... SET diffuse color to white and specular color to black 3... SET main texture and main color to emissiveTexture AND emissive color (instead of diffuseTexture and diffuse color) 4... SET lightmapTexture to my unity produced lightmap.jpg 5... SET useLightmapAsShadowmap to false IS THE EXACTLY CORRECT.. IF not please alter the steps above SO MANY OPTIONS... I just wanna do some full light baking and i don't know which right... at least well enough so i can add to the toolkit for everyone to use... And my toolkit is not right Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 16, 2016 Share Posted December 16, 2016 THIS IS FULLY CORRECT! Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted December 16, 2016 Share Posted December 16, 2016 @Deltakosh I don't think this is right.... Appeartly 5... SET useLightmapAsShadowmap to false is wrong it should be true... From my testing.... This should ALWAY be true if you use a lightmap... I thought it should be false because i was using emissive... BUT i guess it should always be true if using lightmapTexture... And This: "So use either EmissiveTexture (additive) or LightMapTexture (multiplicative)" HOW CAN THIS BE TRUE... I am using BOTH emissiveTexture and a lightmapTexture at the same time... but you say "either or" Oh YEAH AND... What is the Specular set to black equivalent when using PBR Material instead of Standard material??? MrVR 1 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.