NasimiAsl Posted May 7, 2016 Share Posted May 7, 2016 hi all members. i have design pattern for make a new geometry builder in my mind and i make a some test but wanna do it in teamwork we can talk about all depended stuff of geometry and find a good way to do that Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 7, 2016 Share Posted May 7, 2016 Cool. Hi Naz! Good to see you again. Good to see GeometryBuilder being developed and shared... THANK YOU, NAZ! Allow me to flesh this topic a little bit: Forum posts about GeometryBuilder: http://www.html5gamedevs.com/search/?&q=geometrybuilder&type=forums_topic&nodes=16,28,29,30,31 Question #1: Do the links @ http://www.html5gamedevs.com/topic/21929-geometric-modeling-kernel/?do=findComment&comment=125297 ...still work? Question #2a: Why is GB (geometryBuilder) so slow? Caused by shaderBuilder load-in time... for certain GeometryBuilder demos? Question #2b: Even slower on mobile? Question #3: GB seems to use some SVG. Will this limit certain devices? GB (GeometryBuilder) appears to cast its result... as a BABYLON.Mesh. This makes it compatible with everything BJS, so I see no problems, there. Standard vertexData, afaik. @Pryme8 spurred Naz to build GeometryBuilder with this post. P8 mentioned "independent geometry kernel" (huh?)... and then showed us a very interesting link. It might be beyond the scope of JS... to accomplish Open Cascade functionality. As Pryme8 mentioned, it is a "pipe dream" of his. These advanced geometry libraries and methods seem less-than-friendly. That is expected. I think GeometryBuilder will be the same. I love the potential POWER of GB. I am scared of the "making it useful for anyone" - part. GB is certainly interesting and innovative. When and where to use it? I think the future will tell. Party on! NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 7, 2016 Author Share Posted May 7, 2016 answer for question 1 : i fixed that my server in iran have dns problem answer for q2 and q3 : http://www.babylonjs-playground.com/#1B40RE#8 http://www.babylonjs-playground.com/#FT2RY#56 http://www.babylonjs-playground.com/#FT2RY#57 all 60 fps : Iphone 5s and mac pro 13" retina dispaly q4 : we need path parser anyway and this is just a helper for find a points http://www.babylonjs-playground.com/#FT2RY#68 this is 44 fps in iphone 5s and 60 in mac pro have 36 building jerome, adam, Wingnut and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 7, 2016 Share Posted May 7, 2016 Beautiful! Thanks for the answers. SVG available on most mobile devices? Works for me. Possible to cap the buildings, Naz? (thx) Caps could also be used as floors (many) inside the buildings, too, I suppose. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 7, 2016 Author Share Posted May 7, 2016 http://caniuse.com/#search=svg Wingnut 1 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 7, 2016 Author Share Posted May 7, 2016 i wanna tell my design pattern for geometry builder. 1. we need calculate vertex places and keep it in arrays or 'array of array' or any structure we need 2. we most push vertex step by step and make face with Uv and push it in original instance in each step 3. need make a geometry or Mesh (almost babylonjs mesh instance) Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 7, 2016 Author Share Posted May 7, 2016 let me explain sample 1 : i have some method like face3 : make 3 point face geometrybase : give my points and build face step by step geometryInstance : make babylonjs geometry var PlanBuilder = function (op) { // for add face and vertex in main array var builder = function (pre, geo) { face(geo, pre.p1, pre.p2, pre.p3, pre.p4); face(geo, pre.p1, pre.p2, pre.p3, pre.p4, { flip: 1 }); }; if (def(op.end)) { op.end(op); } return new geometryInstance( geometryBase(op, builder, op.custom) ); } we define PlanBuilder first and use it for make geometry PlanBuilder({ p1: { x: -1., y: 0., z: -1 }, p2: { x: -1., y: 0., z: 1 }, p3: { x: 1., y: 0., z: -1 }, p4: { x: 1., y: 0., z: 1 }, }).toMesh(scene); http://www.babylonjs-playground.com/#1B40RE#8 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 7, 2016 Author Share Posted May 7, 2016 for more step : Use like recursive function : var sampleGeo = function (op) { var builder = function (p, geo) { var i = p.i; if (i > 3) { // calculate points per step var p1 = { x: sin(i)*5. , y: cos(i)*5. , z:-2.}; var p2 = { x: sin(i-1)*5., y: cos(i-1)*5. , z:2.}; var p3 = { x: sin(i-2)*5., y: cos(i-2)*5. , z:2.}; var p4 = { x: sin(i-3)*5., y: cos(i-3)*5. , z:-2.}; // make face face(geo, p1, p2, p3, p4); face(geo, p1, p2, p3, p4, { flip: 1 }); }; if (i < 5.) { // finish condition p.i+=0.5; // go next step p.builderRef(p,geo ); // recursive function } } var geo = geometryBase({ i:0, builderRef: builder }, builder ); return new geometryInstance(geo); } http://www.babylonjs-playground.com/#7E2IY#5 http://www.babylonjs-playground.com/#7E2IY#6 http://www.babylonjs-playground.com/#7E2IY#7 i think we need define just Builder and Use it Like Pattern Wingnut, jerome and Pryme8 3 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 7, 2016 Share Posted May 7, 2016 Wingy plays a bit: http://playground.babylonjs.com/#179VAS#1 Nothing new or exciting... but I did wash and vacuum the playground a bit. nazpak.js... your one-stop file... for ALL your NasimiAsl experimenting needs. Naz, let me know if you have issue with my (temporary?) republishing of your libs. I will delete nazpak.js if you wish, no problems. I just wanted a cleaner/smaller playground to play-in (and smaller to store in the playground db). Use it in your future PG demos, too, if you like. Edit: Actually, that playground IS exciting, but Naz made it that way, not Wingy. This is all I've done, as far as coding GB, but it's a start, right? heh Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 7, 2016 Author Share Posted May 7, 2016 i have wall generator and Surface generator in GB Need Make .Ts Version and Documentation and try This http://playground.babylonjs.com/#179VAS#2 You can append any geometry a simple way : http://playground.babylonjs.com/#1B40RE#10 Wingnut, Pryme8 and GameMonetize 3 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.