mariuszhermansdorfer / SandWorm

Augmented Reality Sandbox for Grasshopper & Rhino
MIT License
20 stars 11 forks source link

Separate logic in various components #1

Closed mariuszhermansdorfer closed 5 years ago

mariuszhermansdorfer commented 5 years ago

Create separate components for:

  1. Initial calibration (including tick rate setting)
  2. Meshing
  3. Point-cloud output
philipbelesky commented 5 years ago

As part of this separation it would be great if in splitting of (1) the other components could be edited to provide default values for all of the setup parameters.

When initially setting up a definition it is very unclear what the expected number ranges for things like depth or smoothing are. It would also help in the 'out of the box' scenario to be able to just create a new component and be able to immediately see at least some form of output.

mariuszhermansdorfer commented 5 years ago

Thanks for your feedback, Always good to know what was confusing for first-time users. Let's brainstorm a bit how the components could work before we create any PRs, shall we? I'll sketch something out and post here.

mariuszhermansdorfer commented 5 years ago

Here are some ideas for the calibration component:

  1. Measure the distance from the sensor to the table. Average the measurement over 100x100 pixels. Output the measurement as the sensorHeight variable

  2. Create a depth value lookup table correcting for inaccuracies in measurement and sensor tilt. Background info here and here

  3. Trim the mesh to the extent of the sandbox

Not sure about the last one. What do you think, @philipbelesky ? Should this be done interactively, like it is now, or moved to an initial setup component and then hidden from the end-user to avoid visual clutter?

philipbelesky commented 5 years ago

For 1: shouldn't sensorHeight measure the lowest possible point on the model that? E.g. if it is being used to make the size of the elevation color table it seems like it should bottom out there. Automatic measuring wouldn't be able to tell that, although I guess it would give a good enough value for users to tweak later.

I think moving it to a distinct setup component in the long-term would be useful, particularly if additional optional settings are added (to reduce clutter). It would also be useful if additional components are added - e.g. for a raw Point output or for isolating tokens within the sandbox - as it would allow for a number of components to share a single 'setup' parameter rather than needing to rewire everything.

mariuszhermansdorfer commented 5 years ago

Ad 1. The measurement would happen during the calibration phase, or any time the sensor is moved. One would then calibrate on a flat table, which also represents the lowest possible point on the model.

Let's keep adding our ideas to the list for the setup component and once happy with the overall scope, break these down into individual issues.

mariuszhermansdorfer commented 5 years ago

Closing this and opening #24 and #40 to track the ideas listed in this thread.