Pryme8 Posted February 17, 2016 Share Posted February 17, 2016 (edited) Quick question, I am about to test it but I am working on some other stuff for the next hour or so and before I get to this problem I figured I would ask the community. I have a Theory that if I use: updateMeshPositions(positionFunction, computeNormals) and in the function just tell it that positions = positions or even skip that step and literally, just call the function with the flag computeNormals if it will update the normal data on the mesh? I kinda doubt it because I am assuming that the new normal data come from the manipulation of the Vertices in the function itself as it propagates. Is there a way to push the results of a VertexData manipulation to also update the Normals, I know its not inherent because I have logged the response after manipulation and it is the same as before. ***EDIT AND UPDATE*** Yea I guess it does work... after you manipulate the vertexData just pass the mesh through Mesh.updateMeshPositions(function(){}, true); and you will update the normals... Edited February 18, 2016 by Pryme8 Update jerome 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted February 18, 2016 Share Posted February 18, 2016 http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#other-shapes-updatemeshpositions of course, it works ;-) it's used in the code of many morphable parametric shapes ! if you need to check, just use this : https://github.com/BabylonJS/UserFunctions/blob/master/showNormals.js btw, the new LineSystem could now be used in showNormals.js Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted February 18, 2016 Author Share Posted February 18, 2016 Yea, I was able to figure out all my glitchs with my system, now to add more noise types and filter types... Thank you for the info though! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 18, 2016 Share Posted February 18, 2016 Sounds like fun demo Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted February 18, 2016 Author Share Posted February 18, 2016 how could I put it onto the babylon playground? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 18, 2016 Share Posted February 18, 2016 Not sure to understand the question Why not just coding it inside the PG? do you need external resources? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted February 18, 2016 Author Share Posted February 18, 2016 I guess I do not understand the PG, and yea I am dependent on some separate js files for the noise algorithms, but if I can include them then its on. EDIT* And Jquery also looking at the playground I dont see the option to attach external files or edit the head section of the page... Ill post on my github if its a problem to get it on the playground 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.