Featured Image
Software Development

Unlocking the potential of 3D graphics in digital products

As businesses strive to capture and retain user attention, one technology stands out for its ability to transform digital experiences: 3D graphics. Far from being a mere visual enhancement, 3D graphics bring a new dimension to user interaction, creating immersive and engaging experiences.

Imagine browsing a furniture store online where you can place virtual 3D models of furniture in your room to see how they fit or a mobile fitness app that uses 3D avatars to demonstrate exercises with precise, interactive animations. These examples illustrate how 3D graphics can elevate user experiences, making interactions more intuitive and enjoyable.

But how exactly does 3D product visualization achieve this? By the end of this blog, you’ll have a clear understanding of how 3D graphics can not only enhance your digital products but also position your business at the forefront of innovation. 

Whether you’re a developer looking to expand your skill set or a business leader aiming to boost user engagement and ROI, this comprehensive exploration of 3D graphics design will provide you with the insights and tools you need to succeed.

The strategic value of 3D graphics design

3D graphics enhance the aesthetic appeal of digital products and drive user engagement and return on investment (ROI). For example, Shopify merchants who use 3D and AR product visualization experience a 94% increase in conversions, as users can interact with products more realistically and make more informed purchasing decisions.

In the real estate industry, virtual property tours powered by 3D graphics have significantly boosted sales. Listings that include a 3D virtual tour typically sell for up to 9% more on average and close up to 31% faster, depending on the market.

By leveraging 3D graphics, businesses can create more compelling user experiences that lead to higher engagement, customer satisfaction, and, ultimately, increased revenue.

Enhancing user experience and engagement

3D graphics provide an immersive and interactive user experience that 2D graphics cannot match. This is particularly crucial in industries such as e-commerce, where visualizing products in 3D can significantly enhance the shopping experience.

In the context of real estate, virtual tours are already becoming an essential tool for enhancing the buying experience. A prime example of this is Zillow’s 3D Home Tours. Zillow offers free 3D home tours that allow anyone to virtually walk through properties. 


Source

Using 3D graphics and panoramic photos, users can explore homes in detail, moving from room to room and getting a feel for the space as if they were there in person. This feature is accessible to everyone, making it easy for potential buyers to view multiple properties from the comfort of their own homes without any cost.

By providing these free 3D tours, Zillow enhances the user experience by offering a more immersive and comprehensive way to view properties. 

Driving differentiation and competitiveness

Leveraging advanced 3D graphics technology can significantly enhance product appeal and set a brand apart in a competitive market. By offering unique and visually engaging experiences, businesses can captivate their audience and foster stronger connections.

Nike, a prime example, has successfully integrated 3D graphics into its customer experience. The brand’s customization feature allows users to design their shoes using an interactive 3D interface, offering a highly personalized shopping experience. This innovative approach not only deepens customer engagement but also bolsters brand loyalty.

Generating over 51.22 billion U.S. dollars in revenue in its latest financial year, Nike has retained its first position as the world’s most valuable apparel brand for the 7th consecutive year. 

The value of 3D graphics skills for developers

For developers, mastering 3D graphics technologies like Three.js and WebGL is a valuable skill set that can open up numerous career opportunities. With the growing demand for immersive digital experiences, expertise in 3D graphics can make developers more competitive in the job market and enable them to contribute to cutting-edge projects that push the boundaries of digital interaction.

Developers proficient in 3D graphics can contribute to creating engaging user interfaces, interactive websites, and innovative applications across various industries. For instance, a report commissioned by Epic Games and conducted by Burning Glass Technologies found that demand for 3D graphics skills has grown 42% faster than the overall job market. Real-time 3D skills, a subset of 3D graphics, are experiencing even more rapid growth, with demand increasing 601% faster than the overall market.​

Transformative 3D applications across industries

The integration of 3D graphics into digital products and apps is transforming various industries by offering enhanced visualization, better planning, and more engaging user experiences. Here are some key examples across different sectors:

City Planning and Infrastructure 

ArcGIS Urban by Esri is a sophisticated city planning tool that uses 3D modeling to bring urban development projects to life. With its intuitive interface, urban planners can visualize city landscapes in three dimensions, enabling detailed scenario planning and impact analysis. 


Source

The platform supports collaborative efforts by allowing stakeholders to access and interact with the same models, ensuring a unified vision and efficient project execution. Features like real-time data integration and comprehensive analytics make ArcGIS Urban an indispensable tool for modern urban development.

B2C and B2B map apps

Cesium is an open-source platform that takes 3D geospatial data visualization to new heights. Used extensively in industries such as aerospace, defense, and urban planning, Cesium enables the creation of interactive and detailed 3D maps and models. 

