Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Add SDF Viewer as another renderer for this library #8

Merged
merged 1 commit into from
Aug 27, 2022

Conversation

Yeicor
Copy link
Contributor

@Yeicor Yeicor commented Aug 27, 2022

I made a real-time, cross-platform, language-agnostic SDF Viewer application, and integrated it with your SDF library. It works similarly to sdf3ui but has some extra features (AFAIK):

  • Different rendering algorithm that allows observing the model preview while it is being loaded.
  • Shows the hierarchy of SDFs that build the final model and can render any subtree.
  • Support for textures and material properties (and even exporting them).
  • Support for customizing parameters in real-time from the UI without modifying the code (useful for publishing, it also listens for code changes and refreshes the view)
  • You can publish your SDF by uploading a file to a server and sharing the renderer link (renders and allows to customize and generate a mesh of the SDF in the browser without any backend).
  • More meshing algorithms running on all platforms (although speed is not a concern).

Check out https://github.com/Yeicor/sdf-viewer and https://github.com/Yeicor/sdf-viewer-go for much more information.

A little demo:

demo.mp4

Note that I had to use TinyGo instead of the Go Compiler, so the builds (after the code change) are a lot slower than Go.

Another useful feature is verifying that the SDF is properly defined, as a bad SDF will show artifacts on the SDF renderer (even if marching cubes or other algorithms seem to return a valid result). For example, it seems like ScaleUniform3D may not be correct (I haven't looked at it, it may also be an error with the integration), as it gives some render issues:

  • Without ScaleUniform3D:
    Screenshot_20220827_175604

  • With ScaleUniform3D:
    Screenshot_20220827_175647

I made a real-time, cross-platform, language-agnostic SDF Viewer application, and integrated it with your SDF library among others. It works similarly to `sdf3ui` but has some extra features (AFAIK):

- Different rendering algorithm that allows observing the model preview while it is being loaded.
- Support for customizing parameters in real-time from the UI without modifying the code (it also listens for code changes and refreshes the view)
- Support for textures and material properties (and even exporting them).
- You can publish your SDF by uploading a file to a server and sharing the renderer link (renders the SDF in the browser without a backend).
- More meshing algorithms (although speed is not a concern).

Check out https://github.com/Yeicor/sdf-viewer and https://github.com/Yeicor/sdf-viewer-go for much more information.
Copy link
Owner

@soypat soypat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing stuff! Thanks for the PR and for letting me know of the ScaleUniform bug. Let me know if you want to open an issue on it (or I'll do it sometime this week). As for this PR, LGTM!

@soypat soypat merged commit ea867bb into soypat:main Aug 27, 2022
@Yeicor Yeicor deleted the patch-1 branch August 27, 2022 17:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants