3D for mortals Posted June 29, 2018 Share Posted June 29, 2018 for simple example i have x4 Bezier CUBIC 3D curves , which connected to contour in 3D space. What must be my steps to convert this closed contour to bezier surface with color etc?... If it possible with babylonjs. Functionality like this will allow create lot of surfaces, what babylonjs user wish, but i can't found any docs about this. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 29, 2018 Share Posted June 29, 2018 Hiya 3dfm! Check this out... https://www.babylonjs-playground.com/#1QD8LM#4 See the 'cubicBezier' in line 67? That's something, eh? Ribbons... breakfast of parametric shape champions. http://doc.babylonjs.com/how_to/parametric_shapes I found this playground via a playground search for 'bezier' and 'ribbon'. Hope this helps. Oh yeah, the colors. That scares me. BJS HAS full color-per-vertex coloring, but you may need to "insert" those Color4-like color values.... into the mesh's vertexData colorKind/colors array - doing a little paint-by-numbers with a JS func. It's part of the fun! http://www.babylonjs-playground.com/#1UHFAP#60 (possibly outdated - perhaps there are newer ways of interacting with vertexData) That playground... is a little intro-to plotting mesh, vertexData, and color-per-vertex coloring. Simple, but, full of learning, if wished. Stay in touch and stay tuned for more/better comments. 3D for mortals 1 Quote Link to comment Share on other sites More sharing options...
3D for mortals Posted June 29, 2018 Author Share Posted June 29, 2018 1 hour ago, Wingnut said: Hiya 3dfm! Check this out... https://www.babylonjs-playground.com/#1QD8LM#4 See the 'cubicBezier' in line 67? That's something, eh? Ribbons... breakfast of parametric shape champions. http://doc.babylonjs.com/how_to/parametric_shapes I found this playground via a playground search for 'bezier' and 'ribbon'. Hope this helps. Oh yeah, the colors. That scares me. BJS HAS full color-per-vertex coloring, but you may need to "insert" those Color4-like color values.... into the mesh's vertexData colorKind/colors array - doing a little paint-by-numbers with a JS func. It's part of the fun! http://www.babylonjs-playground.com/#1UHFAP#60 (possibly outdated - perhaps there are newer ways of interacting with vertexData) That playground... is a little intro-to plotting mesh, vertexData, and color-per-vertex coloring. Simple, but, full of learning, if wished. Stay in touch and stay tuned for more/better comments. This looks like what i'm talking about. Thanx! Need deep read , for my case Wingnut 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 29, 2018 Share Posted June 29, 2018 i can make this surface with svg path parameters if that help i can make sample use with Babylon > Extension > GeometryBuilder Quote Link to comment Share on other sites More sharing options...
3D for mortals Posted June 29, 2018 Author Share Posted June 29, 2018 5 hours ago, NasimiAsl said: i can make this surface with svg path parameters if that help i can make sample use with Babylon > Extension > GeometryBuilder it can be helpful. Is your way alternative using of ribbons? Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 30, 2018 Share Posted June 30, 2018 hey @3D for mortals it is not ribbon it is a new Technic for make geometry in this way you make geometry builder function( like box , sphere , ... or any geometry you want ) and use it https://www.babylonjs-playground.com/#1ZEABJ#159 for test use http://editor.5kb.me/ (it is alpha version yet) need some 3d edges struct for make it 3D for mortals 1 Quote Link to comment Share on other sites More sharing options...
3D for mortals Posted June 30, 2018 Author Share Posted June 30, 2018 3 hours ago, NasimiAsl said: hey @3D for mortals it is not ribbon it is a new Technic for make geometry in this way you make geometry builder function( like box , sphere , ... or any geometry you want ) and use it https://www.babylonjs-playground.com/#1ZEABJ#159 for test use http://editor.5kb.me/ (it is alpha version yet) need some 3d edges struct for make it I fast look the code and youtube examples, and looks like your way is: - create flat contour , because paths have no z coordinates; - create flat shape from this flat contour - inside flat shape create new vertex and offset the vertex from zero z coordinate position to new z this method will be good for creating a random surface of the earth, such as hills or pits, but i need something close ribbons, because i need more industrial, technical strictly surface. Am i right, about your way? ... (hills and pits) ... and , after you complete the library functionality, think about more short way to create surfaces(short syntax if possible), because now the way look very long, and this little scared me(i think others can too), or i don't understand situation , and other libs have same length of creating way. p.s. and i can't turn off "sign in" invite box on geometry builder screen. It take 25% of screen width. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted June 30, 2018 Share Posted June 30, 2018 On 10/16/2016 at 3:48 PM, NasimiAsl said: hi All GeometryBuilder Alpha version is Ready This Is Core Version We can make GeometryBuilder Template like face , Box , Sphere or ... geometryBuilder Has 2 part for any Template 1. the Builder 2. the Creator in part 1 we define how we make face with vertices and make uv and define what setting we need for make a instance of this Geometry template and in part 2 just fill the setting (this defined in part 1) and make a mesh simple Face part 1 var face = function (op) { // define a template builder var builder = function (setting /*setting of template */ , geo /*automatic generated in GB (current instance)*/) { /*make a face in the geo instance*/ GB.MakeFace(geo, [setting.p1, setting .p2, setting .p3, setting .p4] , { faceUVMap: "0123", // uv map draw side uvStart: { u: 0., v: 0. }, uvEnd: { u: 1., v: 1. } }); }; return new BABYLONX.Geometry(GB.GeometryBase(op, builder )); } part 2 : var mesh = face({ p1: { x: -1., y: 0.0, z: -1 }, p2: { x: -1., y: 0., z: 1 }, p3: { x: 1., y: 0., z: -1 }, p4: { x: 1., y: 0.0, z: 1 }, }).toMesh(scene); http://www.babylonjs-playground.com/#1QC9DP#5 some template sample : box : http://www.babylonjs-playground.com/#1QC9DP#4 Cylinder : http://www.babylonjs-playground.com/#1QC9DP#6 Cone : http://www.babylonjs-playground.com/#1QC9DP#7 something special : http://www.babylonjs-playground.com/#1QC9DP#8 smooth version : http://www.babylonjs-playground.com/#1QC9DP#9 *notice : this is preview version the final version in Test and refactor level cheers Nasimiasl if you read this you can understand all part Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 1, 2018 Share Posted July 1, 2018 GeometryBuilder has SO MUCH mesh-plotting power, eh? Unreal! Love it. Certainly worthy of learning-time. Where is that "city buildings" demo? Oh yeah... http://www.babylonjs-playground.com/index.html#FT2RY#78 Phew... too nice! (mega-drool) A bit off-topic, though. (Wingnut opens NasimiAsl's brain... to see if he can learn how it works.) I think there's a super-computer in his brain. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted July 2, 2018 Share Posted July 2, 2018 sure wingnut let i find time to show more power about that and it is so simple in base Quote Link to comment Share on other sites More sharing options...
3D for mortals Posted July 6, 2018 Author Share Posted July 6, 2018 On 6/29/2018 at 6:17 PM, Wingnut said: Hiya 3dfm! Check this out... https://www.babylonjs-playground.com/#1QD8LM#4 See the 'cubicBezier' in line 67? That's something, eh? Ribbons... breakfast of parametric shape champions. http://doc.babylonjs.com/how_to/parametric_shapes I found this playground via a playground search for 'bezier' and 'ribbon'. Hope this helps. Oh yeah, the colors. That scares me. BJS HAS full color-per-vertex coloring, but you may need to "insert" those Color4-like color values.... into the mesh's vertexData colorKind/colors array - doing a little paint-by-numbers with a JS func. It's part of the fun! http://www.babylonjs-playground.com/#1UHFAP#60 (possibly outdated - perhaps there are newer ways of interacting with vertexData) That playground... is a little intro-to plotting mesh, vertexData, and color-per-vertex coloring. Simple, but, full of learning, if wished. Stay in touch and stay tuned for more/better comments. Another subquestion. Is ribbons need any additional manipulation , that correctly be exported to OBJ file? Looks like i can display ribbons successful , but can't export to OBJ , but can export to OBJ other not ribbons meshes . : | Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 7, 2018 Share Posted July 7, 2018 Though I would give more standard approaches a go to producing a bezier surface. Results here jerome 1 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.