AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

[REQUEST] SDF Xor operation

Open
#1,748 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
3.4k
Forks
774
Avg merge
3d 9h
Merged PRs (30d)
34

Description

Currently OpenVDB supports the following SDF operations:

SDF Union:
`min(d1, d2)`

SDF Intersection:
`max(d1, d2)`

SDF Difference (usually named SDF Subtraction):
`max(-d1, d2)`

However, it doesn't support the [XOR operation described by Inigo Quilez](https://iquilezles.org/articles/sdfxor/):
`max(min(d1, d2), -max(d1, d2))`

This operation finds regions where the sign mismatches.

![image](https://github.com/AcademySoftwareFoundation/openvdb/assets/9063769/54208d50-0b21-44b5-95f8-247a2d8412a3)

It would be nice to include all standard SDF operations in OpenVDB.

Contributor guide

Open the contributing guide

Research direction

Search the repository for the existing SDF union, intersection, and difference operations and their tests to find the relevant entry points. Add the requested XOR operation using the formula in the issue, then extend the nearby test coverage to verify the sign-mismatch behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.