freetoplay

Members
  • Content Count

    63
  • Joined

  • Last visited

About freetoplay

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. freetoplay

    Babylon.js Team Blog

    I personally really like the blog posts. As for content, maybe you guys can write about little known, but potentially useful features and maybe some simple game development tutorial using BabylonJS, which would be awesome for beginners like me!
  2. freetoplay

    Question about isVisible

    Does this mean that I shouldn't have a lot of hidden meshes? Is there a way to measure how much memory an invisible mesh is consuming?
  3. freetoplay

    Question about isVisible

    If I make meshes invisible in the scene, does it have any impact on the performance of the scene? For example, if I have a several slow performing meshes in the scene, would making them invisible increase the performance of my scene? I want to make some meshes visible in only certain cases, but I don't know if making them invisible would do the trick or would I have to dispose to them, then reimport them?
  4. freetoplay

    Tag Issue

    Hi, I am getting an error when I try to loop through checking for tags. In my code, I have: let oldMesh = scene.meshes; for (let i=1; i < oldMesh.length; i++) { BABYLON.Tags.EnableFor(oldMesh[i]); } oldMesh[3].addTags("test"); Inside my importMesh function, I have: BABYLON.SceneLoader.ImportMesh(null, "/assets/", "test.glb", scene, function (meshes, particleSystems, skeletons) { meshes[0].position.y += 1; for (let i=1; i < oldMesh.length; i++) { console.log(oldMesh[i]); // this works fine console.log(oldMesh[i].hasTags()); // this throws an error } }); Does anyone know know why the hasTags function is throwing an error in the loop?
  5. freetoplay

    Fitting Objects Question

    The issue here is I don't have control over that. The users has the ability to choose any hair and hood combination in this case, so I am trying to figure out if there is a solution where it would work with any hood and hair combination.
  6. freetoplay

    Fitting Objects Question

    How would you approach a customized avatar problem where a user is able to customize their avatar by swapping out meshes, but when they do this, it can cause other meshes to poke through? For example, if a character has long hair and a hood mesh is put on the avatar, is there a way to fit the hair inside of the avatar without having it poked through? If not, are there other approaches that I could take? Right now, we created a "bump" in the hood to give the hair space, but that doesn't look like a pretty solution, so I am interested in hearing other potential solutions.
  7. freetoplay

    Positioning Loading Screen

    Hmm, so after playing around with this for awhile, I have not been able to set the positioning of the loading screen or disable it. I have been unable to get the id of the CSS, possibly because I am loading the scenes within a Vue component, what should I do in this case? My code looks something like this to create the scene canvas: <template> <canvas ref="canvas" class="canvas" :style="{height: height, width: width, outline: none, display: 'block'}"></canvas> </template> <script lang="ts"> export interface ISceneArgs { engine: BABYLON.Engine; scene: BABYLON.Scene; canvas: HTMLCanvasElement; } export default { name: "SceneComponent", data: function() { return { engine: null, scene: null }; }, props: { onSceneMount: { type: Function, required: true }, height: { type: String, default: "100%" }, width: { type: String, default: "100%" } }, mounted() { this.setupScene(); }, methods: { setupScene() { const canvas = this.$refs.canvas as HTMLCanvasElement; this.engine = new BABYLON.Engine( canvas, true, { preserveDrawingBuffer: true }, false ); const scene = new BABYLON.Scene(this.engine); this.scene = scene; this.onSceneMount({ scene: this.scene, engine: this.engine, canvas: this.$refs.canvas }); } }, beforeDestroy() { window.removeEventListener("resize", this.handleResize); } }; </script>
  8. freetoplay

    Typescript Linting Errors

    A basic code like this will throw an error in the linter: scene.activeCamera.alpha += Math.PI; My tsconfig file looks like this: { "compilerOptions": { "target": "es5", "module": "esnext", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "sourceMap": true, "noImplicitAny": true, "removeComments": true, "preserveConstEnums": true, "baseUrl": ".", "lib": ["es2015", "dom"], "types": ["node", "jest", "babylonjs"], "paths": { "@/*": ["src/*"] } }, "include": ["src/**/*.ts", "src/**/*.vue", "tests/**/*.ts"], "exclude": ["node_modules"] }
  9. freetoplay

    Typescript Linting Errors

    When I use BabylonJS with the TSLinter, I keep getting errors like: Property 'alpha' does not exist on type 'Camera'. How do I fix these linting errors?
  10. Using the 3D Studio Max Exporter, I still get a missing Node warning, not sure if this is related to the exporter or not? { "uri": "Character.glb", "mimeType": "model/gltf+json", "validatorVersion": "2.0.0-dev.2.5", "validatedAt": "2018-10-23T16:17:15.774Z", "issues": { "numErrors": 0, "numWarnings": 0, "numInfos": 1, "numHints": 0, "messages": [ { "code": "NODE_EMPTY", "message": "Empty node encountered.", "severity": 2, "pointer": "/nodes/6" } ], "truncated": false }, "info": { "version": "2.0", "generator": "babylon.js glTF exporter for 3ds max 2017 v1.3.4", "extensionsUsed": [ "KHR_materials_unlit" ], "resources": [ { "pointer": "/buffers/0", "mimeType": "application/gltf-buffer", "storage": null }, { "pointer": "/images/0", "mimeType": null, "storage": "bufferView" }, { "pointer": "/images/1", "mimeType": null, "storage": "bufferView" }, { "pointer": "/images/2", "mimeType": null, "storage": "bufferView" } ], "hasAnimations": false, "hasMaterials": true, "hasMorphTargets": false, "hasSkins": false, "hasTextures": true, "hasDefaultScene": true, "primitivesCount": 6, "maxAttributesUsed": 3 } } It seems like a default light mesh is added by default for some reason.
  11. freetoplay

    Updating Exporter

    It turns out he forgot to unblock the dlls, so now it works!
  12. This is a question coming from an artist that I am working with. He is using the 3D Studio Max version and he downloaded the zip version from Github, but it's not updating him to the 1.3.1 version, instead he seems stuck on version 1.2.4. Is there something else that he is suppose to be doing besides just downloading and running the code inside of the .zip file?
  13. freetoplay

    glTF Validation Error

    I am getting glTF validation error when I export with unlit materials. Here is what the error looks like when I load it into the BabylonJS sandbox: { "uri": "Character.glb", "mimeType": "model/gltf+json", "validatorVersion": "2.0.0-dev.2.5", "validatedAt": "2018-10-09T01:41:05.107Z", "issues": { "numErrors": 8, "numWarnings": 1, "numInfos": 1, "numHints": 0, "messages": [ { "code": "UNSUPPORTED_EXTENSION", "message": "Unsupported extension encountered: 'KHR_lights'.", "severity": 1, "pointer": "/extensionsUsed/0" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/0/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/1/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/2/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/3/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/4/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/5/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/6/extensions/KHR_materials_unlit" }, { "code": "UNDECLARED_EXTENSION", "message": "Extension was not declared in extensionsUsed.", "severity": 0, "pointer": "/materials/7/extensions/KHR_materials_unlit" }, { "code": "NODE_EMPTY", "message": "Empty node encountered.", "severity": 2, "pointer": "/nodes/9" } ], "truncated": false }, "info": { "version": "2.0", "generator": "babylon.js glTF exporter for 3ds max 2017 v1.2.40", "extensionsUsed": [ "KHR_lights" ], "resources": [ { "pointer": "/buffers/0", "mimeType": "application/gltf-buffer", "storage": null }, { "pointer": "/images/0", "mimeType": null, "storage": "bufferView" }, { "pointer": "/images/1", "mimeType": null, "storage": "bufferView" }, { "pointer": "/images/2", "mimeType": null, "storage": "bufferView" }, { "pointer": "/images/3", "mimeType": null, "storage": "bufferView" } ], "hasAnimations": false, "hasMaterials": true, "hasMorphTargets": false, "hasSkins": false, "hasTextures": true, "hasDefaultScene": true, "primitivesCount": 9, "maxAttributesUsed": 3 } Does anyone know what's going on?
  14. freetoplay

    Changing the colors of an eye

    @Mark Bufton thanks a lot for the help! I have some questions to see if I can understand this properly. It appears that you created a mesh for just the eyes (the whites of the eyes), then created a mesh for the iris with the alpha value set to true? Also, since this seems to require adding an extra mesh and texture, is it worth it vs just swapping out texture (this is for a game that allows users to customize their character's eye colors)?
  15. freetoplay

    Swapping texture issue

    Update: The texture issue was caused by inversion. To prevent this change the code to: scene.meshes[2]´╗┐.material´╗┐.albedoTexture = new BABYLON.Texture("eye2.png", scene, true, false);