Flomotion Posted September 28, 2015 Share Posted September 28, 2015 Is it possible to have 2 uv maps. One for a light map and one for the texture?I've looked for the answer.. but can't find it.And if it is possible (which I think/hope) how to use it?thanks! Quote Link to comment Share on other sites More sharing options...
davrous Posted September 28, 2015 Share Posted September 28, 2015 Yes we have 2 uvs maps supported. Set the uv2 array on the mesh and set the texture on coordinatesIndex = 1.We've really recently added a lightmap texture property to better support Unity lightmap for our Babylon.js exporter. We will have finish a draft version by the of this week.David Quote Link to comment Share on other sites More sharing options...
Flomotion Posted September 28, 2015 Author Share Posted September 28, 2015 thank you. BabylonJS is amazing!I know how to set the coordinatesIndex.But I'm not sure how to set the uv2 array on the mesh.My model is from 3D max (actually from cinema 4D through max). But maybe I should go and use Unity as an inbetween step :-)Yet, I prefer to create the lightmap from Cinema 4D. It gives me more control. Could you give a small codesnippet how to set that uv2 array? (I did look again before asking):-) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 28, 2015 Share Posted September 28, 2015 Hello 3dsmax exporter will automatically export uv1 and uv2 from 3DSMax. So if your object has 2 textures channels in 3dsmax, it will have the same once exported to babylon You can then specify diffuse texture (with coordinates index =0) and use the ambient texture slot (with coordinates index = 1) for the lightmap. Nothing to do on babylon.js side, everything will be automatically imported Quote Link to comment Share on other sites More sharing options...
Flomotion Posted September 29, 2015 Author Share Posted September 29, 2015 AH, nice and easy.Merci beaucoup! Quote Link to comment Share on other sites More sharing options...
steven_EXC Posted March 11, 2016 Share Posted March 11, 2016 Hey guys! I'm trying to understand the workflow from Unity to Babylon using the provided exporter. Everything seems to look fine except for the lightmaps. They don't seem to be coming over. Is lightmapping something that the exporter is supposed to support now? If not, how would I go about supplying the correct information to the exporter so that my Unity lightmaps come over into babylon? Is there anything special I need to do to get the second set of UVs that Unity generates for lightmaps over into babylon? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 Not really:) We started supporting it but it is not done yet THe best idea to make it works now with bjs is to export your lightmaps as regular textures and reapply them using uv2 (And if you are a good C# developer, we desperately looking for help in this area :)) Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted March 11, 2016 Share Posted March 11, 2016 i think uv2 don't work in some browsers (chrome maybe )check i have alternative solution but it is not uv2 just can solve with material stuff is that serious need know about your problem you can make few plan Uv with out have any uv map also you can make CubeUV and CylinderUV too i know need complete ShaderBulder in BJS Before Share any solution (with that) in here But when i see a post i cant stop myself for replay sorry about that http://babylonjs-playground.com/#1NDRAR#14 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 uv2 works everywhere. They are not using something fancy. NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 11, 2016 Share Posted March 11, 2016 There are actually up 6 UV maps per mesh. Since BJS 2.3, when parsing was re-factored, more than 2 would be loaded if they were found in a .babylon file. I have not changed Blender exporters to do send more than 2 though. 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.