Oculus Quest Development with Houdini Unity and USD

Oculus Quest Development with Houdini, Unity and USD

Part One

This is the first in a series of articles where I look at Oculus Quest Development with Houdini, Unity, and USD. USD is Pixar’s comprehensive scene format, Universal Scene Description. I first saw the power of USD a few years ago during a Pixar demonstration that showed its power. For example, it was able to render scenes with 20+ million polygons in real-time. Now that Houdini 18 has Solaris, which is built on USD, it is now possible to easily read and write USD files.

Oculus Quest Development with Unity

First, let’s look at the Oculus Integration package in Unity. We want to make sure that we have the correct settings. In my examples, I am working in Unity 2019.3.f6. First, I always switch the platform to Android when creating a new project for the Quest. Next, I set the texture compression to ASTC. This can take time depending on how many textures there are in the project.

Oculus Quest Player Settings in Unity

 

Next, we want to make sure the player settings are correct. With the player settings open we want to make sure of the following:

  • Remove the Vulkan API from the Graphic APIs
  • Color Space is set to Linear
  • That you have the Oculus SDK installed in the XR settings.

Stereo Rendering Mode – I have Single Pass selected. I have this based on that Multi-Pass has been broken so far. Oculus released a new version February 6th but I have not yet tested Multi-View

Installing USD in Unity

Installing Universal scene description is easy. First, go to window / package manager. This will open Unity’s Package Manager. Under Advanced, we need to make sure that show preview packages are checked. Lastly, now that we have preview packages selected, all we have to do is install USD. Find USD in the list and click install.

Lastly, if you don’t want to use the Package Manager you can always pull from Unity’s USD Git Hub

Once USD has been installed, a new USD menu will appear. This is where we can import and export USD files.  Unity gives us the option to import a USD as a game object, a prefab,or a timeline clip. Furthemore, Unity gives us the option to export USDZ,the zipped format for USD.

USD in Houdini with Solaris

Other Houdini Tutorials:

Point Transformations  in Houdini

Point Transformations  in Houdini

In this introductory tutorial, we look at point based transformations in Houdini. As well, we will look at attribute-based point transformations. For example, attributes can be color, normals, velocity, or anything else. Point transformations are fundamental for many effects created in Houdini. Above all, position in Houdini is just an attribute. As a result, we can manipulate it like any other attribute. Using a VOPs based approach we will look at the Mix VOP. For example, the Mix VOP will allow us to mix two vectors, and then blend between them. Moreover, Houdini has the unique ability to operate on the point level. As well, Houdini has the ability to embed any attribute on points. Therefore, we can blend anything from position, color, and normals. In truth, we can blend whatever we like. Lastly, we will look at how we can use this with a copy to points and metaballs. We will look at how we can adjust the display settings to view the metaballs correctly. In Conclusion, the user should have a solid understanding of:

  • Using Scatter to keep consistent point counts.
  • Basic VOPs Skills.
  • Blending Attributes.
  • Using the Copy to Points.
  • Using Metaballs in Houdini.
  • A better understanding of vectors in Houdini.

This tutorial will provide a basic understanding of VOPS in Houdini. For Example, VOPS allows us to visually place nodes in place of Code. VOPS stands for Vex Operators. Vex is Houdini’s internal language for creating and manipulating geometry.

You can download a free version of Houdinihere

Other Houdini Tutorials:

Curves in Houdini

Curves In Houdini

In this tutorial we examine curves in Houdini. Curves are an essential part of 3D modeling. Houdini has the unique ability to work between NURBS curves and polylines seamlessly. For instance, with NURBS we are able to embed attributes along the parametric curve like UV. We can then easily convert the curves to polylines, maintaining any attributes. We can then use VOPS or VEX based methods for controlling new attributes. In addition these can drive any number of things. This makes it possible to manipulate any attribute we want. This can control things like object instancing, scale along the curve, or any number of other effects. It is also possible to maintain a consistent point count between the two types. Maintaining a point count is imperative to creating good tools that can create objects at a variety of resolutions. Houdini also has the typical curve tools. Lastly, we examine how to set up common operators. For example, common operators are nodes like revolves and other curve based effects, like sweep and carve.

After this one should have a solid understanding of:

  • The Curves tools in Houdini
  • UV attribute on Curves
  • Making shapes with Revolves
  • Extruding along a path correctly
  • Carving with Curves that have UV attributes

Once you have a solid understanding of curves in Houdini you will be able to create numerous effects and tools.

You can download a free version of Houdini here.

Other Houdini Tutorials:

Introduction to Houdini Digital Assets

Introduction to  Houdini Digital Assets. In this tutorial, we will examine the fundamentals of creating a simple H.D.A. As an example, we will create a tool that will make procedural I-beams of any size. In addition to being able to adjust the shape and size of the i-beam, the tool will automatically UV our object. Lastly, once the tool is finished it can be imported into Unity or Unreal Engine. Therefore we can use our tool in any application that takes an H.D.A. As a result, we will be able to create any i-beam of any size and use them however we want. In conclusion, Houdini Digital Assets are a great way to create tools for use in other applications. This lets us build modular reusable assets. This is a very quick introduction to show how easy it is to make a useful asset in Houdini. This will show you the basics of:

  • Linking parameters
  • Auto UV Maps
  • How to Build a simple interface in Houdini
  • How to correctly name and save H.D.A’s

