freetoplay

Members
  • Content Count

    63
  • Joined

  • Last visited


Reputation Activity

  1. Like
    freetoplay reacted to Deltakosh in Babylon.js Team Blog   
    We will!!
  2. Like
    freetoplay got a reaction from Deltakosh in 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!
  3. Like
    freetoplay reacted to JohnK in Question about isVisible   
    You can use mesh.setEnabled(false) and  mesh.setEnabled(true)  instead of isVisible. The method setEnabled takes the mesh out of the rendering loop and so does not consume processing time. Whereas isVisible hides the mesh but keeps it in the rendering loop.
  4. Like
    freetoplay reacted to kcoley in Missing Node Issue 3D Studio Max   
    Hi @freetoplay.  The missing node warning means that there is a node in the glTF file that is not used.  In this case, it is caused by a default ambient light created in the 3ds Max exporter, which is not supported in glTF.  The way the exporter was authored, it writes out a glTF node, and then checks to see what kind of node it is.  Ideally, it should do the reverse: check the type of node and specify if it should be written to the file or not. 
    In either case, this isn't an error so the file should work, though I plan on refactoring that code to make it do the reverse.  This will take some work since I would have to rewrite a few functions, but shouldn't be too difficult.  Let me know if you have questions on this!
  5. Like
    freetoplay got a reaction from Mark Bufton in 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);  
     
     
     
     
     
  6. Like
    freetoplay reacted to kcoley in glTF Validation Error   
    @freetoplay @bghgary I just made an update to the 3ds Max Babylon exporter which now uses the KHR_lights_punctual extension and sets KHR_materials_unlit in extensionsUsed when exporting to glTF/glb
  7. Like
    freetoplay reacted to Mark Bufton in Changing the colors of an eye   
    You're absolutely welcome.  I've been determined to help someone at least 😀  It depends largely on the size of the game files, number of meshes, vertices etc.  You'd probably find that this method will work with very little, if any, impact on the game's performance, fps rate etc compared to swapping out the textures.
    You are quite correct.  I created two meshes, rather than the one; the eyeball and the iris (for which I set the alpha to true).  This means that the transparent parts of the material image become transparent on the mesh.  The white eyeball then doubles as the highlights and means that the iris texture can be changed without any effect on the eyeball and highlights.  I set the iris' parent to the eye so that moving the eye will also move the iris without having to move them individually.
    This enables you to change the colour of the eyes by code and allows for possibly a higher level of customisation - potentially allowing hundreds of color3 combinations - perhaps if you wanted to introduce RGB colour sliders or the like at the character customisation stage.  Another alternative to this is to create an image containing multiple eyes and use sprites to select the correct eye colour (there are good tutorials in the Babylon.js documentation - simply Google search Babylon js sprites and it will pop up - probably better than any babble I can type here).  This is, of course, limited to what colours you choose to provide but would mean you only need the one mesh and you won't need to have any transparency on the image, as I have - basically just use it as you do now.
    Which brings me onto the third option - just to do what you are doing now. Create other images based on your current one (red, green, purple....any colours you like) and assign each to a new texture.  Then you could use a function, or even manually assign the textures, just as you have been doing so far.
    Needless to say, there are a few perfectly valid options to choose from, some perhaps moreso than others, and the choice is entirely yours as to which you use.  I must say that your character is looking pretty darn good so far.
    The best thing I can recommend is to experiment with different techniques and to see what works best for you.  Also it's good to remember that nothing has to be absolutely perfect - that's part of the fun of learning this stuff (well, I think so anyway).  Even if you decide you don't like it, it can always be changed.  There aren't really any right or wrong answers for the most part (unless, as I have done, you try to move a mesh using a Color3, that appears to be very wrong).  A keen eye will also notice that in my code sample, I named both my eyeMat and irisMat materials "irisMat" - guess that proves a point.  You can get away with a lot haha
  8. Like
    freetoplay got a reaction from Wingnut in 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);  
     
     
     
     
     
  9. Thanks
    freetoplay reacted to brianzinn in Resetting/Undoing rotation   
    rotMesh.rotation is ignored when quaternions are used:
    http://www.babylonjs-playground.com/#TT2BK1#10
    That PG will reset to initial rotation, if you don't move the mesh for 2 secs.
    edit: better to use the scene to add event listeners
  10. Like
    freetoplay reacted to Deltakosh in Positioning Loading Screen   
    You can even provide your own
    https://doc.babylonjs.com/how_to/creating_a_custom_loading_screen
    You can also keep the current one and override its css style (id is "babylonjsLoadingDiv")
  11. Like
    freetoplay reacted to brianzinn in Optimize scene   
    I would look at the Remix3D website.  They have images and as you mouse across them, they are using sprites to animate rotation, so without WebGL (the images are like a film strip).  If you pre-generate the images, you should be able to get the rotation.y on mouse move events like in Remix3D.  Selecting a model could then create the scene and engine - or have an engine with the models loaded for quick transition?  When you say "at least 3 scenes" then I am imagining this is going to struggle on mobile, if they are a target device 
    edit: You can try only calling scene.render() in your renderLoop when your mouse enters the canvas, too.
  12. Like
    freetoplay reacted to Deltakosh in Multiple Scenes Approach   
    Yes this is better to use only one engine as shaders and textures will be shared hence better performance and less resources required.
  13. Like
    freetoplay got a reaction from brianzinn in Camera question   
    This seems to have worked perfectly, thank you so much!
     
  14. Like
    freetoplay got a reaction from Deltakosh in Babylon Viewer Issue   
    I ended up using
    model.normalize="true"
  15. Like
    freetoplay got a reaction from RaananW in Babylon Viewer Issue   
    @RaananW That works as expected! Thanks!