Canyon Scene Reconstruction: Rendering Point Clouds from Reconstructed Meshes

Photo of Rick Barrett

Instructor Rick Barrett

Share this video
  • Duration: 04:39
  • Views: 5008
  • Made with Release: 19
  • Works with Release: 19 and greater

Render Point Clouds from Reconstruction or Lidar Points with Vertex Colors in Cinema 4D.

The Vertex Color tag allows Cinema 4D to display colored points within the interface, but there’s no native way to render those points. In this video, you’ll learn how to use a custom Python Effector to color clones based on a Vertex Color tag. With this technique, you can easily render point clouds from Scene Reconstruction or Lidar data and control their appearance using MoGraph effectors.

show less

Transcript

In this video, we're going to look at a technique for rendering out the Point Cloud that's generated by the scene reconstruction engine. So we've been working so far with the mesh and this time we're going to actually do something with the Point Cloud. The Point Cloud here has been hidden the whole time. There it is. I'm going to hide the features from the tracker, so that those don't get in our way. And what we want to do is render this Point Cloud and we'll do that via, again, the Cloner object. So we're going to create a new MoGraph Cloner, and we're going to clone a sphere. So we'll go ahead and create a sphere object. We'll rename the Cloner PointCloud and we'll drop the sphere under the Cloner, and we want to make this pretty small. We'll gauge the size a little bit later, but I'm going to start with four centimeters. And I'm also going to just drop the segments down to just something like six. With the Render Perfect option on, when we're using the C4D Standard Renderer, they're going to render perfectly spherical anyway, so you can adjust the segments as needed. Now in the Cloner itself, we want to again, switch into Object mode and we're going to clone onto the Point Cloud itself. So we'll drag the Point Cloud down into the Object field. So we should have a Point Cloud now that we'll actually render in the view. And there we can see it. Now if you don't need your Point Cloud to actually reflect the color from the footage, you're done. This is all that needs to happen. However, if you want to pull in the color that's in the vertex color tag, we need to go an extra step. And for that, I've created a Python Effector that will allow you to actually transfer the colors from the vertex color tag onto each of these clones. So for that, we'll go ahead and load an object. We'll choose Merge Objects and we'll grab the Vertex Color Effector, that C4D file. That's in the downloads that are attached to this tutorial. Go ahead and click the Open button and it'll bring that effector into the scene. We need to apply it to the Cloner object so we'll switch into the Effectors tab and drag the Vertex Color Effector down into the tab. And the effector itself, we need to give it the Vertex Color tag that actually contains the colors for these points. So we'll drag this Vertex Color tag from the Point Cloud down into the Vertex Color field. And now we'll render, and you'll see that we're pulling the colors out of the actual Vertex Color. It looks like we could actually make our spheres a little bit bigger here. Let's go ahead and go up to eight and see how that looks. And that's looking pretty nice. Now, this will render just like this, no problem. But if you want to do anything extra with the material itself, you need to know how to transfer these colors into the material system. And to do that, you need to create a new material. And in here, you'll want to apply the MoGraph Color Shader. And depending on what you're trying to do, you can apply it in the Color, the Luminance, even the Reflectance channel. We'll go ahead and put it in the Luminance channel, and we'll go ahead and choose the MoGraph Color Shader. And this shader basically just transfers the object color or clone color into the material system. And we can apply that material now onto the Point Cloud. And now we render again. And this is what we end up with. It's a little bit brighter now because I've transferred it into the Luminance channel instead of having it be affected by the scene shading. Now of course, the great thing here is that because this is a cloner, we can again use all of the effectors and their falloffs to actually control this Point Cloud and wipe it onto the screen in 3D space. So again, we'll take the cloner and go into the Effectors tab, and we'll just drag that same Plane Effector in, that we were using earlier for the wire frame. And now, that Point Cloud is going to appear as the effector's falloff moves through the scene. This is going to be a little bit hard to see here in the view port, so I'm going to go ahead and render it out and you can see the final result here. So that's a look at how you can achieve a Point Cloud effect with the effector and how it combines with the wire frame effect we created in the previous tutorial. There's one more effect I'm going to show you and that's how to create topographical lines and you'll see that in the next tutorial.
Resume Auto-Scroll?