Live data from Hacker News

Show HN: Simulate 3D plants in the browser

plant.max-richter.dev

31–40 of 51 posts

Re: Show HN: Simulate 3D plants in the browser

#31
post #30

As far as I can tell this uses WebGL, I wonder if you could get these results just as easily using WebGPU

Yup, I use github.com/oframe/ogl, which makes webgl a bit mor usable for the average programmer. You could also probably achieve the same thing with webgpu, but for the time being i have not yet had a reason to switch :)

Awesome. I think I will switch from rust to typescript on the front end and do something similar in WebGPU. Before I did some wasm stuff with the wgpu crate but the fact that wasm can't reach the DOM is a bit of a headache and the gains in performance from WASM seem to be offset by the fact that I still need to create a sort of communication channel between wasm and js if I want my 3D app to talk to a websocket.

Your project is very motivating thank you for making this!

Re: Show HN: Simulate 3D plants in the browser

#33
post #21
post #18

What makes this a simulation and not just a model?

I guess because it is procedurally based, likely using an L-system. https://en.m.wikipedia.org/wiki/L-system We use things like this in 3D art and animation. For example the paint system in Maya. This was used to create the forests in Shrek. Question to OP… have you considered making this available as a Blender plugin?

That wouldn't make it a simulation, it's just a different way to generate 3D representations.

Re: Show HN: Simulate 3D plants in the browser

#36
I did something similar a year ago where I wanted to try out Rust as a webapp engine (compile to wasm -> host on rust webserver): https://blomma.lorentz.app. Although yours is miles better on the productification station, cudos! The real selling point is the nodegraph editor, blends really well to the workflow and brings it down from a debugging tool to a product which may be used by anyone.

Only improvement mine has is bezier curves, for both the leaf shape and stem shape. It was (to me) quite a challenge to get both the topology and triangulization right, but a great intro to quaternions and nice refresher on trigonometry. I'd recommend giving a bezier curve node a go.

Re: Show HN: Simulate 3D plants in the browser

#40
post #33
post #21

Earlier quoted context omitted.

I guess because it is procedurally based, likely using an L-system. https://en.m.wikipedia.org/wiki/L-system We use things like this in 3D art and animation. For example the paint system in Maya. This was used to create the forests in Shrek. Question to OP… have you considered making this available as a Blender plugin?

That wouldn't make it a simulation, it's just a different way to generate 3D representations.

I teach 3D modeling, and also procedural animation and simulation. The last two I would class as being the same.

3D modeling I would define as being fundamentally intentional. Want a particular form? Make it as according to your intention!

Procedural modeling animation/simulation I would define as being 'overseen' by a mathematical algorithm.

In the case of the former, the artist has complete control over every aspect of the outcome.

In the case of the latter, the artist has limited control. Want to change the direction of that simulation-defined particle? Or that branch of that L-system generated tree? Good luck.

The advantage of a procedural approach is that it can realistically emulate the complexity of nature (which is beyond an intentional approach). Hence it's favor in those artists who are interested in nature.

Post reply on HN