Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Model Target Loading Times

Discussion in 'Vuforia' started by YordStudio, Apr 15, 2019.

  1. YordStudio

    YordStudio

    Joined:
    Feb 1, 2019
    Posts:
    2
    I am working on application with model targets with large models, so even after decimating it has around 1milion polygons. Creating Model Target in generator is ok. But importing model ( changing database to new database) takes even a few hours. Is there any was how to optimalize this process? I was trying to cut model into smaller parts but i cant load more than on model target at once. Thanks for suggestions.
     
  2. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    The Model Target Generator recommends a maximum of 400,000 polygons or triangles for an imported 3D model.

    Model import time is normally a direct function of the size of the device database, and the device model that it is being loaded upon. What is the size of this device database?

    Here is a list of additional tips for improving Model Targets detection and tracking. I hightlighted the suggestion that may be helpful in reducing the size of your 3D object (if needed).
    1. Correct scale of the model is important for detection and tracking. Confirm that the scale of your CAD model is an accurate representation of your physical model. We also recommend using meters as your unit of measurement.
    2. A more detailed model should provide a better tracking experience.
    3. Which elements to remove from your 3d model may depend upon the experience you're trying to create. For example, if you want to detect a car from an exterior vantage point, then the interior elements are not going to provide benefit to detection and tracking and as such you can consider removing them.
    4. Connected or fused meshes do not necessarily improve performance.
    5. Remove transparent geometry from you CAD data. For example, if you are trying to detect a car, it is recommended that you do not include any of the windows or lights in the CAD model that will be used for the Model Targets dataset.
    6. Include texture differences in your CAD model. Using the car example again, if the car has a decal painted on it or has a segment, such as the hood, that is a different color from the rest of the model, make sure that is included in your CAD model. This difference in texture will be used in the detection of the target, although it is difficult to quantify how much this can improve performance.
      • The current model targets is not designed to work with realistic-looking textures with many different colors. They work best with single-colored surfaces that contain logos, etc.
      • There are two ways to add these elements to the 3D model:
        • Map a texture onto the model. Probably the simplest solution, since you should already have that from the cylinder targets. The texture image should ideally come directly from your design software and not be from a scan of the can.
        • Use geometry with different colors. Different colors will be considered as different materials. No special material IDs are needed.
          • The “different colors” used *do not* need to match the actual colors that appear on the physical object. The difference in colors will provide the geometry needed by the SDK for detection.
    7. Use different colors on the model when there are different materials or colors on the real object. While Model Targets is designed to detect objects by shape, giving additional information on the materials will often greatly improve detection robustness.
      • There is no need for model colors to match the colors of the real object - the specific color is not relevant, just the differences in colors.
      • Colors can be used to indicate different parts with small gaps in-between that are strongly visible but are difficult to extract from a rendered view. One example is the area between the body and the door of a car.
      • If possible, avoid single-color models and file formats that can’t transport color information such as STL.
    8. Simplification tools, such as Simplygon, are able to process logos and transform them into geometry (edges). However, if you used Blender for simplification, it may destroy this info.
    9. Model targets is designed to be used with CAD-like models that use only a few colors to indicate different materials. Please avoid photorealistic textures from game-like models, or photogrammetry scans. If you need to use photogrammetry scans, please remove the texture before importing into the MTG.
    10. Try a different guideview for your target. If the guideview you are using doesn't contain enough of the geometry of your target, you may encounter issues detecting it. Often times a slightly angled view of the target will provide better results than a direct front view of the target.
      • Recommended to avoid fronto-parallel viewpoints and choose diagonal views for detection, where possible.
    11. There are a few of different approaches to a different guideview you could try that may result in better performance:
      • Try zooming in on the section of the object with the most geometry for your guideview, while keeping the rest of the model out of the view of the guideview. This will allow detection to be based off a smaller portion of the Model Target that is rich in geometry, but also will keep the rest of the model present. While moving back to see the rest of the model you will begin mapping the surroundings and likely end up with a better tracking experience.
      • Another potential guideview would be closer, but at an angle from the front-left or front-right of the object. This will allow you to get the full object in view, but also start closer and allow more tracker mapping as you move around the object.
      • Avoid highly cluttered areas on your object as detection views, such as areas with heavy wiring or highly repeated structures. Choose a view that has sufficient distinctive geometry without too many small details. It is not necessary to see the whole object for detection, but you can zoom in onto a suitable area if that is feasible for your application.
    Note: Material differences are used for Model Target detection, but they do not appear in the guide view. Thus, the guide view is not the final indicator for object geometry.

    Thanks,
    Vuforia Engine Support