Its real-time data streaming capabilities and high-performance rendering ensure that users can manage and analyze complex datasets with ease. The platform’s flexibility and scalability make it ideal for both large-scale enterprise applications and specialized geospatial projects.

Healthcare 

Siemens Healthineers is a global leader in medical technology. Syngo. via is their advanced visualization software that uses 3D graphics to enhance diagnostic imaging. 

It helps radiologists and clinicians to interpret complex medical images, plan treatments, and perform virtual surgeries, thus improving patient outcomes.

Industrial and energy sector apps

Dassault Systèmes is a global leader in 3D design and engineering software. The 3DEXPERIENCE Platform integrates 3D modeling, simulation, and data management for industrial applications. 

It supports the entire lifecycle of products and infrastructure projects, from design to manufacturing and maintenance, enhancing efficiency and innovation in industrial and energy sectors.

Fintech applications

Fidelity Labs, the R&D arm of Fidelity Investments, explores the use of 3D graphics and virtual reality for financial planning. 

Their immersive wealth management tools allow clients to visualize their financial goals and portfolios in 3D, providing a more engaging and intuitive experience for understanding complex financial data.

Geospatial services and B2B mapping

Hexagon is a global leader in digital reality solutions. Their Luciad Portfolio offers powerful geospatial software solutions that enable real-time visualization and analysis of dynamic data in 3D. 

This is particularly valuable for defense, transportation, and energy sectors where situational awareness and spatial analytics are crucial.

3D graphics tutorial: a guide to implementing 3D graphics with Three.js

To do anything useful in WebGL requires quite a bit of code and that’s where Three.js comes in. Threejs 3d models handle scenes, textures, materials, lighting, 3D math, objects, and shadows. This makes working with WebGL easy and convenient.

After following this guide, you’ll be able to add your first 3D scene with its custom 3D object imported from 3D modeling tools like Blender and interact with those 3D objects.

Let’s get started with step by step guide on working with Three.js

1. Installation

For this example, we’ll install Three.js from the NPM registry and use the Vite build tool.

# three.js
npm install --save three

# vite
npm install --save-dev vite

In our project, we’ll also create index.html and main.js and link the main.js to the HTML file with type=”module”.

<!-- index.html -->

<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="utf-8">
  <title>3D app</title>
  <style>
   body { margin: 0; }
  </style>
 </head>
 <body>
  <script type="module" src="main.js"></script>
 </body>
</html>

To run the project,

npx vite

2. Getting started

// main.js

import * as THREE from 'three';

const scene = new THREE.Scene()
const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 500)

const renderer = new THREE.WebGLRenderer()
renderer.setClearColor(0xffffff)
renderer.setSize(window.innerWidth, window.innerHeight)
document.body.append(renderer.domElement)

Let’s take a moment to understand what is happening the the above code.

Scene : Scene is like a 3D space where you can set up objects which will be rendered by three.js. You’ll add lights, objects, and cameras to the scene.

PerspectiveCamera : This camera class replicates the way the human eye sees. PerspectiveCamera accepts a few parameters:

  • fov : FOV (short for Field Of View) is the extent of the scene that will be displayed at any given moment. The value is in degrees.
  • aspect ratio : This is the aspect ratio of the view of the camera. Usually the canvas width/canvas height
  • near , far : This is a threshold of what objects need to be rendered by the camera. The objects outside this range will not be shown by the camera.

WebGLRenderer : This is a WebGL renderer that displays the scenes onto the canvas using WebGL.

  • In the above example, we are setting the color and size of the canvas. And adding the canvas domElement to the HTML.

Now that we have the pieces together let’s add a cube. To renderer a shape three.js provides a bunch of Geometry classes. Amongst them, we’ll use BoxGeometry which is a geometry class for a rectangular cuboid.

// main.js

const geometry = new THREE.BoxGeometry( 1, 1, 1 ); 
const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); 
const cube = new THREE.Mesh( geometry, material ); 
scene.add( cube );

camera.position.z = 5;

Here we are creating a BoxGeometry with width: 1, height: 1, depth: 1 . To paint over our cube geometry we have created a MeshBasicMaterial with a color. Using Mesh we have combined the geometry with the material. Finally, we are adding the mesh to the scene to be rendered onto the screen. By default, all the objects in the scene will be added to the coordinates (0, 0, 0). We have also moved the camera on z axis so that it can see the cube.

So far it will not render anything on the canvas because we haven’t told the renderer what to render.

// main.js

function animate() {
 requestAnimationFrame( animate );
 renderer.render( scene, camera );
}
animate();

In the above code, we have told the renderer which scene to render and the camera that’ll display our scene.

Notice that we have added animate function to requestAnimationFrame . This will create a loop that causes the renderer to render the scene every time the screen is refreshed.

3. Animating the cube

