VR in SOLIDWORKS Visualize Professional

This month we will see the first virtual reality (VR) headsets released from Oculus since Facebook took over the company, which can be viewed as a something of a push toward finally make VR mainstream.

Both the Oculus Quest and Oculus Rift S are less expensive than their predecessors from Oculus, coming in at around $300 each.

The Oculus Quest contains its own GPU, so there is no need to buy a VR-capable PC to run it, and the Oculus Rift S is a cheaper version of the original Rift but with a few improvements. You will need a VR-capable PC to run the Rift S, but again, at $300 for the headset, there is now a lower financial barrier to entry.

So, to celebrate this apparent dawn of low-cost VR, we will take a look at SOLIDWORKS Visualize 2019’s VR capabilities.

Recap

You may recall, in previous articles we did a tutorial on creating animations in the Visualize Professional 2019 Car Simulator, and we also took a look at the rendering capabilities available in Visualize Professional 2019.

In this article, we will build on those previous articles and show you how to make a little 3D VR video. So, you might find it helpful to go back and read the car simulation article if you haven’t already done so, as we will assume some basic knowledge of that feature in this article.

Camaro

Alrighty, then. We are going to use the Camaro model that comes with Visualize Professional, because it’s pretty and we think it will look nice in the VR with some light bouncing off it.

So, go ahead and load up Visualize Professional 2019, and then load up the Camaro model. Just load up the software, go to Sample Projects, and load up the Camaro1969 project, which is shown in Figure 1.

Figure 1. Sample model from Visualize Professional.

For our demo, we will be using a nice outdoor background, so go ahead and navigate to the File Libraries pane on the right-hand side of the screen, select Environments, then select Cloud. Our HDRI image is in the cloud library.

Once you have done that, scroll down the tiles and locate the Industrial Lot HDRI file and either double-click it, or drag it into the 3D Viewport.

If you’ve done that correctly, then your scene should look a little something like what is shown in Figure 2. Remember to go to the Appearance tab, select the Industrial Lot tile, go into Advanced, and select the Flatten Floor setting to ensure that the car is sitting on a flat surface.

Figure 2. A nice HDRI makes all the difference.

You can play around with the part appearances if you like. We have changed the paint to a Chameleon Pink color, which is found in the Vivid Metallic Paint appearance library.

At this point, the scene is looking a bit dark still, so we can add a few lights and play with the camera bloom settings to get the scene looking a little brighter.

Hey, Dawg, We Heard You Like Neon…

Now would be a good time to look at the emissive materials available in Visualize Professional.

We’re going to put some neon tubes all over this ride, because hey, dawg, we heard you like neon. This gives us an excuse to look at the bloom settings on the camera and also direct modeling within the Visualize environment.

First up, you’re going to want to model a neon tube.

To model basic shapes in Visualize Professional, simply go to the model browser pane, right-click in the Model Sets area, select New Model, and then choose a Cylinder (see Figure 3).

Figure 3. The model browser pane.

You can then go to the Transform tab and scale your cylinder about the three axes so it more closely resembles the proportions of a neon tube.

Next, you will want to mate the tube to the underside of the car, so that it travels with the car during the animation.

To do this, simply select the cylinder from the model browser pane, navigate to the Transform tab, scroll down to the bottom, and locate the Follow/Mate button (see Figure 4). The mating system is vastly simplified compared to SOLIDWORKS proper.

Figure 4. The Transform tab.

All you have to do is ensure that the cylinder is selected, position the cylinder where you want it on the main body, click Follow/Mate, and then select the body you wish to mate it to. In this case, we want it mated to the 1969 Camaro body. There. The cylinder is now mated to the body of the car.

Emissive Appearances

Finally, we want to add some glowing materials to our now-mated tubes.

This is easy to do. Simply head to the Appearance tab, right-click in the appearance area where the other appearances are displayed, and click New Appearance from the menu (see Figure 5).

Figure 5. The Appearance tab.

Now, go into the Appearance Type menu and select Emissive, as shown in Figure 5. We have boosted the brightness a little. From here, you simply drag and drop the new emissive appearance onto your tubes (see Figure 6).

Figure 6. Model tubes inside Visualize Professional itself.

Now, in order to get the light from those tubes bouncing off the floor, we will need to change the floor reflections of the environment a little, though not too much: these settings can dramatically affect GPU performance when it comes to rendering!

