freetoplay

Members
  • Content Count

    59
  • 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

    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.
  2. 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.
  3. 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>
  4. 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"] }
  5. 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?
  6. 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.
  7. freetoplay

    Updating Exporter

    It turns out he forgot to unblock the dlls, so now it works!
  8. 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?
  9. 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?
  10. 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)?
  11. 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);
  12. freetoplay

    Swapping texture issue

    How do I put the the material on a plane? The textures are both 1024x1024. I no longer need that texture, so I just dispose of it, not sure if there's any performance bonuses with it though.
  13. freetoplay

    Changing the colors of an eye

    So my main problem is that albedo color changes the actual whites of the eyes (not the iris itself). Here is a screenshot before applying the color: After:
  14. freetoplay

    Swapping texture issue

    Do I have to create a new material or can I just keep my current material and still do the swap? My code for swapping out the texture is posted above, it first disposes the original texture which works since it leaves an empty hole in the eye socket, then I assign the albedoTexture a new texture which semi works because there is no longer a hole in the eye socket, but the Iris is not showing up I checked the console.log and it shows that the texture has been swapped.
  15. freetoplay

    Changing the colors of an eye

    Unfortunately, it doesn't work because it changes the whites of the eyes rather than the iris itself.