GameMonetize Posted August 7, 2017 Share Posted August 7, 2017 ok let me give you more context on the initial bug fix. The bone used by @satguru was incorrect because the bones were not completely influencing the mesh (ie the sum of matrices weight was not 1 but something like 0.98) So I fixed it with a check while loading files: if the sum is not 1 then I fix the latest weight: https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.geometry.ts#L982) But seems like it was not such a good idea Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 7, 2017 Share Posted August 7, 2017 Woot, actually I've just realized that my fix was not that good at all. They was a bug if the last weight was not 0. Do you mind trying about with the latest build? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 7, 2017 Share Posted August 7, 2017 It's always the same for me, I also have holes in my mesh during the animation. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 7, 2017 Share Posted August 7, 2017 Can you make sure you are using the very latest 3.1? (published one hour ago) And to make sure my code is the source of this issue can you also run your code after having ran this line: BABYLON.Geometry.prototype._CleanMatricesWeights = function() {} Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 7, 2017 Share Posted August 7, 2017 I use : https://preview.babylonjs.com/babylon.js This is the last update 3.1 that I use. I also try to use the line of code you give. But I have the same mistake. I also try emptying the browser caches, but that does not change anything. Quote Link to comment Share on other sites More sharing options...
satguru Posted August 7, 2017 Author Share Posted August 7, 2017 Still the same issue with the latest preview and your line. attached is the code from playground if you wish to try sample.zip Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 8, 2017 Share Posted August 8, 2017 OK!!!! It should be fixed now. Thanks guys! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 8, 2017 Share Posted August 8, 2017 Sorry Dk, but it's always the same. I tried the line you also : BABYLON.Geometry.prototype._CleanMatricesWeights = function () {} said and empty the cache. And use last version 3.1 : <script src="https://preview.babylonjs.com/babylon.js?<?php echo time();?>"></script> I made a PG here : http://www.babylonjs-playground.com/#GA8XI#87 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 8, 2017 Share Posted August 8, 2017 Hello, the sample provided by @satguru works with my latest fix. And I cannot use your PG as there are blocked content due to https Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 8, 2017 Share Posted August 8, 2017 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 8, 2017 Share Posted August 8, 2017 My PG example works with http. At home it works PG. You can use http.I have no virus on my link I do not understand well. My character is perfectly made, the mesh is 100% influenced by the bones (Model buy to a professional, realized with 3ds max). I use it for 5 years without ever any problem, even with Babylon. This always works well. And now not work. I suppose there is another problem. I use 3ds max, and satguru, blender. So anyone who uses 3ds max, will have their model animate like this? The previous version of Babylon works. Why more now? http://www.babylonjs-playground.com/#GA8XI#87 Try without https This always works for me and now that a problem is settled for satguru, this does not work for me anymore. It's my model that has a bug that has still worked well for years. version 3.0 on PG work (screen left) , but not version 3.1(screen right) : Quote Link to comment Share on other sites More sharing options...
gryff Posted August 8, 2017 Share Posted August 8, 2017 @Deltakosh, @Dad72, and @satguru Well here is Vincent again using the latest preview version of BJS ( which I have renamed to "babylon.3.1-alpha1.js" to avoid overwriting my previous version which I know worked fine) New Vincent I also checked the .log file for vertex influencers (bones I assume) Avg # of influencers per vertex: 1.1592 Highest # of influencers observed: 2, num vertices with this: 776 exported as 2 influencers Nothing extraordinary there. cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 8, 2017 Share Posted August 8, 2017 Ok this was because of Chrome. Firefox was not forcing https. Anyway, I fixed your issue as well. By default the skin loading remains unchanged to preserve backward compatibility @satguru: I added a new static for you: BABYLON.SceneLoader.CleanBoneMatrixWeights = true Dad72 and satguru 1 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 8, 2017 Share Posted August 8, 2017 Yes it works now. Thanks DK, I was afraid that my model would be compromised. For Google chrome, at home it does not force the https on the playground. Quote Link to comment Share on other sites More sharing options...
satguru Posted August 9, 2017 Author Share Posted August 9, 2017 @Deltakosh, Yes that worked to an extent. But still not there. When I use "BABYLON.SceneLoader.CleanBoneMatrixWeights = true" The uv texture is messed up. See bad_texture.jpg Without the line I get good_texture.jpg Also the the specular color is now set to white. As a result meshes end up being very shiny. Previously it used to be black. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2017 Share Posted August 9, 2017 This is not a magical tool unfortunately. The data is broken at the source. You need to clean up your model because I will not be able to provide better automatic support The code for the cleaner is here so you can understand what it tries to do: https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.geometry.ts#L982 Regarding shininess this is not related to the bones issues. There must be a difference in the file as specular was not changed recently. What are the value of your specular setup? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2017 Share Posted August 9, 2017 Other option is to let the model as is. Shaders can handle it and you just play with the bias to compensate the loss of precision due to wrong matrix weights Quote Link to comment Share on other sites More sharing options...
satguru Posted August 9, 2017 Author Share Posted August 9, 2017 @Deltakosh Ok . I will revisit my source and also checkout the code you pointed out. Regarding specular you are right, it is not a bone issue. Previously when I loaded mesh they would have a specular color of #000000. Now they have #ffffff. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2017 Share Posted August 9, 2017 Ok I prefer that I'm not a big fan of bugs in the shaders Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted September 14, 2017 Share Posted September 14, 2017 I have this annoying bug with skeleton meshes too! The model not changed, since about april, but the shadows are kind of "inverse" now. The shadow is correctly animated (moving) but inverse. The shadows were working before. If I set skeleton=null, the shadows are correct. Tried to re-export from Blender with 5.4 export, but stays the same. tried setting BABYLON.SceneLoader.CleanBoneMatrixWeights = true but the mesh was distorted. The meshes are imported with loader.addMeshTask(... -images with and without skeleton. -zip of .babylon file How can I "clean" the mesh source? I think this is not the problem of the model, this model worked before. goblin.zip Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted September 14, 2017 Share Posted September 14, 2017 Blender source of the goblin (Its a free model for testing, not mine)https://www.bitofgold.com/show/goblin-blend.zip Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted September 14, 2017 Share Posted September 14, 2017 To show you it is the same problem: with poisson shadow this looks like the same "inverse" shadow. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2017 Share Posted September 14, 2017 Which PG is that? I can try to fix it from there Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2017 Share Posted September 14, 2017 (But I'm pretty sure it is an issue with the matrices not being "complete" as before) Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted September 14, 2017 Share Posted September 14, 2017 The playground is in text. I re-exported this vincent now from blender, with 5.4 exporter. And started an animation and it is not right at all. So, something is wrong with this vincent model or the exporter. But... how it is possible thet the same model, (my goblin) was working with shadows with previous babylon js versions? Something did change that make it impossible to export the modelfrom blender and importing it to babylon with animations and shadows. pcode Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.