{"id":413,"date":"2022-04-11T17:54:03","date_gmt":"2022-04-11T16:54:03","guid":{"rendered":"https:\/\/blogs.gre.ac.uk\/captivate\/?p=413"},"modified":"2024-09-03T14:59:10","modified_gmt":"2024-09-03T13:59:10","slug":"point-cloud-rendering-blender-3-1","status":"publish","type":"post","link":"https:\/\/blogs.gre.ac.uk\/captivate\/2022\/04\/11\/point-cloud-rendering-blender-3-1\/","title":{"rendered":"POINT CLOUD RENDERING: Blender\u00a03.1"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/pointcloud-render-2-1024x548.png\" alt=\"\" class=\"wp-image-444\" \/><\/figure>\n\n\n\n<p>Point clouds may be opened easily enough in Blender but they will not render out unless particular attributes have been assigned to the point cloud using Blender&#8217;s Geometry Nodes capability &#8211; essentially a real, renderable 3d primitive is located at each point.To import a point cloud the format must be PLY; either export from the point cloud software as PLY or use CloudCompare to open the point cloud and resave as PLY. This may also be a good opportunity to optimise the point cloud file with the CloudCompare Subsample tool &#8211; make it smaller; point clouds, particularly from laser scanners, can be very large and will cause performance issues even on high spec machines.<\/p>\n\n\n\n<p>1. In Blender [3.1 or higher] in a new empty file select :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    FILE - IMPORT - Standford (.PLY)<\/pre>\n\n\n\n<p>and browse \/ select the point cloud file<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/image-1-1024x619.png\" alt=\"\" class=\"wp-image-418\" \/><\/figure>\n\n\n\n<p>In this example a relatively small file has been imported &#8211; this export is from the iPhone Lidar App EveryPoint (Pressing CTL-ALT-Q swaps it to 4 viewports of the point cloud).<br><br><em>I<strong>f you do not want \/ do not have colours in your point cloud then you can skip step 2 and go straight to step 3<\/strong><\/em><\/p>\n\n\n\n<p>2. Change to the SHADING tab along the top and click NEW for a new material.  Give this a name like PCMaterial.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/image-2-1024x619.png\" alt=\"\" class=\"wp-image-419\" \/><\/figure>\n\n\n\n<p>Now some particular attributes need to be added: from the middle bar click <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    ADD - INPUT - ATTRIBUTE<\/pre>\n\n\n\n<p>Drop this node to the left and in the name field call it Col &#8211; note, must be capital &#8220;C&#8221;<\/p>\n\n\n\n<p>To the right of this add another node for the colour value:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    ADD - COLOR - HUE SATURATION <\/pre>\n\n\n\n<p>And set the Saturation field to 2.<\/p>\n\n\n\n<p>These nodes can now be linked by dragging from the input \/ output points. Drag Color to Color and Color to Base Color so the node arrangement looks like this: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/image-3.png\" alt=\"\" class=\"wp-image-422\" \/><\/figure>\n\n\n\n<p>3. Switch to the GEOMETRY NODES tab from the top of the screen and click NEW in the middle bar to create a base Group Input and Group Output.<\/p>\n\n\n\n<p>Create 2 new instance nodes (if you drop these on the line they will automatically link up properly)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    ADD - INSTANCE - INSTANCE ON POINTS<\/pre>\n\n\n\n<p>and to the right<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    ADD - INSTANCE - REALIZE INSTANCES<\/pre>\n\n\n\n<p>to end up with this layout:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/image-5.png\" alt=\"\" class=\"wp-image-424\" \/><\/figure>\n\n\n\n<p>Next will be another node that will define the real, renderable object that will be at the location of each point in the point cloud &#8211; for this example a cube.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    ADD - MESH PRIMITIVE - CUBE<\/pre>\n\n\n\n<p>Start with giving the cube the dimensions of 0.01  &#8211; these figures will likely need to be altered to fit whatever scale the point cloud is suited for. <\/p>\n\n\n\n<p>Link the Mesh OUT to the Instance IN &#8211; but first note the following point:<\/p>\n\n\n\n<p><strong><em>This is where the point cloud will display as a proper renderable form &#8211; BUT it can take a long time depending on size of poi<\/em><\/strong><span><b style=\"font-style: italic\">nt cloud. <\/b><span style=\"font-weight: 600\"><i>Sa<\/i><\/span><\/span><em><strong>ve first, close other applications, etc.<\/strong><\/em><\/p>\n\n\n\n<p>The rendererable point cloud will now show in the viewport (to speed up this view, or to eliminate viewing errors due to location of the light you can choose to view it as a simple solid form by clicking the solid circle icon, top right hand corner).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/image-7.png\" alt=\"\" class=\"wp-image-428\" \/><\/figure>\n\n\n\n<p>The X Y Z dimension of the cube in the cube node can be changed &#8211; and the model will update accordingly.<\/p>\n\n\n\n<p>4. Finally the colour (if any) of the point cloud can be brought in by adding another node and linking to the material made in step 2:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    ADD - MATERIAL - SET MATERIAL<\/pre>\n\n\n\n<p>Drop this on the Mesh-to-Instance link line and in the bottom field type the name the material was given in the first step &#8220;PCMaterial&#8221;<\/p>\n\n\n\n<p>Even if there was no colour info in the point cloud this  node can be useful for assigning a material to it for colour \/ shininess \/ transparency etc.<\/p>\n\n\n\n<p>NOTE: Material operations will only render properly with the Cycles renderer. Eevee render will render much more quickly &#8211; but it will be flat colours (which may be fine for mono point clouds).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/blogs.gre.ac.uk\/captivate\/wp-content\/uploads\/sites\/16\/2022\/04\/image-8.png\" alt=\"\" class=\"wp-image-429\" \/><\/figure>\n\n\n\n<p>Credits and thanks to <a href=\"https:\/\/www.youtube.com\/channel\/UCO5O6Rh7vPvReCxiSGrU-FQ\" data-type=\"URL\" data-id=\"https:\/\/www.youtube.com\/channel\/UCO5O6Rh7vPvReCxiSGrU-FQ\">Michael Prostka<\/a> for YouTube guide and development of PLY import<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Point clouds may be opened easily enough in Blender but they will not render out unless particular attributes have been assigned to the point cloud using Blender&#8217;s Geometry Nodes capability &#8211; essentially a real, renderable 3d primitive is located at each point.To import a point cloud the format must be PLY; either export from the [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,7],"tags":[10,21,25],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-software-techniques","category-technology","tag-blender","tag-point-cloud","tag-render"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":621,"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/posts\/413\/revisions\/621"}],"wp:attachment":[{"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/captivate\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}