uncategorizedBeginner5 min

Getting Started with Frame Environments

Learn how to bring your own 3D models into Frame as custom environments.

Beyond the Frame environments you can choose in our environment picker, you can upload your own 3D models to be the environment for your Frames. We have some requirements and some tips and tricks to get you off the virtual ground with your own beautiful models. Once you have your file by following all of the guidelines below, [this video](https://youtu.be/fBV5JjO-onA) shows you how to actually upload it to your Frame. For starters, your model must be a **.glb model** and be no more than **50MB** in size. We will occasionally make exceptions to this if you want to upload a larger model (email hello@framevr.io if you do), but we encourage you to try to get your model well below that size limit to ensure good performance and decent load times for your Frame. Also, the environment model must have a bounding radius of **500m or less**.

  • Frame runs from a web browser - optimize for VR, mobile, and older desktops.
  • Keep file sizes low for the best audience reach.
  • We're here to help at hello@framevr.io if you're struggling with your model state.

GLB/GLTF

As mentioned, we only support .glb models. .glb is the binary, single-file form of a **gltf model**. You can learn more about the gltf format [here](https://www.khronos.org/gltf/). It's a flexible, open-source format that is specifically designed for web environments like Frame. Most 3D design tools have native .glb export tools or plugins/extensions that let you export your models to .glb. We make most of our models in Blender, or they at least end up there before we do our final exports, because we have found that Blender has the best support for the gltf/glb format. That said, Microsoft makes [an exporter](https://github.com/Microsoft/Exporters/tree/master/Blender) for 3ds Max, and many other tools besides Blender have native glb exporting available. You can ensure that your model is a valid gltf/glb model [here](https://github.khronos.org/glTF-Validator/). Overall, if you're new to GLTF, and especially if you also use Blender, this is [a great article](https://v-art.pro/3d-design/gltf-the-jpeg-of-3d-models-and-how-to-optimize-it/) with some good tips.

Spawn Spot

The origin point (0, 0, 0) of your 3D scene will be the default spawn location for users that enter your FRAME, so make sure that you strategically position your origin point. If your model has an origin point that is far away from the model itself, it may not even work at all. Also, avoid having the origin point of your scene directly inside any enclosed geometry in your environment. Ideally, your origin point is at an open area with not too much going on around it, to help your users not feel overwhelmed when they first spawn in your space.

Textures/Materials

You should limit the amount of textures in your model, and definitely avoid really heavy textures. If you can avoid using textures where you can instead use vertex colors or color palettes, then do so. If you're having a hard time reducing the heaviness of your textures and you want help, let us know at hello@framevr.io and we'll see how we can help.

Considerations with the Blender GLTF Exporter

Your material definition in the Blender node editor is not always completely honored in the process of exporting to .glb. There is somewhat of a narrow path in terms of meeting the exporter's expectations. We suggest enabling the Node Wrangler Blender add-on. Use the **CTRL + SHIFT + T** to open the Node Wrangler from within the Node Editor. Navigate to the folder with your PBR textures, select them, and click the button for the Node Wrangler to constitute the node material definition. Then, set your external assets to be automatically packed and reduce your PBR texture maps to 512x512 or maybe 1024x1024. Then, export and your environment should look good in Frame. Be sure to adjust the scaling of the mapping nodes in your editor to reflect the level of tiling you want.

Geometry and Poly Count

  • Reduce your poly count as much as possible.
  • For geometry that you can duplicate, set them up as linked duplicates in Blender.
  • Use back-face culling where appropriate.
  • For advanced compression, apply **Draco compression**. You can use tools like [Cesium's gltf-pipeline library](https://github.com/CesiumGS/gltf-pipeline).

Navigation Mesh

Frame automatically generates a nav-mesh based on your uploaded environment. However, if you want to bypass this and define your own mesh, you can include another file when you upload your 3D environment, a .glb file including **__nm** in the name. Check out [this tutorial](https://learn.framevr.io/post/creating-your-own-navigation-mesh) on creating your own navigation mesh.

Lighting

There is no real-time lighting in Frame (yet), so we suggest using unlit materials and baked lighting/shadows. To create unlit materials in Blender, use the background material type. If you are familiar with advanced techniques, you can leverage lightmapping. Create a gorgeous environment using tiled textures and bake a lightmap. Export your environment as a **.glb with __lm** in the name and your lightmap as a **.jpg with __lm** in the name. Go to one of your frames and click "UPLOAD ENVIRONMENT". Select both your .glb and .jpg files. *Note: each mesh requiring the lightmap should have a second UV set, and meshes that aren't using the lightmap should contain __skiplm in the name. Note that you need not provide any specific node graph defined material for lightmapping used in Frame. We only require the second set of UVs and the separate LM file.*

Real-time Lighting

You can also include your own lights in your glb file. Keep in mind that PBR materials that respond to real-time lighting will take a toll on performance. If you want to turn off the default Frame scene light, you can do that in your Frame settings. Lights can also be animated like in [this example](https://www.babylonjs.com/demos/animatedlights/).

Scale and Animations

In FRAME, we try to respect **"1 unit is 1 meter"**. To make this easier to visualize, [here's a model](https://cdn.framevr.io/models/avatars/avatar_scale_reference.glb) of one of our avatars so that you can scale your model accordingly. Typically, avatar eye height is 1.6 meters. Frame also supports the playback of animations that are baked into your .glb model! You can even animate lights.

Seats and Easy Panels

Frame has special environment assets with behaviors like seats and "easy panels".

Adding Seats

  • Add an empty in Blender and name it "**fcta**".
  • Place it on top of the object you'd like the avatar to sit on.
  • Align the local y axis to the direction you'd like the avatar to face.

Easy Panels

  • Make an empty and name it "**ezpanel**". It will face its local y direction.
  • Scale at a ratio of 1.8y:1x for correct button placement.
  • Enable "**Show wall buttons**" in your frame settings.

Video Tutorial

For more detail, check out our video on [Seats, Ezpanels and Navmeshes](https://youtu.be/fBV5JjO-onA).

Custom WebGL Shaders

Include shaders from [our Frame Library](https://api.framevr.io/v1/shaders) or create your own with the [Babylon Node Material Editor](https://nme.babylonjs.com/). In Blender, tag the mesh name with: **shader_nm_#yoursnippetid**. For more detail, check out [this dedicated blog post](https://learn.framevr.io/post/custom-shaders-and-particle-systems-in-frame).

Target Metrics

  • **30 draw calls**
  • **130,000 active faces**
  • **20 materials**

Optimization

If you're looking for ways to optimize your scene take a look at our page on [performance](https://learn.framevr.io/post/optimizing-performance-in-frame). You can also test your model in the [babylon sandbox](https://sandbox.babylonjs.com/).

Ready to build with Frame?

Join thousands of creators who are building amazing 3D experiences with Frame VR.

For technical assistance, please contact us at support@framevr.io or reach out via our Discord community.

For general inquiries or feedback about Frame, please email hello@framevr.io