How to create 3D content precisely aligned with the physical environment using Mega Studio
This document introduces how to use Mega Studio on Unity to accurately place virtual objects at specific positions in real-world spaces, ensuring precise alignment with the physical environment in AR experiences.
Before starting
- Refer to the document Is My Localization Library Ready? to confirm that the localization library has been properly created and the Mega Block is added.
- Prepare the 3D assets to be used in the Unity project.
Precisely placing 3D content
Accurately position virtual content in the real world by completing the following steps.
Mounting 3D content under the Block node
After loading the Block dense model, mount the 3D content under the Block node in the scene as its child node.

Fine-tuning model position
Adjust the position and rotation of the 3D content against the dense model in the scene to achieve the desired placement and orientation.
[Optional] Fine-tuning model position using panoramic images
Click the load button next to the panoramic marker in the Inspector panel to display panoramic markers in the scene.


Click any panoramic marker to place content at its position in the panoramic view. You can switch between panoramics by clicking different panoramic markers to verify the 3D content's position is accurate from various angles.

What if the loaded Block model isn't level
Select Block Root in the Hierarchy panel, then adjust the Rotation in the Inspector panel until the dense model appears correctly oriented in the Unity editor.
Important
Block Root is the parent node of all Block nodes in the 3D engine scene tree.
The Transform of Block Root in world coordinates does not affect the local coordinate system of the Block, and therefore does not affect the rendering of 3D content as child nodes of the Block. Its Transform is irrelevant to the final display effect.
What if the loaded Block model has fragmented or missing parts
During 3D reconstruction, incomplete model sections may occur due to insufficient coverage of capture angles.

For incomplete models where alignment precision isn't critical for fragmented/missing areas, place 3D content by clicking panoramic markers and referencing panoramic images. Verify results by clicking nearby panoramic markers from different positions.

If high alignment precision is required in fragmented/missing areas, perform map supplementation or updates via incremental updates or lossless full updates. Typically, such areas indicate insufficient capture coverage during scanning, where Mega localization performance may be compromised. Merely aligning 3D content in the editor is insufficient.
Next steps
- Further verify placement accuracy through simulation using the session verification tool.
- Enhance AR realism by adding accurate environmental occlusion to the scene.