• Content Count

  • Joined

  • Last visited

About KevinK

  • Rank

Recent Profile Visitors

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

  1. That was it, Thank you!
  2. I have a file that I exported from Blender. As you can see it is not displaying correctly. The image below is glb file dropped into Babylon Sandbox. I used Blender and Sandbox as a test as I am getting similar results with my Babylon project . Why I am confused, is the original file data imported into my Babylon project was from a obj file. When Imported the scene looks good. However when I export the data using BABYLON.GLTF2Export.GLBAsync and load back in using BABYLON.SceneLoader.Async I get the same result as the Babylon Sandbox. ( the intend is to be able to save either a obj or gltf file format as glb to a database and load back in as a glb ) It appears that the z scale could be reversed, but I don't see where. The scene is using RightHandSystem == true; Additional info, It appears fine when I loaded glb file into paint3D and also within a Threejs viewer. I don't have this issue with all files. Thanks
  3. Additional info, If I Use the same appendSync function with obj files it works fine. Also, if I use a directional light, the box is still dark. If I use a hemi-light, the colors and material appear.
  4. I am having problems with meshes and lighting when importing (appending ) glb files into a scene. I Use BABYLON.SceneLoader.AppendSync( "file:", sceneFile, scene, ...... ). The image below has a box on the left that has been appended to scene, and a box on the right that was created directly to the scene. The one on the right is being lit properly by the spot light. The one on the left is not. It is hard to tell but the box appended to the scene appears to have the normals reversed. The appended box has the parent "__root__" node. The scene is set to useRighthandSystem == true, If I change the scene to UseRighthandSystem == false after import, the left box normal's are reversed, but still do not get lit by spotlight. Any thoughts I why I cannot get the appended glb file to light( show) properly. Thanks,
  5. I am wondering with the current implementation of skyMaterial is there a way to properly orient the material when a scene is oriented with Z axis up. rotating the Box does not work. Thanks
  6. The version was typescript 2.8 I went back to 2.7.2 and it compiles
  7. node_modules/babylonjs/babylon.d.ts (299,5): All declarations of 'hasOrientation' must have identical modifiers. "babylonjs": "^3.2.0-beta.4", "babylonjs-gltf2interface": "^3.2.0-beta.4", "babylonjs-loaders": "^3.2.0-beta.4", "babylonjs-materials": "^3.2.0-beta.4", "babylonjs-serializers": "^3.2.0-beta.4",
  8. Solved my issue by supplying the ".obj" plugin extension importmesh
  9. I am getting the following errors when calling ImportMesh. BJS - [14:34:00]: Unable to import meshes from data:# Blender v2.79 (sub 0) OBJ File: '' : importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse I am using beta 1 version of Babylon and loaders because of babylonjs.loaders.module.d.ts with 3.2.0-beta.3 reported Following code give me the error import * as BABYLON from 'babylonjs'; import 'babylonjs-loaders'; uploadSaveFiles(files: File[]) {, i) => { let reader = new FileReader(); if (isImage(file)) { reader.readAsDataURL(file); } else if (isObj(file)) { reader.readAsText(file); } else if (isMtl(file)) { reader.readAsText(file); } else { console.log("File not supported!"); } let data = reader.result; if( isObj(file)) { BABYLON.SceneLoader.ImportMesh("", "", 'data:' + data, scene, function (meshes: BABYLON.AbstractMesh[]) { meshes.forEach((mesh) => { console.log(mesh); }); }); } } } I am trying to load a Obj file from disk. The obj file has accompanying mtl and images files. I currently have a interface where the user drags and drops all appropriate files. Not sure if this is the best way. Do the accompanying files need to be in uploaded first before I can load obj file? If there is a better way to upload obj and material files let me know Thanks