Scotty Posted September 17, 2016 Share Posted September 17, 2016 Hi, I trying to evaluate the possibilities of using Babylon to render a surface like the one attached in this post. Has anyone already done this kind of visualization using Babylon before? --Scotty Quote Link to comment Share on other sites More sharing options...
Temechon Posted September 18, 2016 Share Posted September 18, 2016 Hello Scotty, I'm not aware of any project using this kind of representation, but it is surely possible! I would use a ribbon to do it : you have plenty of documentation here: http://doc.babylonjs.com/tutorials/Parametric_Shapeshttp://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#ribbonhttp://doc.babylonjs.com/tutorials/Ribbon_Tutorial And even more examples created by the community here: http://doc.babylonjs.com/playground?q=ribbon God luck ! Quote Link to comment Share on other sites More sharing options...
jerome Posted September 19, 2016 Share Posted September 19, 2016 the Ribbon is your friend for this kind of goal Quote Link to comment Share on other sites More sharing options...
dbawel Posted September 19, 2016 Share Posted September 19, 2016 I would simply translate the UVs of a planer mesh on a single axis with the data you want to visualize. And for the ground mesh, I would use a dynamic texture to represent the translation of the mesh you are deforming in color based upon the data passed through the deforming mesh above. DB Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted September 19, 2016 Share Posted September 19, 2016 alternative option http://www.babylonjs-playground.com/#MBIEI#4 http://www.babylonjs-playground.com/#MBIEI#11 f(X,Y) all math function with lowercase use Webgl math struct noise ( vec3()) for random 'time' if you have animation : sin(X+time*0.1) var box = BABYLON.Mesh.CreateBox("a", 50, scene); var plan = BABYLON.Mesh.CreateGround("a", 50, 50, 350, scene); DrawSurface('log(X*Y)*2.+sin(Y*10.)', box, plan); http://www.babylonjs-playground.com/#MBIEI#20 rotation sample r_y ( vector , angle , center ) X => r_y(vec3(X,0.,Y),angle,vec3(0.)).x Y => r_y(vec3(X,0.,Y),angle,vec3(0.)).z adam, V!nc3r and jerome 3 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted September 19, 2016 Share Posted September 19, 2016 http://www.babylonjs-playground.com/#MBIEI#27 adam 1 Quote Link to comment Share on other sites More sharing options...
adam Posted September 19, 2016 Share Posted September 19, 2016 @Pryme8 didn't you do something like this? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 20, 2016 Share Posted September 20, 2016 Search for TERIABLE and das noise Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 20, 2016 Share Posted September 20, 2016 Sometimes i would like to be good at maths to do somes funny things like this Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted September 20, 2016 Share Posted September 20, 2016 All about vector not too math Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 20, 2016 Share Posted September 20, 2016 um yeah its kind mathy, but not reeallly high level stuff... honestly just messing with Math.cos and Math.sin on a x and z coordinate that modifies the y can make some really interesting output. To get more control you would really need to know your trig, or work with noises and pseudo random numbers. The shader is a simple angular clamp and elevation GLSL shader, to get that color. 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.