• Content Count

  • Joined

  • Last visited

1 Follower

About chloridrik

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm sorry but I continue to have the same problem on this scene :
  2. All unity lights are mixed and I don't use other lights in babylonjs, it's just the preview automaticaly gerenated.
  3. Yeah, now it's working, but to do that I duplicate the material of objects using backed lightmap and by doing that I duplicate drawcalls. I don't know how it work on babylonjs but lightmap scale and offset should not be set by material. What do you think ? babylonPbrMaterial.lightmapTexture.uScale = lightmapScaleOffset.x; babylonPbrMaterial.lightmapTexture.vScale = lightmapScaleOffset.y; babylonPbrMaterial.lightmapTexture.uOffset = lightmapScaleOffset.z; babylonPbrMaterial.lightmapTexture.vOffset = lightmapScaleOffset.w; babylonjs on the left, and Unity3d on the right
  4. Today I have fixed a bug with 2 materials with the same name in 2 different folders. Now I'm working on shadowmap bug with the same material used many times.
  5. The bug is when you have the same material on differents objects
  6. After reflection, it's maybe because it's a same mesh many times, but with different UV2 ? If it's that, you need to check if the game object has lightmap static checked and if export lightmaps is checked in babylonjs toolkit. What do you think ? I can investigate on if you want.
  7. thank you @MackeyK24 it's better with my single directional light in mixed. I have tested with Coordinates Index 0 and 1, but the result is very different than the unity lightmapping. If you want you can test with this free scene :!/content/65679 I have fixed a bug in the exporter to export this scene : thx, Jeremie.
  8. I don't know why I have this problem with backed lights
  9. Hi, It's a very good job and I want to help you. I have opened a pull request :
  10. ok I have found the problem, it's because in SceneBuilder.Meshes.cs in ConvertUnityMeshToBabylon you use as key in multiMatDictionary. But I see the is the name of the first material... In this case the model is not realy optimized and have many multi-material starting with the same first material. To solve that, I concatain all sub materials names in a key : string key = ""; for (int i = 0; i < renderer.sharedMaterials.Length; i++) { key+=renderer.sharedMaterials[i].name; } if (!multiMatDictionary.ContainsKey(key)) { bMultiMat = new BabylonMultiMaterial { materials = new string[mesh.subMeshCount], id = Guid.NewGuid().ToString(), name = key// }; for (int i = 0; i < renderer.sharedMaterials.Length; i++) { var sharedMaterial = renderer.sharedMaterials[i]; BabylonMaterial babylonMaterial; babylonMaterial = DumpMaterial(sharedMaterial, renderer.lightmapIndex, renderer.lightmapScaleOffset); bMultiMat.materials[i] =; } if (mesh.subMeshCount > 1) { multiMatDictionary.Add(, bMultiMat); } } else { bMultiMat = multiMatDictionary[key]; }
  11. I know it's just the beginning of the new unity exporter and I would like contribute too. I have a bug with this car model (with the fbx version) I'm watching for this problem.
  12. @Deltakosh I have tested with this version in my first post and I can't see backed light. all is black
  13. I have found the problem with the cars models. It was because the car_glass material use "UIMask" texture lol not a real texture file ^^ I meet an other problem in this scene :!/content/65679 and I have solved it by adding in Tools.cs line 1031 : if(!mesh) return; I don't know why a mesh is null in this scene... @Deltakosh I test the new exporter now :-)
  14. Hi, I'm using Unity 5.5.0 f3 and I have many bugs with the exporter. #1 : backed lightmap : - I have started a new scene with a plan, box, directional light and a camera. - My light use backed light only - My meshes use static lightmap - one standard material for my objects with a texture - In the exporter window I have checked "export lightmap", synchronous backing enabled, embed shader files. ==> but all my objects are black in the babylonjs preview when I use backed light. #2 : objects export : - I have tested with this model :!/content/61925 and when I export I have this message : FileNotFoundException: Resources/unity_builtin_extra does not exist System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:107) BabylonExport.Entities.BabylonScene.AddTexture (System.String texture) Unity3D2Babylon.SceneBuilder.CopyTexture (System.String texturePath, UnityEngine.Texture2D texture2D, BabylonExport.Entities.BabylonTexture babylonTexture, Boolean isLightmap) (at Assets/Babylon/Source/SceneBuilder.Materials.cs:274) Unity3D2Babylon.SceneBuilder.DumpTexture (UnityEngine.Texture texture, UnityEngine.Material material, System.String name, Boolean isLightmap) (at Assets/Babylon/Source/SceneBuilder.Materials.cs:1060) Unity3D2Babylon.SceneBuilder.DumpTextureFromMaterial (UnityEngine.Material material, System.String name) (at Assets/Babylon/Source/SceneBuilder.Materials.cs:1032) Unity3D2Babylon.SceneBuilder.DumpPBRMaterial (UnityEngine.Material material, Int32 lightmapIndex, Vector4 lightmapScaleOffset, Boolean metallic, Int32 lightmapCoordIndex) (at Assets/Babylon/Source/SceneBuilder.Materials.cs:480) Unity3D2Babylon.SceneBuilder.DumpMaterial (UnityEngine.Material material, Int32 lightmapIndex, Vector4 lightmapScaleOffset, Int32 lightmapCoordIndex) (at Assets/Babylon/Source/SceneBuilder.Materials.cs:304) Unity3D2Babylon.SceneBuilder.ConvertUnityMeshToBabylon (UnityEngine.Mesh mesh, UnityEngine.Transform transform, UnityEngine.GameObject gameObject, Single progress, UnityEditor.UnityMetaData& metaData, System.Collections.Generic.List`1& particleSystems, System.Collections.Generic.List`1& lensFlares, System.String& componentTags, BabylonExport.Entities.BabylonMesh collisionMesh, UnityEngine.Collider collider) (at Assets/Babylon/Source/SceneBuilder.Meshes.cs:345) Unity3D2Babylon.SceneBuilder.ConvertFromUnity () (at Assets/Babylon/Source/SceneBuilder.cs:597) UnityEngine.Debug:LogException(Exception) Unity3D2Babylon.SceneBuilder:ConvertFromUnity() (at Assets/Babylon/Source/SceneBuilder.cs:806) Unity3D2Babylon.ExporterWindow:Export(Boolean) (at Assets/Babylon/Source/ExporterWindow.cs:736) Unity3D2Babylon.ExporterWindow:OnGUI() (at Assets/Babylon/Source/ExporterWindow.cs:573) UnityEditor.DockArea:OnGUI() I have the latest version of today, I have updated the plugin to 2.5 version. Can you help me to understand please ? Best regards, Jeremie.