Jump to content

freetoplay

Members
  • Content Count

    63
  • Joined

  • Last visited

Everything posted by freetoplay

  1. 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. 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. 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. 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+
  5. 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. 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. 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.Engin
  8. 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"],
  9. 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": [ "
  11. 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. 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 i
  14. @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. 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);
  16. 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.
  17. 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:
  18. 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.
  19. Unfortunately, it doesn't work because it changes the whites of the eyes rather than the iris itself.
  20. I am trying a texture for the eye of my character using the following code: const changeEyeColor = function(e) { scene.meshes[2].material.albedoTexture.dispose(); scene.meshes[2].material.albedoTexture = new BABYLON.Texture("eye2.png", scene); } However the result is this: The texture that I want to swap in is: What am I doing wrong here?
  21. I want to give this a try, but when the model gets exported, all the materials turn into PBRMaterial, is there a way to keep Standard Material while exporting as glTF?
  22. I have a character model that has the following texture for an eye: I want to change the color of this texture through code if possible. What would be the best approach for this? I tried changing the albedo color, but that only changes the whites of the eyes.
  23. I have seen games where users can allow their character's hair to grow. I am curious as if you can do something like that using a standard material with a color map texture in Babylon? Or is there another approach?
  24. Is there a way to take a screenshot of a mesh only and leave the background of the image transparent?
  25. I have a mesh that rotates around the y axis after some pointer events. How can I reset the rotation to the initial position (the position that you see when you first load the playground)? Here is the playground code: http://www.babylonjs-playground.com/#TT2BK1#9
×
×
  • Create New...