Jump to content

GeometryBuilder (core) Alpha Version


NasimiAsl
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

1 minute ago, Pryme8 said:

I wanna share my stuff I did this week with you but it's not ready yet, but I figured out a way to project UVs onto the models in bjs with visual tools.  It would prolly go great with this.

i see uv editor in  beta version -  alpha version is close to be ready with tools and  i have just simplex noise in GeometryBuilder 

i make pull request but no one accept that in Github ( @Deltakosh  please .. :D

Link to comment
Share on other sites

i think we have 2 different design may be o one stuff how we can mix that

i ask members before i start GB for cooperation but just have some advice from dear @Wingnut any way how can we mix and what members else work on this stuff? 

my working stuff in this version

import  .obj  (* import material to shaderBuilder )

make Geometry - wall - surface - tree - default shape's, - special custom geometry

svg calculate

tools for make shaderBuilder 

tools for make GB template

tools for make scene from Geometries

export scene and export  obj with material

 

Link to comment
Share on other sites

usually my estimation time is wrong  because i work part time on that so maybe my tools completed after 2 weeks and i have exactly solution for each  part  of my project i make all is in-depended for any external tools or source but more depend for mathematical  so what you need in your plan or look for parts ( i write in previous reply ) what part can help you i can talk about solution 

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

EASH SPACE, huh?  GeometryBuilder editor.  hmm.  ShaderBuilder nearby on a button, too.  hmm.  :)

Interesting!  (and pretty cool).  hmm.   In this playground:  http://www.babylonjs-playground.com/#1ZEABJ#16  Line 57:

return new BABYLONX.Geometry(GB.GeometryBase(op, builder, op.custom));

Now... does the GPU plot that mesh geometry?  Or the CPU? 

Ridiculous question by Wingnut? GPU always does it, no matter GB or not?

I am somewhat familiar with shaders used for materials.  I don't know if GPU code can also plot geometry. 

I think it can... but... does a GPU-plotted mesh... really exist in vertexData form, too?  This is still difficult to understand.  :)  Not enough reading/experimenting by Mr. Wingnut.

It seems to me... that a shader could FAKE a mesh being in-scene, but scene.meshes stays empty.  Why would anyone DO that?  I dunno.  :) 

Just thinkin'.

Anyway, this is all cool, I like it... and it sure is powerful.  Great playgrounds, unique and fascinating.  Code looks like cross of Slovakian and RegExp.  :D

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

It works to force https, but you can also use schemaless ie: var url = "//cdn.rawgit.com/NasimiAsl/Extensions/master/GeometryBuilder/SGB.js" to match page.
Really cool geometries by the way.  I can see some things I've done in blender can be done with your library!! :)

Link to comment
Share on other sites

  • 9 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...