To add some reflections to the floor, simply navigate to the Scenes pane, click the current (Industrial Lot) environment tile, go into the Advanced section (see Figure 7) and nudge the Floor Reflection up to 0.04. We don’t want to go too high, or else it will make the road surface look like it’s been raining. We can boost the roughness up a little, and if you have a powerful GPU, you can boost the caustics. Be warned, though, when it comes to rendering for VR, you need to render a very high resolution. And that will take time.

Figure 7. The Advanced section of the Scenes pane.

As you can see in Figure 8, the floor reflection is done.

Figure 8. PIMPED!

Now that we have a bit of glow coming out from underneath the car, we can add a few more emissive materials to the rest of the car to create some headlights and taillights.

To achieve this, simply repeat the emissive appearance process that you did previously. Just create a new emissive appearance, and drag and drop it onto the headlights (see Figure 9).

This is not the most realistic method, but unfortunately, there is not currently a method for mating a spotlight or directional light to the car body. We hope SOLIDWORKS will take note of this need.

We want movable light bars and directional lights for animating police chases!

Figure 9. Why not add some emissive materials to the headlamps too?

VR Time

OK, now that we have got our car set up to look a bit prettier, we can start positioning the cameras for the VR rendering work.

We can render both still images in 360 degrees and also animations.

Let’s start with a still image.

First, go to the Camera tab and create a new camera. Then right-click, select New Camera, go in the General tab, and select 360 from the Type menu (see Figure 10).

Figure 10. Adding a 360 camera.

You can now position the 360 camera in the scene by using the shortcut keys or the sliders in the Transform tab.

Bear in mind that you will only see a single image when the real-time render view is set to Preview mode. To see the actual panoramic view, you will need to select Fast, Accurate or PowerBoost. You can see the resulting panorama in Figure 11.

Figure 11. Panoramic!

The 360 camera can be programmed to follow a motion path, or it can be left static. If you want to learn how to set motion paths for cameras, take a look at our previous article on Visualize’s car simulator.

In our demo, we have opted to leave the camera static, and we have used the physics simulator to control the vehicle around the camera. Again, refer to the previous article to learn how to control the vehicle.

After recording the vehicle motion into the physics simulator, the simulation will be sent to the animation timeline, and you will be ready to begin rendering.

Rendering the 360 animation into video follows the same procedure as a normal video—except it takes a heck of a lot longer because you are rendering at a much higher resolution (and also some glowing pink lights in this case).

To begin the render, open the Output Tools menu from the top ribbon (see Figure 12). Then select the movie option from the icons on the left (it’s the one with the little clapper board).

Figure 12. The Output Tools menu.

Be sure to check the Adjust for Virtual Reality playback box, as this will provide you with a list of VR ready resolutions, all set to a 2:1 aspect ratio, which is what you need for 360 panoramic playback on a VR headset.

Clicking the Render Options tab will allow you to select from the default VR resolutions, starting with a minimum of 4K resolution and increasing from there.

For our demo, we actually disabled the VR playback option just to achieve a quicker render. We manually inputted a 2K resolution with a 2:1 aspect ratio, and we also decreased the render passes down to 200 passes per frame.

After a whopping 15-hour render, you can see the results below. So much for “quicker”!

The finished panoramic VR video.

You will notice in the video that there is a lot of noise on screen, especially around metallic areas with a lot of reflection. This is because we had the render passes turned down.

When rendering a professional VR video, you may wish to boost the number of passes quite a lot.

For an 8K render, with 500 passes, for 20 seconds of footage at 25 FPS, it would have taken almost a week to render our demo video.

You may also notice the pink neon is quite prominent—distractingly so. Always perform a test render before committing to a full render first, kids!

After this tutorial, you now have an idea of how to create your own VR videos using SOLIDWORKS Visualize Professional. And, as you can see from the full resolution still images, if you have plenty of GPU power lying around, you can make some pretty amazing and photorealistic animations when you crank the settings right up.

Of course, if you don’t have weeks to spare for rendering, or if you don’t have a super powerful GPU, then you can always use SOLIDWORKS Visualize Boost and outsource some of that rendering to a second machine. This is the exact type of job it was made for!

If you’d like to see more VR goodness from SOLIDWORKS Visualize, and what a moving camera looks like, you can watch the video of a private jet walk-through in the video below.

Until next time…adieu!

Recent Articles

Related Stories

Enews Subscribe