Once you have done this tutorial one should have a solid basic understanding of Houdini Digital Assets and can explore further tutorials to increase your skills.
This is as a follow up to a lecture for a class I teach in Houdini. This is so the students can re-cap the in-class lecture. I apologize for any lack of polish. Hopefully, there will be some good information there.

You can download a free version of Houdini here.

Other Houdini Tutorials:

Houdini Height-Fields for Terrains

Houdini Height-Fields for Terrains

With Houdini height-fields for terrains, we cover the basics of creating terrains in Houdini. Houdini height-fields are 2-dimensional volumes. In addition, they are also native in Unity and Unreal Engine as terrain objects. Above all, creating terrains in Houdini artist-friendly. Moreover, we can create complex and realistic terrains.  Most importantly though Houdini allows us to use this work in other applications. Secondly, as a Houdini Digital Asset, we can use it within Unity, Unreal, Maya, and 3DS Max. Most Importantly, we will learn how to manipulate Houdin terrains in an art directable way. We will look at ways of masking, applying erosion, and adding in variation.  These masks can be used to drive foliage and textures. In conclusion, this makes creating terrains for use in real-time applications a very powerful feature. In further lessons, we will examine how we can use the Terrain Scatter tools

At the conclusion of Houdini height-fields for terrains one should have:

  • A solid understanding of heightfield workflows
  • How to create complex masks 
  • What is the Erode tool and how to use it.
  • How to interact with geometry

This is as a follow up to a lecture for a class I teach in Houdini so the students can re-cap the in-class lecture. I apologize for any lack of polish. Hopefully there will be some good information there.

You can download a free version of Houdin here

Other Houdini Tutorials:

Introduction to Rendering with Mantra in Houdini

Introduction to Rendering with Mantra in Houdini

An introduction to rendering with Mantra in Houdini. First off, we will look at creating good simple geometry suitable for rendering. For example, we make sure we have good normals, UV Maps, and materials. After this, we will look at how we set up a scene for rendering in Mantra. This means, adding in a camera and lights. Furthermore, we then look at the different parameters and what they mean. After this, once we have a scene set up we will then look at how to apply and edit materials. We will cover what is physically based rendering in Mantra. During this, I will explain why we need certain numbers to get good reflections and refractions.

Advanced Topics

In conclusion, we touch on more a few advanced topics on rendering in Houdini. As an example, how we can use the GI Light to create point clouds. These can be used for indirect illumination and caustics. Lastly, We look at how Mantra handles sampling and how we troubleshoot noisy renders.

At the conclusion of this tutorial the user should have:

  • A solid understanding of Mantra and its render properties.
  • How to make sure you have enough reflection and refraction rays.
  • What is Physically Based rendering.
  • How to set-up cameras and lights.
  • What is Global Illumination, Indirect Illumination, and Caustics.
  • How to use Houdini’s sampling pass to troubleshoot noisy renders.

Introduction to Rendering with Houdini is as a follow up to a lecture for a class I teach in Houdini. This is made so the students can re-cap the in-class lecture. I apologize for any lack of polish. Hopefully there will be some good information in there.

You can download a free version of Houdini here

Other Houdini Tutorials:

Introduction to the Houdini Interface

Introduction to the Houdini Interface

Introduction to the Houdini interface will demystify the Houdini interface for the new user. Most importantly, we will examine what makes Houdini’s interface so powerful. Much of this power comes from the fact that the interface operates much like a file system. Therefore, as a result, we can easily move data through the network. Firstly,  we will cover the basics of navigation and the scene view. After this, we will look at what are points and vertices, faces and edges. =Then we will look at how to set display preferences.

This is as a follow up to a lecture for a class I teach in Houdini so the students can re-cap the in-class lecture. I apologize for any lack of polish. Hopefully, there will be some good information in there.

You can download a free version of Houdini here

Other Houdini Tutorials:

Houdini Terrains In Unreal Engine

Terrain Generation with Houdini Heightfields

Houdini Terrains in Unreal Engine. Since Houdini 16 we can do our Unreal terrain generation with Houdini Heightfields. Heightfields are 2D volumes that are commonly used in modern game engines like Unreal Engine or Unity for terrain creation.  I use the terrain tools in Houdini to both create a realistic terrain, but also for the ability to embed splat masks. As an example, I can use the curvature of the surface as in the image above. There are multiple ways of masking heightfields in Houdini. Even more so, I can use geometry to drive shapes in the terrain.

Watch a tutorial on terrain generation in Houdini here

Anyone can download a free learning edition of Houdini on the Sidefx Website

Houdini Terrains in Unreal Engine
Houdini Terrains in Unreal Engine

Terrain Shader