Since the animate function is running on screen refresh, anything property we change in that function before renderer.render will update it on every refresh cycle (normally 60 times per second)

// main.js

function animate() {
 requestAnimationFrame( animate );

 cube.rotation.x += 0.01;
 cube.rotation.y += 0.01;

 renderer.render( scene, camera );
}
animate()

This will rotate the cube on x and y axis.

Congrats, you have successfully added a 3D object on the web page and animated it. But this is just a basic cube. In your application, you may be required to import more complex models and materials.

4. Working with Custom models

For this example, we’ll use a very basic donut that I’ve created in Blender. You can find the assets in my repository mentioned at the end of the blog.

To load custom models and materials from the third-party modeling tool three.js provides a bunch of Loaders that can load the object and materials into three.js and add it to the scene.
I have exported this donut into .obj file format from the Blender. This donut also contains custom material which is exported in .mtl file format by Blender. So for this, we’ll use MTLLoader class to load material and OBJLoader class to load the object. These classes are provided by three.js as an add-on.

// main.js

import { OBJLoader } from 'three/addons/loaders/OBJLoader.js';
import { MTLLoader } from 'three/addons/loaders/MTLLoader.js';

...

const light = new THREE.DirectionalLight(0xffffff, 10)
light.position.set(0,100,100)
scene.add(light)

let donut = null
// Loading the material first
const materialLoader = new MTLLoader()
materialLoader.load("assets/donut.mtl", (mat => {
    const objLoader = new OBJLoader()

    // assigning material to the object
    objLoader.setMaterials(mat)
    objLoader.load("assets/donut.obj", (obj => {
        donut = obj
        scene.add(obj)
    }))
}), (xhr => {
    console.log(xhr)
}))

function animate() {
    requestAnimationFrame(animate)
    // rotate the custom object (donut)
    if (donut) {
        donut.rotation.y += 0.01
    }

    renderer.render(scene, camera)
}

animate()

Here we have first loaded the material and then assigned that material to the object loader. Then loaded the custom object and added it to the scene. We’ve also assigned a custom object to a local variable to animate it later.

To view the material we have added a light source of white color to the scene. Without a light source, the donut will be rendered with the material but we won’t be able to see the material.

You should see a tasty-looking spinning donut on your page.

The future of 3D in digital products

As technology advances, the potential for 3D graphics in web and mobile applications continues to grow. The integration of 3D graphics can provide superior user experiences, drive engagement, and enhance product differentiation. By adopting 3D elements, businesses can highlight their product’s value, create immersive online experiences, and much more.  

Real-time 3D rendering

With advancements in graphics processing units (GPUs) and software optimizations, real-time 3D rendering is becoming more accessible and efficient. 

Technologies like Vulkan and DirectX 12 are pushing the boundaries, enabling developers to create highly detailed and interactive 3D environments that can run smoothly on various devices. This trend is particularly significant for gaming, virtual reality (VR), and augmented reality (AR), where real-time interactivity is crucial.

Web-based 3D experiences

WebGL and libraries like Three.js are making it easier to create rich 3D experiences directly in the browser without the need for additional plugins. 

This capability is expanding the possibilities for web developers to integrate 3D graphics into websites and web applications, making them more interactive and engaging. From e-commerce product visualizations to virtual tours, web-based 3D experiences are becoming more mainstream.

3D graphics in mobile apps

The rise of powerful mobile devices has paved the way for sophisticated 3D graphics in mobile applications. Developers are creating more engaging and visually appealing apps, from mobile games to educational tools, using advanced 3D graphics. 

Apple’s ARKit and Google’s ARCore are also enabling developers to create AR applications that blend digital content with the physical world seamlessly.

Procedural generation and AI

Procedural generation, powered by artificial intelligence (AI), is another trend transforming 3D graphics. AI algorithms can generate complex 3D models and environments automatically, saving time and resources for developers. 

This technology is used in various applications, from creating expansive game worlds to designing intricate architectural models.

Conclusion

The integration of 3D graphics into digital products is a strategic move that can drive engagement, differentiate your offering, and improve your bottom line. By leveraging the power of 3D graphics, businesses can create superior user experiences that stand out in a competitive market. For developers, mastering these technologies can unlock numerous career opportunities and allow them to contribute to innovative projects.

Whether you are enhancing an e-commerce platform, developing educational tools, or creating immersive gaming experiences, 3D graphics can transform user interactions and drive business growth.

At Aubergine Solutions, we specialize in developing cutting-edge digital solutions that incorporate advanced 3D graphics. Our team of experienced developers and designers are experts in creating interactive and visually stunning applications tailored to your business needs. From conceptualization to deployment, we ensure that our solutions not only meet but exceed your expectations.

Code resources: https://github.com/HetPatel72/three.js-basic

author
Het Patel
Software engineer at Aubergine Solutions