User Tools

Site Tools


tutorials:using-mesh-clouds-as-organ

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:using-mesh-clouds-as-organ [2024/11/11 11:59] – [Move to (0,0,0)] timtutorials:using-mesh-clouds-as-organ [2024/12/06 14:37] (current) – [Preparation] tim2
Line 11: Line 11:
  
 The example model can be found in the GroIMP example explorer (File/Example projects) under Point cloud/branch. The example model can be found in the GroIMP example explorer (File/Example projects) under Point cloud/branch.
 +
 +===== Preparation =====
 +
 +Before you start modeling with point clouds it is recommended to do two settings:
 +   - On the view3d in the menu view/navigators and select Point cloud handlers. This stops the 3d view from visiting every point for highlighting which improves the speed.
 +   - In the preferences, go on User Interface/view3d and set the resolution to 2. This will give the visitor the instruction to not visit any point but use the mesh collector. Which makes the visualization simpler and faster. 
 ===== Loading cloud ===== ===== Loading cloud =====
  
Line 74: Line 80:
 ==== Manipulate the whole cloud ==== ==== Manipulate the whole cloud ====
  
-The imported cloud will behave similar to other subset of the graph in GroIMP.  Meaning if the point cloud is added after a transformation node or an object with an axis it will be moved, rotated or scaled regarding the previous nodes. (This also works with colors and other turtle attributes.) +The imported cloud will behave similar to other subset of the graph in GroIMP.  Meaning if the point cloud is added after a transformation node or an object with an axisit will be moved, rotated or scaled regarding the previous nodes. (This also works with colors and other turtle attributes.)
- +
-The Rotation of a point cloud can be quite tricky depending on the the rotations in the measurement. A simple trick for the modelling is to add a ''Rotation'' Node above the cloud and select this node. Then it is possible to change the angels in the properties editor and afterwards transfer the values in to the RGG code.+
  
 +The rotation of a point cloud can be quite tricky depending on the the rotations in the measurement. A simple trick for the modelling is to add a ''Rotation'' Node above the cloud and select this node. Then it is possible to change the angels in the properties editor and afterwards transfer the values in to the RGG code.
  
 After the right rotation and scale is estimated, these values can be used on top of any turtle state.  After the right rotation and scale is estimated, these values can be used on top of any turtle state. 
-Therefore a leaf can be added in different angles using the same rotation. In the given example the model starts with simple "placeholder-leaves" that are already scaled and rotated to the wished location. Then with the loading of the point cloud these placeholders are replaced by not only the leaf but also the needed rotation estimated for the leaf.+Therefore a leaf can be added in different angles using the same rotation. In the given example the model starts with simple "placeholder-leaves" that are already scaled and rotated to the wished location. Then with the loading of the point cloud these placeholders are replaced by not only the leaf but also the needed rotation estimated for the leaf. In order to minimize computational power, a two step process is used, first the point cloud is loaded once and moved to 0,0,0 and than this moved cloud is cloned to replace the other "placeholder-leaves"
  
  
Line 96: Line 101:
 public void loadPC() public void loadPC()
 {  {
- GraphObjectRef x = new GraphObjectRef("random_leaf3_mesh.ply");+ // load ply graph from  
 + Node x =Utils.loadNodeFromStream(getInputStreamFromProject("leaf.ply"),"model/x-grogra-pointcloud-graph+ply");
  [  [
-  r:RL(80)  m:M s:Scale Rotate Parallelogram==> r m s Rotate(-120,-50,-40) x.cloneGraph(); +  r:RL(80)  m:M s:Scale(10) Rotate Parallelogram ==> r m s Rotate(-120,-50,-40) x;
-  r:RL(-80)  m:M s:Scale Rotate Parallelogram==> r m s Rotate(270,-100,-50) x.cloneGraph();+
  ]  ]
- derive();+ derive(); // apply the changes to the graph
  move_toZero();  move_toZero();
 + [
 +  r:RL(80)  m:M s:Scale Rotate Parallelogram ==> r m s Rotate(-120,-50,-40) cloneSubgraph(x);
 +  r:RL(-80)  m:M s:Scale Rotate Parallelogram==> r m s Rotate(270,-100,-50) cloneSubgraph(x);
 + ]
 } }
 </code> </code>
Line 125: Line 134:
  ]  ]
  redraw_Mesh();  redraw_Mesh();
- (*Cloud*).setUpdate(true);+ (*Imp3dCloud*).setUpdate(true);
 } }
 </code> </code>
tutorials/using-mesh-clouds-as-organ.1731322785.txt.gz · Last modified: 2024/11/11 11:59 by tim