timm Posted November 30, 2018 Share Posted November 30, 2018 Hello Everyone, I have seen some demos in both youtube and three.js that show an effect of transforming/morphing a plane in a sphere as an animation. Here are some links that show this effect. https://blender.stackexchange.com/questions/24043/how-to-animate-morphing-a-rectangular-plane-into-a-sphere https://stemkoski.github.io/Three.js/Sphere-Unwrapping.html (three.js demo of this effect) https://github.com/stemkoski/stemkoski.github.com/blob/master/Three.js/Sphere-Unwrapping.html (three.js github implementation of this effect) The implementation of this in three.js appears to use custom shaders. If I was to build this effect in babylon.js would this be the best way of doing this, or could there be a better way to implement a function to achieve this using other Babylon.js constructs? I thought about trying to import the Blender version of this, but have no idea if that would work, and would rather have an algorithm for this. If customer shader is the best way to do it, I could put a playground together but wanted to get some feedback first before going down that path. Thanks, timm Quote Link to comment Share on other sites More sharing options...
trevordev Posted November 30, 2018 Share Posted November 30, 2018 I think a custom shader would be best to get the same wrapping animation. Another options would be to use morph targets https://doc.babylonjs.com/how_to/how_to_use_morphtargets but I think with this method the vertex animation would look more linear unless you added many steps between non-sphere to sphere. 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.