How to Create X-Ray Point Cloud Renders in NUBIGON and MeshLab
A rough transcript of the video can be found below.
(00:00):
Hey everyone, this is Lou at Lightpoint and today I'm going to show you how to take a point cloud that's been colorized with photographs and give it that X-ray look.
(00:13):
Okay, so this is the point cloud that we're going to be working with. This is a Genesis GV80 that was created using Leica's RTC360. These points are just colorized via photographs. And we're going to take this and give it that X-ray look. So the first way we're going to do that is with a program called NUBIGON Pro, and this is a program that I found while searching around on the internet trying to find a method to create that X-ray vibe. It's far from free, it's $99 a month the way that we're currently paying for it, I think you can also sign up for a perpetual license. I'll put that in the notes.
(00:51):
So here we're going to import that same point cloud. Our point clouds are in PTS format, and NUBIGON has the ability to import that.
(01:03):
Alright. So once you navigate to the point cloud, this dialog is going to pop up. The format of the Lightpoint exemplars is X, Y, Z, and then scalar, R, G, B. And that's generally going to be true if you're working with FARO or Leica data. So we're going to click okay here, and then we're going to be presented with another dialog asking about the offset type. So this doesn't really matter if you're just bringing in one point cloud, but if you're going to bring in multiple point clouds, and the coordinate system origin matters, then you can change it here. So we'll keep that as is origin. We will ask NUBIGON to compute the normals, that's going to be necessary for the X-ray vibe, and it does that pretty darn quickly too. When you're working in CloudCompare, if you ask CloudCompare to generate the normals, it takes a few minutes. This is a little bit quicker, but still takes about a minute or so, I believe to import here. We are going to remove duplicates. So any points that it deems as identical, it'll remove for us.
(02:07):
Alright, so the point cloud has been brought in, it's originally going to be displayed as R, G, B. Everything's just going to be colorized with the photos. So we have a little project tree over here. So when we select the Genesis point cloud, I'll just expand that out a little bit. That 0.004 is my subsampling by the way. So I have it subsampled a little bit. Let me just go back to the top view. But once we click on this point cloud in the project tree, we get a few options. So under material attributes, if we go from the display to being surface, to X-ray, then you'll start to see immediately some cool looks to the presentation. So there's a few things that we can mess around with here.
(02:49):
I'm not going to show all of this right now, but one of the big things is you can change the look of it based on the point color itself. So in other words, the seats are black, the car is white, so it's going to display accordingly. Or you can go off of the object color, and object there being the point cloud itself. So that's going to present as a single color, which actually looks really cool depending on what color you select. So this is just white, that looks great. I can go with a futuristic look in blue, which looks beautiful as well. So you can mess around with that and get the look that you're going for. This is really useful when you're doing impact configuration or something like that. You want to make one car blue, one car red, one car green, whatever you're doing.
(03:34):
Then you can go and get a little bit fancier and go into the elevation tool. So now it's looking at a reference plane at the bottom of the tires and changing the color based on the height from that. So one thing I'm seeing here from the top down view, pretty fine views, top down. F5, you can see the wheels are tweaked a little bit and that is because we're looking at it. We're not looking at it orthographically. So let me just figure out how to get into the orthographic view.
(04:07):
I think we click on camera here, yeah. And then get to ortho, okay. So there you go. Now we're in the orthographic view. So going back into the X-ray, you can go from the elevation. Under the elevation menu, you get a few different color scale options. That's the default. You can add a little more blue in there. You can go with purple haze which is just purple to white. So there's a bunch of different looks you can get to it there. This program does a really good job with those presentations. It looks beautiful, and very easy to work with.
(04:47):
So now I'll show you how to accomplish this in MeshLab. MeshLab is free, it's freeware similar to CloudCompare, which is fantastic. It has the ability to generate similar graphics, but they're not quite as polished as this. So the first step, the real trick to getting it to work in MeshLab is to save this point cloud as a PLY. And before even doing that, you have to compute the normals. So if you click on the point cloud here in the project tree, and then go to edit, normals, compute, that will start that process. And there's not much to do once you're in there. Your local service model is going to be plain. And then I have found that generally speaking, the defaults work well. So that's going to take a couple of minutes, I've already done that to save us a little time in the tutorial. Then you're going to save as a PLY and I'll just show you how to do that for those that aren't familiar with saving out of CloudCompare.
(05:47):
All right, so the trick in CloudCompare for saving anything really is to select the file type. And then once you've named it accordingly, I'll just do "Tutorial," type in the suffix, .PLY. That seems to help a lot with writing the file in the proper format. I think if you don't do that, it's just going to write it as a text file and not as a PLY file.
(06:11):
So pretend I hit saved. We have that already. Now we're going to pull up MeshLab. So bringing it into MeshLab is easy. Once you have the PLY saved, you'll just drag it into this screen and this is what you'll get. MeshLab is really a tool that is meant for dealing with meshes, of course, hence the name. But you can deal with point clouds.
(06:33):
So if you go to render here, and then shaders, then there's the xray.gdp down here. And it doesn't look great to begin with, but we can mess around with these sliders until we get it to have that look that we're going for. So same things going on here. You can get into an orthographic camera view to get those wheels so they're not looking tweaked there.
(07:02):
So you can mess around with these and get that X-ray look to be however you want it to look, intensity wise. But I haven't found a way to make the colors really as beautiful as they come out in NUBIGON. So that's one of the big reasons that I'm using NUBIGON right now. I also like the animation capabilities, so you can spin a point cloud around and create nice graphics like that as well. So hope that helps you figure out the X-ray vibe.
(07:32):
The other tool that is good for this is a Leica tool that I'll talk about in a future tutorial, and probably in a future email. So stay tuned for that one. We're messing around with one of their newer products that is looking really promising and capable. So thanks for checking it out. Hope that helps.