Yeah really amazing effort @phoboz !
Some sample project would be nice to have
Thanks for the feedback!
I’ll upload some samples / video tutorials as soon as I’m back from holidays
But essentially it’s just:
- Drag and drop TXT or XYZ to content browser (importer should work with any column-based text file)
- Select columns to import
- Drag and drop the imported asset onto the scene
Wow, that was much simpler than expected!! worked flawlessly with a 1.5 GB xyz point cloud, nothing short than amazing!
Just one question about LODs, how does the curve work? How do I define which LOD should be used at which distance (and how can I visualise which LOD is being used and where)?
Performances in general are pretty good with the default settings, but I’m trying to squeeze out a bit more of performance for a VR project.
X axis is the distance, Y is the LOD level. Each subsequent LOD halves the point count inside the section. Depending on the bounds of the cloud, it might be useful to tweak the section size to not generate massive amounts of draw calls (those are displayed in the stats panel).
There’s currently no way to visualize the LODs.
EDIT : Found the solution, Cloud Compare shifts your model to compensate for 32bit coordinates on 64bit clouds, you have to shift it back to 0 to get your cloud to look good
Hey @phoboz ! I’ve been benchmarking your plugin the last two days and I have a problem, although I’m not sure if this is from the plugin or my exports…
I’m importing an ascii based cloud and getting this weird banding in UE4.
Model looks fine in Cloud Compare.
Now a lot of our models have coordinates very far away from 0,0,0 and I noticed that the banding was present in CC until I centered it on import. Could it be the same kind of problem in your plugin with 32bits coordinates instead of 64bits giving us approximative results ? The UE4 import seen above has been recentered using the “first point” Transformation offset by the way.
Another thing you might have noted on the screenshots : it seems that the model is mirrored compared to its source ?
This indeed looks like lack of precision. I only had this happen for large clouds with half precision selected (as it then uses 16 bit floats), confirm that you didn’t accidentally enable it.
Try centering it using cloud center option and see if it changes anything (it shouldn’t, but it won’t hurt).
Alternatively, depending on how the points are ordered it might be the auto LODing - does it also show with LOD0?
The data is internally stored as floats, so if the original offsets are large enough it could be causing the bottleneck. I might add an option to import and store the data as doubles up until its handed over to UE4 rendering. This should allow for transform modifications without accuracy loss at the expense of double the size footprint.
I don’t know why it comes through mirrored, which axis is reversed? You can use negative scale for it to flip it back until I find the issue.
Right so it looks a lot better now, nothing to do in unreal, it was all CC witchery (see edit in previous post) !
I was using 32bit floats for the plugin, nothing changed in the source header.
On the LOD subject, every time I try to enter a 0 value on X for the lod curve the engine crashes. So the LOD0 is actually LOD1 ?
Looks like the mirrored axis is X if I compare the model in UE and CC.
LOD0 should be the original data. What is the cloud’s VRAM size (you can find it on the info panel of the cloud)?
It may crash if you exceed the VRAM of your GPU.
Getting this error when trying to build plugin in a project
Severity Code Description Project File Line Suppression State
Error Plugin ‘PointCloudPlugin’ (referenced via default plugins) does not contain the ‘PointCloud’ module, but lists it in ‘Y:\20180415_PointCloud\UE4\PointCloud\Plugins\PointCloudPlugin\PointCloudPlugin.uplugin’. PointCloud Y:\20180415_PointCloud\UE4\PointCloud\Intermediate\ProjectFiles\EXEC 1
Which plugin version?
Which engine version?
Please confirm that the plugin contains folder “Source”
You may need to regenerate project files if you added the plugin to the existing project. To do this, right click the project file and select regenerate project files (or similar)
The plugin contains module called PointCloud, using the same name for the project may cause ambiguity issues. Please check whether the same happens if you rename the project. In case the naming is the cause of the issue I will change it for the next version.
We are using an 8gb 1080. I’ll check and edit with this morning’s results.
By the way, do you have any plans to make your plugin runtime compatible ? Being able to import point clouds at runtime would be pretty awesome, you’ll just have to make a few presets before compiling, a VR/2D viewer UI and code and bam !
EDIT : yeah this could be definetly tied to VRAM, I’m using 5gigs with LOD1 already… Time to get a bigger GPU I guess
haha, thanks man. Looks like naming the project the same as the plugin was a problem!
I can see some other problems that i wont be able to address right now before its tested!
Is there anyway to output these datas from an existing environment?
Should already be runtime and blueprint compatible, although not tested this in 0.2
I’m working on section streaming and full instancing for sprites - those should mitigate the issue for most clouds.
For now you could try low precision if the bounds aren’t too large (otherwise you’ll get the striping effect) or using small values for point density reduction to achieve finer control of total count (tho be prepared to stare at the progress bar for a while with such large clouds ;))
I’ll rename the module to avoid this problem in the future.
Do let me know what other issues you encountered so I can try to fix them
What do you mean?
Huh, I have absolutely no clue on how to use the plugin it with bp at runtime though, I see a bunch of classes in the C++ folder but you can’t do much with them (can’t even add a PointCloud component to an empty actor, you have to create a new actor of type PC for it to work).
There should be a set of static blueprint functions. Right click on an empty space and browse Point Cloud category.
Right now the plugin generates components procedurally from the Point Cloud Actor, I’m planning to change it to only use a single component per cloud and expose it for BP creation.
Alright got them. How would you go about importing point clouds from an external source on your build though ? There’s quite a bunch of plugins like Rama’s for txt, csv, etc… Would this be enough to import an asset ? How would you go at converting it into a PC asset ? I’ve got absolutely no clue when it comes to C++ code so getting my own importer coded is kinda ruled out…
Haha, no worries, I’m back home tonight, so will try to put some step by step together