pco38 Posted June 3, 2016 Share Posted June 3, 2016 Hello, Is somebody can explains me the setting I need to use (in 'Render to Texture' popup) to generate LightMaps with 3DSMax for Babylon.js? I done a lot of test and the result when the model is exported for Babylon is a black screen... Thanks for your help. Regards Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 3, 2016 Share Posted June 3, 2016 In 3dsmax you just have to put your lightmap in the ambiant channel or lightmap channel (depends whats your want) of your (standard) material. You can use UV1 or UV2. Then, export to babylonjs, and it should be works. As for the render to texture popup, settings depends only of your render engine. It only generates a texture map. I don't use the option which create shell material, maybe your issue come from here ? Quote Link to comment Share on other sites More sharing options...
pco38 Posted June 3, 2016 Author Share Posted June 3, 2016 It's exactly wath Idone, but It doesn't work with my model... Black screen in Babylon... You can see the options I used in attached picture (sorry it's in French) Thanks Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 3, 2016 Share Posted June 3, 2016 There is no reason that the issue comes from the RTT, this tool is just 3dsmax internal. Is your scene works without lightmap ? Have you try to set a lightmap via javascript, just to test ? Here an example if you want (here, the lightmap will use UV1 by default, but we don't care at this time) : scene.getMeshByName("yourMeshName").material.ambientTexture = new BABYLON.Texture("yourLightmap.png", scene); Quote Link to comment Share on other sites More sharing options...
pco38 Posted June 3, 2016 Author Share Posted June 3, 2016 Yes my scene works fine without LightMap... I tried to attach some lightmap manually in Javascript and it works fine... Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 3, 2016 Share Posted June 3, 2016 And with a default material assign to your object, configured like this ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2016 Share Posted June 3, 2016 can you share your scene? your .babylon file Quote Link to comment Share on other sites More sharing options...
pco38 Posted June 3, 2016 Author Share Posted June 3, 2016 Sorry I come back... Find in attachment of this post the babylon file without LightMap that works fine In the next post the model with LightMap that doesn't work Model_without_LightMap_WORK.zip Quote Link to comment Share on other sites More sharing options...
pco38 Posted June 3, 2016 Author Share Posted June 3, 2016 the model with LightMap that doesn't work It's strange because the size of the babylon file is smaller... Model_with_LightMap_NOT_WORK.zip Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2016 Share Posted June 3, 2016 woot:) do you mind just exporting a plane, a light, a camera and your lighmap applied to the plane? Quote Link to comment Share on other sites More sharing options...
pco38 Posted June 3, 2016 Author Share Posted June 3, 2016 Yes of course ;-) In attachment a Zip with 2 smalls models (the first on without LightMap and the second generated with lightMap) and the 2 3dsmax source files... Thanks for your help Model.zip Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2016 Share Posted June 3, 2016 I think there is something else: your testWithLightmap.babylon contains two meshes with 0 vertices NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted June 6, 2016 Share Posted June 6, 2016 in the RTT, don't create shell material reassign the right material in this material, set the ambient color to whatever except black maybe set the scene ambient color too create a camera and it should works : Quote Link to comment Share on other sites More sharing options...
pco38 Posted June 6, 2016 Author Share Posted June 6, 2016 Thank you V!nc3r for your. I followed your instrutions and now it works fine. Thank you very much 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.