Using Houdini terrains in Unreal Engine I can embed masks that I can access in a material. We can use the landscape blend node for this. Moreover, we can use any mask created with the erode node or with the mask by feature. The masks will come into Unreal with the correct naming. As an example, the erode node will give us debris, water, bedrock, etc.

Houdini Terrains in Unreal Engine

Adapative Tesselation

For the shader, I created an adaptive tessellation shader. As a result, the model will increase in resolution the closer that the viewing camera gets to the surface.

Houdini Terrains in Unreal Engine
Houdini Terrains in Unreal Engine

Procedural Foliage Spawner

Any mask that I create using Houdini terrains in Unreal Engine will be automatically available. Therefore, I can quickly create and prototype. As an example, I am using masks to drive the procedural foliage.  Moreover, All of the terrain and foliage generation is handled procedurally through Houdini’s heightfields.

Other Houdini Tutorials:

Volumetric Video for Virtual Reality

Volumetric Video for Virtual Reality

Volumetric Video for virtual reality using Google Jump, Houdini, and Nuke. I love the visual aesthetic of point clouds and their ability to represent and recreate three-dimensional space. I used to bake out final gather points out of Mental Ray. I would ombine them to re-create a static visual cue of the entire animation sequence. At the time, I would also use them as combined elements for lighting calculations. With Houdini, working with point clouds is just so much fun. Currently, point clouds are everywhere,. We use them from everything from storing values, geometric reconstruction, and volumetric video. I can also just enjoy their pure visual beauty.

Google Jump Point Clouds in Post Production

Depth Maps

We can now get depth maps from the Google Jump Assembler in resolutions up to 8k. This allows us to implement some more advanced film techniques into the world of virtual reality production. As well, we can begin to see how we will start to create new production workflows. In the near future there will be tools for handling volumetric video. We will use this for 3d reconstruction in order to create a more immersive experiences. While not “light-field” in that this won’t represent correct light changes that are view-dependent, it will allow for greater depth and parallax. As well, it allows for better integration with CGI in the world of Stereo Virtual Reality. This is very tricky and inherently has problems.  In these examples, I am using the Foundry’s NukeX, Cara VR, and Ocula on the front end. Houdini from Side Effects on the back end.

Google Jump Point Clouds in Post Production

Point Clouds

This image shows the perspective of the viewing camera of the scene with both point clouds from Nuke and Houdini merged using deep and viewing through nukes viewer. The 3D tree is rendered through Mantra with a deep pass using the point cloud generated out of Nuke as reference geometry. This is important for correct spatial alignment of depth, as the depth, in this case, comes from the Google Jump Stitcher. This is not a spatially accurate representation of real-world depth, rather a spherically projected approximation. At this time, the biggest caveat is the 8-bit banding. This can be solved with a special plug-in that would incorporate a bilateral filter that would process the points while preserving edge detail.

Google Jump Point Clouds in Post Production
Google Jump Point Clouds in Post Production

Photogrammetry

Reality Capture  is my current go-to program for photogrammetry. I am just getting the hang of how it functions but it is incredibly fast, especially if you compare it Agisoft. These photos were a test using my studio space. This is with only 377 photographs. I can see where I need more camera positions to capture the whole space and will shoot it again soon. The maximum amount of images that I can do with the version of Reality capture that I have is 2500, I am not sure that I need that much, but I would like to test with around 1500.

Other Relevent Projects:

Vertex Colors in Maya From a Houdini Alembic File

Vertex Colors in Maya From a Houdini Alembic File

Since I have been using Redshift as my need speed, go to render engine when I just won’t have time for Mantra.  I have been beefing up my Houdini to Maya Alembic pipeline. While straightforward, there are a few caveats. In this particular case, I was wanting to get my point/vertex colors from Houdini into Maya. One needs this if you want to render geometry with the baked-in colors from Houdini. A few notes, you will need to have a Cd attribute in Houdini of type vertex. In Houdini, Cd will usually be a point attribute, so a simple attribute promote will do the trick here. Just promote your Cd attribute from point to vertex and you should be good to go.

Importing into Maya

Unfortunately, the GUI Maya alembic importer does not do the trick, so we just need to import via the script editor with some very simple Mel. All you need to do is make sure you have the alembicImport plug-in on and type the following Mel command:

AbcImport -mode import -rcs “myPathToMyAlembic\myAlembicFile.abc”;

Obviously, you will substitute your own path and file name. You should now see your alembic file in Maya with the vertex colors in the viewport.
Now that we have our geometry imported correctly and we can see the vertex colors, we need to set up our Redshift shader, though we are using Redshift in this example, this method works for Mental Ray and Vray. In the modeling context, under Mesh Display you can see the Color Set Editor, which you can open to find the name of your color set. In our case, coming from Houdini, it’s just Cd.

Next, just create a redshiftVertexColor and under General. In the box labeled Vertex Set, just add in the name of our color set. In this case this is Cd. Now you just conncet the out Color to whatever slot you want, and hit the render button.

Other Houdini Tutorials: