question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider multi-mesh API?

See original GitHub issue

Had the chance to try this tool out today, and was quite happy with the result:

before after
before after

I’m thinking of using geo-ambient-occlusion as the starting point for a lightweight browser-based AO baking GUI, where for example a user could drag in a glTF model, bake AO, adjust settings, and export the result. To make that useful, I’d need to be able to support models containing several meshes and materials, and have each mesh occlude the others.

What do you think about adding a multi-mesh API:

const geoao = require('geo-ambient-occlusion');

const aoSampler = geoao({resolution})
  .add(positions1, {transform1, cells1})
  .add(positions2, {transform2, cells2})
  .add(positions3, {transform3, cells3});

for (let i = 0; i < 256; i++) aoSampler.sample();

const [ao1, ao2, ao3] = aoSampler.report();

This can be accomplished without modifying the library (by packing and unpacking vertices into a single array) but I could imagine it being useful to others, and wanted to check before I implemented it in application code. If you don’t have the time to do something like this, would you be interested in a PR? Or does it seem too complex for the scope of this project?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
donmccurdycommented, May 17, 2021

That’s correct, yes – this tool can be used with files containing multiple meshes, but each mesh’s occlusion is computed in isolation.

1reaction
donmccurdycommented, Sep 10, 2018

Thanks, great to hear you’re open to the idea! It’s likely to be at least a few weeks before I could look into this seriously. I’ll comment here before I start in case you decide to give it a shot. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

MultiMesh — Godot Engine (stable) documentation in English
MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. As a...
Read more >
Delivering on the Vision of Multi-Mesh - Solo.io
Simple and effective API. Install, extend, and manage any service mesh using a unified API that is dead simple without sacrificing functionality ...
Read more >
(DEV) MultiMesh — Godot Engine (latest) documentation in ...
MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. As a...
Read more >
MultiMeshInstance in gdnative::api - Rust
All types in the Godot API have interior mutability in Rust parlance. ... The MultiMesh resource that will be used and shared among...
Read more >
MultiMesh — Godot Engine 2.1 documentation - Read the Docs
For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. As a drawback, if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found