Announcement

Collapse
No announcement yet.

Point Cloud Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    phoboz 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.

    Leave a comment:


  • replied
    Originally posted by localstarlight View Post
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    Originally posted by localstarlight View Post
    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

    Leave a comment:


  • replied
    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!

    Leave a comment:


  • replied
    Originally posted by localstarlight View Post
    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?
    There is now
    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.

    Originally posted by localstarlight View Post
    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?
    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

    Originally posted by localstarlight View Post
    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?
    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
    Last edited by phoboz; 05-18-2018, 11:19 AM.

    Leave a comment:


  • replied
    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!
    Last edited by localstarlight; 05-18-2018, 08:58 AM.

    Leave a comment:


  • replied
    Originally posted by J.Kimberley View Post
    phoboz 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

    Leave a comment:


  • replied
    phoboz 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?

    Leave a comment:


  • replied
    For anyone requiring access to UVs inside the Pixel Shader (like applying textures) follow the steps below:

    1. Close the editor
    2. Download this shader file
    3. Replace the file in Plugins/PointCloudPlugin/Shaders/Private with the one you just downloaded
    4. Start the editor again. WARNING: It will recompile all shaders so be patient!
    5. Enjoy

    This is only relevant for versions up to and including v0.3.1 as any following ones will include the updated file out-of-the-box.

    Leave a comment:


  • replied
    Hi,

    Originally posted by localstarlight View Post
    Hi,
    This looks like an amazing plugin! I've managed to get my data in there perfectly (and so easily!) but I'm having trouble figuring out how to create a custom material. I've tried looking at the materials in the plugin content folder, but it's not clear what they all are (what do 'P', 'PC', 'S' and 'SC' stand for?) and also all of them are Default Lit.
    P - Point
    S - Sprite
    C - Color (uses Vertex Color channel for either full RGB or Intensity)

    They are all Default Lit because the code is overwriting the material flag when and if needed

    Originally posted by localstarlight View Post
    Everything I'm trying either crashes the editor, or doesn't show up at all.
    When you assign your custom material, the plugin will attempt to check what is being used in it, so that it can adjust the GPU buffers ​​​​​​​to best fit the data and maximally reduce VRAM footprint. That process is not 100% robust and may result in crash if you are changing the material while it's in use. I recommend you hide the cloud prior.

    ​​​​​​​
    Originally posted by localstarlight View Post
    The only thing I can't figure out is how to actually set the sprite, so that it's an actual sprite not just a blank square...
    If you mean assigning the texture to it, you should be able to do that like with any other material (although, to be honest I haven't tried that lately )






    Leave a comment:


  • replied
    Hi,
    This looks like an amazing plugin! I've managed to get my data in there perfectly (and so easily!) but I'm having trouble figuring out how to create a custom material. I've tried looking at the materials in the plugin content folder, but it's not clear what they all are (what do 'P', 'PC', 'S' and 'SC' stand for?) and also all of them are Default Lit.

    What I need is an Unlit material with translucency where I can define the opacity, and the imported particle colour can be used to colour the sprite.

    Everything I'm trying either crashes the editor, or doesn't show up at all.

    Essentially what I need is the 'Sprite Unlit RGB' render method, but where I can define the sprite (so it's not just a blank square), and can control opacity.

    Is there a way to do what I'm trying to do?

    EDIT

    OK, so I've figured out that the material I need to be working with is M_PointCloud_SC, and have got translucency etc. working fine. The only thing I can't figure out is how to actually set the sprite, so that it's an actual sprite not just a blank square...
    Last edited by localstarlight; 05-17-2018, 04:18 PM.

    Leave a comment:


  • replied
    Thanks for the help, the explosion is just for a test, the first to Pics are what I have so far. I'm using the plugin to look at big data, for example twitter accounts. 60 million points to represent an account, when it was created and the interests it has based on what it follows. I've converted data from CSV to text with XYZ RGB Just wanted to figure out where to start with making custom materials to animate opacity or hide/show sections of the data, then I will have to look at drawing connections between two points, I might do vertex animation as simulation in houdini and import it to ue4.

    Leave a comment:


  • replied
    Originally posted by J.Kimberley View Post
    phoboz Hey dude, do you have an base material setup to play around with, in order to make a custom material? I have no idea where to start making a custom material for the point clouds. I made an explosion and filled it with points in Houdini but I'm trying to show specific connections of points within the cloud so I'd like to make it a kind of transparent volume at times, I made a super rough concept. do you think a material like this could be made?
    Explosion sounds like a better fit for particle system than a static point cloud, I'd look into vector maps if you want particular shapes. But if you really want to use the plugin here's what my approach would probably be like:

    First two pics look like a simple world space XYZ to RGB convert - easily doable. Opacity is also supported. As for showing connections, i'd probably start with baking it out as texture and use triplanar mapping to apply it.

    Look inside the materials attached with the plugin for how to build yours.

    Leave a comment:


  • replied
    phoboz Hey dude, do you have an base material setup to play around with, in order to make a custom material? I have no idea where to start making a custom material for the point clouds. I made an explosion and filled it with points in Houdini but I'm trying to show specific connections of points within the cloud so I'd like to make it a kind of transparent volume at times, I made a super rough concept. do you think a material like this could be made?
    Attached Files

    Leave a comment:

Working...
X