Point Cloud Plugin

@ Thanks dude, that shader update worked a treat. at the moment I’m trying to draw lines between points within the cloud, for now I can draw line to random vector position within bounds.But, do you know if it is possible to access the transform of vertexes in the point cloud, I’ve seen an example to get vertex point in static mesh, can I convert the point cloud to static mesh somehow?

You can access the point data (same data you import), but you’d have to use c++ for this as I don’t think I’ve exposed it to blueprints. Look inside PointCloudRuntime/Public/PointCloud.h for info.

If you meant the individual vertex data of the sprites, then no, as those are being positioned inside material. You’d have to look at the transformation material function (inside plugin material folder) and essentially do the same process, but on the CPU side.

No conversion through the plugin is possible at the moment

Thanks so much for updating that so quickly, works perfectly now!

I have some more questions:

  1. Is there any way to introduce controllable/random rotation into the sprites? So that each sprite could still be camera-facing, but rotated a certain amount?

  2. I would like to be able to render point clouds outside the main pass into the stencil buffer. Unfortunately, all the rendering settings (PointCloudActor->PointCloudComponent->Rendering) are inaccessible. Is there any way to make these settings accessible?

  3. Is there also a way to counteract the roll of the camera? I’m using this in VR, and all the sprites rotate with the roll of the HMD - in a particle system you have the option of choosing ‘Remove HMD Roll’ to offset this. Is there a away to do something similar in a material?

Thanks!

There is now :slight_smile:
Download v0.3.2 and the Transform node will now have an input for rotation. Its in a form of float3(Roll, Pitch, Yaw). As it adds extra vertex instructions it’s disabled by default - you’ll have to plug Static Bool with the value of True to the UseRotation input to enable it.

It applies the rotation prior to the camera facing calculations by default, but you can change that by setting relevant input.

If it’s just a matter of exposing the parameters through PCA then it should be quick, but something tells me it won’t be :slight_smile:

Simple answer: no.
Complex answer: you’d have to try to subtract the roll applied by the transformation node.

I’ll add this to the list for the v0.4 release

Amazing, thanks!

Now that you’ve added the ability to rotate the sprites, there’s a relatively easy way to offset the HMD roll, though I don’t think there’s a way to do it entirely within the material since you can’t seem to access camera rotation in a material. On my Pawn I’m just taking the camera roll and remapping from -180 -> 180 to -PI -> PI and then setting that in a Material Parameter Collection. Then using that value as the Z component of the Rotation on the SpriteTransform node. Works perfectly, thanks!

Of course, I forgot about MPC :slight_smile:

I’ve just discovered an issue - something in this plugin seems to conflict with tessellation. After adding the plugin to a project, you can no longer create materials with tessellation.

Here’s some repro steps (this is on the 4.18 version, don’t know if it’s different for 4.19):

  1. Create a new project
  2. Create a new material
  3. Set Tessellation Mode to ‘PN Triangles’
  4. Compile material - compiles fine.
  5. Shut down project and add plugin to the project folder
  6. Open up the material again and try to recompile it, and you’ll get this error:

[SM5] /Engine/Private/HitProxyVertexShader.usf(27,3-34): error X3000: unrecognized identifier ‘FVertexFactoryInterpolantsVSToDS’

I searched for this error and it seems people get it when trying to use tessellation with particles, but this error is occurring in a totally blank project with a material not anything to do with particles.

Any thoughts why this is happening?

Thanks, added to the list.

Looks like the material compiler is after a struct (my guess is, function as well) in the shader code that’s not there. I believe it should be a reasonably quick fix, and if so I’ll release the shader file update like before.

@ thanks for the help, I’ve never written a line of c++ code in my life, so I’ll probably try a work around for now, but I’ll stay posted in case you add static mesh conversion or access to the point transforms through blueprint. Cheers.

Hi @ , do you have any idea why toggling “visible” and “hidden in game” does not seem to have any effect on the point cloud mesh?

Is there any way to enable collision on Point clouds?

Using Sprite Disp

lay mode if that makes a difference.

Strange. It should work. Added to the list and will investigate :slight_smile: thanks
​​​​​​​

Not yet, but I will be looking into that soon.

I have just checked and both seem to work just fine in 4.18 and 4.19. For SetVisibility / ToggleVisibility you have to select to propagate to children.

Could you confirm that it’s reproducible in an empty project? If so, please post reproduction steps.

Hi @, is there a way to still import CSV as data table? It always wants to import a point cloud. If I disable the plugin then restart unreal to import the CSV will it break the point clouds I currently have?

May you try to set Visibility or HiddenInGame on the client side? Also for us, it works correctly on server/single player, but it does not work on clients. Obviously we also set PropagateToChildren to true.

Yes - instead of drag and drop, click Import inside the Content Browser, then you can specify how to treat the file by selecting correct option from the dropdown.
For example, selecting Point Cloud (*.csv) will result in importing the CSV as Point Cloud, but selecting Comma-separated values (*.csv) should import it as a Data Table.

With that in mind, I think I will remove the CSV as Point Cloud to avoid ambiguity (as you can always easily rename the PC to *.txt).

As for disabling the plugin - any blueprint using PC functionality will no longer compile, the PC will be removed from the scene and you won’t be able to edit it anymore (obviously), but as long as you don’t re-save anything, it will be back to normal as soon as you re-enable the plugin.

I haven’t tested multiplier before, surprised it even works! :slight_smile:

Both, HiddenInGame and xxxVisibility seem to work fine on clients. Here’s the screenshot of my test setup:

Version release: 0.3.3

  • Fixed material compiler errors related to tessellation
  • Fixed editor crashing when running multiplayer with dedicated server
  • Exposed Blueprint access to point data (position and color)
  • Removed *.CSV as recognized point cloud extension to avoid ambiguity with DataTables

Sorry , the problem was a variable not correctly replicated which was causing a strange behavior. I confirm your plugin works correcly :wink: however, thanks for your time!

Hey , just downloaded the latest version and tried to build it with my (C++) project, and it throws these compiler errors:


2>D:\Project\Plugins\PointCloudPlugin\Source\PointCloudRuntime\Private\PointCloudHelper.cpp(864): error C2664: 'T *FindObject<UEnum>(UObject *,const TCHAR *,bool)': cannot convert argument 1 from 'UPackage *' to 'UObject *'
2>        with
2>        
2>            T=UEnum
2>        ]
2>D:\Project\Plugins\PointCloudPlugin\Source\PointCloudRuntime\Private\PointCloudHelper.cpp(864): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
2>D:\Project\Plugins\PointCloudPlugin\Source\PointCloudRuntime\Private\PointCloudHelper.cpp(892): error C2664: 'bool IsValid(const UObject *)': cannot convert argument 1 from 'UMaterialInstance *' to 'const UObject *'
2>D:\Project\Plugins\PointCloudPlugin\Source\PointCloudRuntime\Private\PointCloudHelper.cpp(892): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
2>D:\Project\Plugins\PointCloudPlugin\Source\PointCloudRuntime\Private\PointCloudHelper.cpp(894): error C2027: use of undefined type 'UMaterialInstance'
2>E:\UE4\EngineVersions\UE_4.18\Engine\Source\Runtime\Engine\Public\MaterialShared.h(37): note: see declaration of 'UMaterialInstance'
2>D:\Project\Plugins\PointCloudPlugin\Source\PointCloudRuntime\Private\PointCloudHelper.cpp(894): error C2227: left of '->Parent' must point to class/struct/union/generic type

Any idea what’s going on here?

4.18 and 0.3.3?