Last updated: Sep-26-2023
Want to elevate your website's impact and improve content velocity? We’re ramping up Beta customers for Dimensions, an exciting new 3D product.
We invite you to join a 30-minute exploratory call and apply to join our Private Beta. Fill out this survey to apply.
Cloudinary supports 3D models in various different formats and allows certain transformations as described on this page.
These models are used in the examples below:
CldLogo3D.glb: a GLB file, uploaded as an
DamagedHelmet3D.gltz: a zip file, uploaded as an
imageasset type, containing a glTF file and other associated files.
foyer-table.fbxz: a zip file, uploaded as an
imageasset type, containing an FBX file and other associated files. [© HippoStance]
cute-kitty.glb: a GLB file, uploaded as an
imageasset type. ["Cute Little Kitty" https://skfb.ly/ospAT by Diskette96 is licensed under Creative Commons Attribution.]
For example, the
DamagedHelmet3D.gltz file can be requested as a PNG file (
f_png) as follows:
Or, by specifying the .png extension:
You can then apply further transformations to the image, for example:
By default, the image is rendered at a resolution of 640 x 640 pixels, but you can change that by scaling the model before applying other transformations, for example:
The image rendering size is particularly relevant if you want to use a resize/cropping action other than scale that will result in an image greater than 640 x 640 pixels, for example,
c_fill,w_1500,h_1000. If you don't specify the size to render the image from the model first, using, for example,
c_scale,w_1500, then the
c_fill action will upscale the default 640 x 640 pixel image, resulting in a lower quality image.
Therefore, the best practice in this case would be:
You can also customize the 2D image you create from the 3D model by specifying the position of the camera, the exposure, zoom and lighting to capture your perfect shot.
The camera always points towards the center of the 3D model and can be rotated around it.
For full syntax details see the camera effect in the transformation reference.
For example, capture a JPG image of the
foyer-table 3D model (
f_jpg) with the camera positioned at an angle of 20 degrees above the table (
up_20), rotated 30 degrees to the left (
right_-30), zoomed in to 110% (
zoom_1.1), with "pillars" lighting (
env_pillars) and 1.4 amount of exposure (
Try out the different camera effect settings on the cute kitty 3D model.
*It can take a few seconds to generate a new image on the fly if you've tried a combination of settings that hasn't been tried before. Once an image has been generated though, it's cached on the CDN, so future requests to the same transformation are much faster. You can learn more about that in our Service introduction.
To generate a 360 animated image from a 3D model, use the animated flag and specify a file format that supports animation, such as WebP (
f_webp,fl_animated). The following example generates a 360 animated WebP from a GLB model of the Cloudinary logo, with the camera positioned 30 degrees below the model, and starting at 15 degrees to the right, capturing 20 frames (
To generate a 360 video from a 3D model, use the animated flag and specify a video file format, such as MP4 (
f_mp4,fl_animated). The following example generates a 360 video from an FBX model of a foyer table (in addition to applying other image transformations):
3D model zip files are uploaded as image types, so make sure you set the
resource_type parameter to
image when implementing the video tag:
You can optimize the mesh buffer in glTF files using Draco compression. To apply Draco compression, use the
draco flag (
fl_draco in URLs):
- If you use the .gltz extension, the whole zip file is delivered containing the modified glTF file, referencing the Draco mesh.
- If you use the .gltf extension, only the modified glTF file is delivered.
You can deliver a 3D model (uploaded as an image type) in any of the formats that are supported for encoding.
|3D format||Supported for upload
as an image type
|Supported for encoding|
So, for example, you can deliver an OBJ model as GLB, or a glTF model as USDZ. However, you cannot deliver a glTF model as FBX, or a PLY model as OBJ.
To deliver a model in a different format, either:
- Specify the 3D format as the extension on the public ID (see Example 1), or
- Set the
formattransformation parameter to the required format (see Example 2).
GLB is the binary file format representation of 3D models saved in the GL Transmission Format (glTF).
DamagedHelmet3D glTF model as a GLB model by setting the extension to
.glb, as follows:
USDZ (Universal Scene Description) is a file format for 3D models, introduced by Apple for its ARKit, to display 3D models on iPad, iPhone or Mac.
foyer-table FBX model as a USDZ model by setting the
format parameter to
usdz, as follows:
You can replace the texture of a 3D model by using the swap_image effect. This effect takes two parameters,
image to a file reference variable, initialized with the public ID of the new texture to use (any image). Set
index to the index in the model to swap with.
In this example, the image at index 0 is replaced with the raindrops image that's in the docs folder:
You can also use a base64 encoded URL of a remote image as the texture by setting the file reference variable to
!fetch:<encoded URL>!. For example:
You may be interested in using our AR/3D Viewer to display your models. Learn more...