Forum Replies Created
-
AuthorPosts
-
Sean Robinson
ParticipantWelcome to the forum.
With OpenGL and C++ experience, you should have a good start to the changes you want to make. If you have the math background to handle vectors and transformations between 3D spaces, even better.
The classes in Vrui are used for most of the math in the sandbox. Being familiar with Vrui will likely make your task easier.
https://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/OverviewGeometry.html
Brainstorming with you… My approach to a circular box would be to fit an equation for a circle or cylinder from Kinect data; this would be an additional calibration step. Make a circular black-and-white texture from the equation and blend it in OpenGL to create a clip region.
IIUC, the water boundary shader handles removing water that leaves the box edges. So, maybe the same circular texture could be combined with the boundary shader to change the shape of the box edge.
This is an interesting change to the usual sandbox design. Please share photos/links when your sandbox is complete.
September 8, 2023 at 7:53 am in reply to: Complete step by step guide including setting up rain buttons and other features #2618Sean Robinson
ParticipantWelcome to the forum.
Water control buttons and fluid texture changes (e.g. water, lave, sewage) are add-ons that will take some figuring. I have not seen anything for these features as comprehensive as Oliver’s base sandbox set-up videos.
For water buttons, you can check the options I list in External button for rain/drain.
Detailed plans for lava replacement of water are shared in Switch texture water to lava.
Sean Robinson
ParticipantThe latest recommended Linux version can be found at the beginning of https://web.cs.ucdavis.edu/~okreylos/ResDev/SARndbox/SoftwareInstallation.html
Sean Robinson
ParticipantOliver had a post on the old forum that uses an arcade USB encoder to send standard keyboard keys when the “arcade” buttons are pressed. He includes instructions for configuring the sandbox to use the buttons.
The Wayback Machine has his post for “USB Button Solution”, but I cannot include the URL.
Also, there are USB keyboards with one, two, five, etc. buttons. This way, the only sandbox setup is to assign tools (drain/rain) in the configuration file. I do not know how the output values are assigned to the keys, but I suspect it requires Windows for the initial setup.
Another example is Liudr’s AR Sandbox controller. He gives instructions for building flood and drain buttons using an Arduino microcontroller.
https://liudr.wordpress.com/2017/12/29/augmented-reality-sandbox-control-using-arduino-feather/
Sean Robinson
ParticipantI have not tried the FURB software (Caixa and custom SARndbox), but it looks like it could be made to work with the newer sandbox software. The second idea is to add the Caixa water spring changes to the latest SARndbox.
I’ll add my notes in case someone wants to try porting the spring sources to SARndbox 2.x. Below here are my speculations from watching the video, reading the source code for the various components in Caixa, and their source changes to SARndbox v1.6.
There are two parts: 1) measurement of the target (black-top-surface hemispheres) coordinates with Caixa; and 2) modifications to SARndbox to read the measured points from a file and add local water at those points.
The modified SARndbox reads the spring coordinates and uses a modified
Sandbox::LocalWaterTool::addWater
to add water to several “S” points. Sandbox::LocalWaterTool gains a::registerPoint
helper function to add “S” points.If someone wants to work on this feature, I’d be happy to advise.
Sean Robinson
ParticipantThe first idea, and immediately workable, is to use
xdotool
. With xdotool:1- move the mouse to a spring source
2- press the local water key
3- wait some time
4- release the keyRepeat this in a loop (in a script) with several spring sources.
As an example, here are xdotool commands to add water at three locations, each for a tenth of a second. (This assumes the ‘r’ key has been assigned to “Manage Local Water” in SARndbox.)
search --name "^SARndbox$" windowactivate %1 mousemove --window %1 --polar 0 200 keydown 'r' sleep 0.1 keyup 'r' mousemove --window %1 --polar 90 200 keydown 'r' sleep 0.1 keyup 'r' mousemove --window %1 --polar 270 200 keydown 'r' sleep 0.1 keyup 'r'
If there is not enough water from each spring, increase the rain strength with the
-rs
argument or patch your SARndbox to add the rainStrength pipe command.Sean Robinson
ParticipantThank you for sharing the video. I had not seen the Universidade Regional de Blumenau (FURB) project before.
…I can’t talk with the creators…
Is it a language issue or are they not responding?
I see two possible ways to accomplish multiple springs. I’ll split the ideas across posts in case I have to fight the spam filters.
Sean Robinson
ParticipantThe BenQ MX631ST looks to have a native 4:3 aspect ratio, so that should be simpler. Otherwise, it appears to be the same as the MW632ST.
I would try to disable any image processing by the projector. In the projector menus, set the aspect ratio to “Real” and disable digital zoom by setting it to “1.0”.
Sean Robinson
ParticipantHm, so that yellow frame is supposed to outline the sandbox? After reading the source code for
CalibrateProjector.cpp
, I see you’re right.I suspect the yellow frame does not match the sandbox because your projector (and ours) has a wider aspect ratio than the software originally expected. A 4:3 ratio is hardcoded into
CalibrateProjector
, while a BenQ MW632ST projects in a 16:10 aspect ratio.I’ve never seen the yellow frame match the physical box and it has not been a problem. I recommend ignoring the yellow frame and calibrate as normal.
Sean Robinson
ParticipantOne possible way to do this is to cut out a hand silohuette. Just as a trial, I once cut out a trace of my hand on cardboard and stood it over the sand with a short PVC pipe. It worked to make an artesian well on the sand.
We do not use the hand silohuette because part of the fun is the interactivity and group effort. Assign a student to make the rain hand shape. Rotate student helpers as arms become tired.
Another way is to use the “Manage Water Locally” tool. Place the mouse cursor where you want the rain/spring and press the assigned key to add water at that spot. I believe this could be automated with
xdotool
(for Xorg or the similarydotool
for Wayland) to place the mouse pointer and virtually press the “Manage Water Locally” hot key. I think it would be possible to assign a command key in SARndbox to run a script for a local water source. I have not tried this.Sean Robinson
ParticipantYou are not the first to encounter this problem.
@solanic has made updates to theBuild-Ubunutu.sh
script for LM 21.
@marcocspc is running the sandbox in an Ubuntu 18.04 container on an Ubuntu 22.04 host.A third option would be to install LM 19. This is the latest “officially” supported version, but your IT department may not like a post-end-of-life OS on their network.
Sean Robinson
Participant@robbo I agree that turning the camera or projector is a solution. Calibrating the Kinect and projector as they are should also work.
I was wrong (darn faulty memory) to say the virtual disc will project onto the real disc after calibration, but the red cross-hairs will follow the center of the real disc. And the sandbox projection should match up with the sand forms.
Sean Robinson
ParticipantIf I am picturing things correctly, I believe you are fine for this point in the calibration. Only use the disc color as feedback during calibration: yellow means a capture will not work, while a green disc means the Kinect has a good reading to use for calibration. Ignore the position of the projected disk until after you have captured at least nine tie points, then the projected disc should closely follow the real disc.
Oliver covers this in his calibration video, but I know I was confused the first time I saw the disc projected on the wrong side of our sandbox.
Sean Robinson
ParticipantPlease post a transcript of a terminal session where you run the failing command and the errors you receive. Also, include the output of the terminal command
ls -lR ~/src/scripts
and the contents of/home/alfredo/src/scripts/weather.sh
.I suspect you have all the pieces in place and it is just a matter of patching them together.
Sean Robinson
ParticipantWelcome to the forum.
Could you post a transcript of the commands you type and the output you see? The context (current directory) and specific name used to start the command are important.
I’m looking for something like the commands in Step 11″
cd ~/src/SARndbox-2.8 ./bin/CalibrateProjector -s 1024 768
But I want to see what commands you are using.
-
AuthorPosts