Objective:

  • Automatically obtain a list of available design object from backend compiler (either local or remote compiler)
  • Correspondingly auto generate a list of buttons for generating new objects

Auto obtain available design list from compiler

In our previous version of the system, the available object list is hard-coded, and the only available obects are Stool and SimpleTable. In this new version, the list is auto obtained from the web interface of the compiler, by analyzing html text and using regular expression to match the pattern of object creating links. And then generating button list accordingly (and therefore in the same order as in web interface).

(Another tidier way: should be able to obtain directly from compiler by adding a json file to the compiler, could be done later.)

Current available objects could be roughly divided into three catagories: Furniture (Stool, SimpleChair, SimpleTable, RockerChair), Boat (BoatBase, Canoe, Catamaran, Trimaran, CatFoil, Tug), and Robot (Paperbot). In future work, the categories and available items can be extended, especially in Robot category. (as seen in the attached image)

Button features

Main features:

  • Detect whether a given point is within the range of a given button (not consider perpendicular axis of the button plane)
  • Measure the distance between a given point and a given button (only consider perpendicular axis of the button plane)
  • Change color when the given point is both within range and within distance threshold
  • Specific button functions (create target objects, export, delete, exit) are defined in a separate main script where canvas (with the whole button list) and gestures are both called as API, this part only deals with features directly related to buttons (drawing buttons, obtain button names, button position, etc)

Within Range Function:

  1. Project a given spacial point to the button plane
  2. Detect whether the projection is within the square using cross product: \((AB \times AE) * (CD \times CE) \geq 0\) and \((DA \times DE) * (BC \times BE) \geq 0\)
    (where \(A\), \(B\), \(C\), \(D\) are positions of four corners of the sqaure, \(E\) is the projection of the given spatial point in the same plane of the square)

Vertical Distance Function: projection of the vector (center point of the button towards the spatial point) on the normal perpendicular vector of the button plane

Interface suggestion

It is suggested that a list of buttons floating in the mid-air might not be the most intuitive or aesthetic way to present the available object list. Some possible ways to improve it could be:

  • Vocal demand of the targeting design object
  • Images (instead of names) of design objects in the list, and allow user to "drag" those 2D image to the 3D virtual environment and become 3D design object in the process
  • Add sliders to make the browsing process similar as we used to browse on phones
  • Use gestures to imply creation, for example, two flat hands might imply creating a SimpleTable (would be difficult for more complicated objects)
  • To be added (open to suggestions)

Some random fun thoughts: In the 3D VR world, a spatial problem can usually be solved by both mathematics and physics method. For example, to detect whether a spatial point touches the surface of a button: use mathematics, detect whether the project is within ranage and vertical distance is within threshold; use physics, add rigidbody to the buttons and detect collision. Usually both methods would work with difference in computational power and precision (here we are using mathematics to do the work). And it is actually the same with the real world as in virtual world, so it is fun to think how many things in the real-world is "solved" by mathematics, and how many by physics, when considering the universe as a large "world simulator".

Next Post Previous Post