The new Node Geometry feature!

You may have seen the world premiere during our monthly meeting on Frame but in case you missed it!

We just shipped a new feature named Node Geometry. It was inspired by Blender Geometry Nodes where you can use a node system to build geometry procedurally. Think about it like a postprocessing system for geometry. Ultimately it produces a geometry but with a procedural approach.

Why you may ask?
Several reasons come to mind:

  • The cost of downloading assets on the web is a strong limiting factor. Procedural data can help solve that by limiting the download to the core pieces that are assembled later by the NodeGeometry system
  • The system is dynamic and can produce infinite variants at run time. While there are many digital content creation tools that can create procedural meshes with the same infinite possibilities, the limiting factor again becomes downloading assets created offline. Examples would be terrain or vegetation generation.
  • It allows a new way of modelling in Babylon.js by assembling core shapes and playing around with a node system

More on the doc: Node Geometry | Babylon.js Documentation (babylonjs.com)

27 Likes

Yup, sure did :smiley: Sounds like another amazing addition to the framework :heart_eyes:
BtW, You can come back with this kind of surprise for the next meetup - and for every meetup :grinning:
The bar has already been raised here so I wonder what better you can still announce? :stuck_out_tongue_winking_eye: I trust you’ll find something :joy:

Meanwhile, :clap: for the feature. Now I just need to learn it from the doc and find an idea for a project that could make use of it :thinking:

1 Like

lol sounds like a great plan!!

3 Likes

Huge! Love it!

1 Like

Link: https://nge.babylonjs.com

2 Likes

This is a game changer! :blue_heart::blue_heart::blue_heart:

1 Like

Some questions:

  1. Does it support boolean operations like subtraction and intersection?
  2. Can it benefit from worker threads or main thread only?
  3. Can it run on node.js, without webgl context?
  4. Is using webgpu compute shader to generate mesh part of the roadmap?
  5. Can it benefit from wasm and simd?

@kzhsw so many questions :slight_smile:

It is at the moment fully cpu based and mono threaded so it should be able to run on node.

By opening the link https://nge.babylonjs.com/, you can see all the supported nodes.

image

1 Like

If you mean Booleans like in csg, the answer is no but I plan to add it

5 Likes

Oh yes !!! I did not think to this at all, thanks

Are threading, simd, and gpu compute part of the plan?

Not for now but always possible

1 Like

Boolean operations would be extremely useful!! :pray:

it is on my todo :slight_smile:

Here we are: New boolean block for NGE by deltakosh · Pull Request #14368 · BabylonJS/Babylon.js (github.com)

3 Likes

Brilliant, this will be super helpful, thank you!

One of the ways I’ve been thinking about using the node geometry editor in my CAD web app is to create custom shapes. For example, if I don’t like the default parameters that Babylon offers for Cylinders, can I define a custom geometry object that takes e.g. these parameters instead of the default ones?

I assume that by using some shapes, transforms and boolean operations (merge, subtract etc.), the node geometry editor might be suitable for me.

I think so :slight_smile:

That’s amazing! Is there a plan to add extrude, inset, bevel, and other procedural modeling nodes or utility functions that can manipulate geometry at the points/edges/faces level? Take a look at the source code; it seems the current architecture has not prepared for that fine granularity modeling? To achieve that effect, there need to be some extra data structures and utility functions to assist the user in adding and modifying attributes at points/edges/faces.

Sadly, the Web platform doesn’t even have a single solution or library for procedural modeling. It seems that if someone wants to transfer his Houdini logic to the Web, he has to implement everything by himself. It will be awesome to model fully on code (in real-time) rather than solely drag nodes or work in a destructive workflow since coding provides more flexibility, engineering capability, and maintainability.

Anyway, the Node Geometry is already prominent! I will try to implement some simple logic and keep an eye on babylon.js!

For procedural modeling, do you mean something like this?

1 Like

Imo, the problem is that webgl is mostly fixed function, where all geometry comes from cpu and vertex shaders only manipulate those vertices sent from the cpu 1:1. This is like 10 or 15 years behind gpu drivers. However, with compute shaders, we can generate new vertices only on gpu side, which opens a lot of doors.

2 Likes