tutorials:using-mesh-clouds-as-organ
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:using-mesh-clouds-as-organ [2024/11/11 11:42] – [Loading cloud] tim | tutorials: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/ | The example model can be found in the GroIMP example explorer (File/ | ||
+ | |||
+ | ===== Preparation ===== | ||
+ | |||
+ | Before you start modeling with point clouds it is recommended to do two settings: | ||
+ | - On the view3d in the menu view/ | ||
+ | - In the preferences, | ||
===== Loading cloud ===== | ===== Loading cloud ===== | ||
- | In order to proper ship this project, the used point cloud is added as a file to the GroIMP file explorer. | + | In order to proper ship this project, the used point cloud is added as a file to the GroIMP file explorer.{{ : |
Therefore we first need to add the ply file to the [[user-guide: | Therefore we first need to add the ply file to the [[user-guide: | ||
- | select "all files" to show files that can be edited in the text editor(see image). | + | select "All files" |
+ | After load the ply file, it can now be loaded in RGG as an input Stream with the function '' | ||
- | To do so first open the Graph Objects explorer ''/ | ||
- | In the newly opened panel an external file can be added through '' | ||
- | Afterwards the graph object can be referenced using the GraphObjectRef class and a clone can be added several times using XL rewriting rules. | ||
<code java> | <code java> | ||
- | GraphObjectRef | + | Node x =Utils.loadNodeFromStream(getInputStreamFromProject("leaf.ply" |
[ | [ | ||
- | A ==> x.cloneGraph(); | + | A ==> x; |
] | ] | ||
</ | </ | ||
Line 49: | Line 54: | ||
</ | </ | ||
- | Even so this code moves the points to the right position, this is not enough for this tutorial. We need to move the connected meshes as well. To do so we use the structure of the imported CollectionCloud ([[groimp-platform: | + | Even so this code moves the points to the right position, this is not enough for this tutorial. We need to move the connected meshes as well. To do so we use the structure of the imported CollectionCloud ([[tutorials:pointcloud-io# |
<code java> | <code java> | ||
void redraw_Mesh()[ | void redraw_Mesh()[ | ||
Line 75: | Line 80: | ||
==== Manipulate the whole cloud ==== | ==== Manipulate the whole cloud ==== | ||
- | The imported cloud will behave similar to other subset of the graph in GroIMP. | + | The imported cloud will behave similar to other subset of the graph in GroIMP. |
- | + | ||
- | 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 '' | + | |
+ | 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 '' | ||
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 " | + | Therefore a leaf can be added in different angles using the same rotation. In the given example the model starts with simple " |
Line 97: | Line 101: | ||
public void loadPC() | public void loadPC() | ||
{ | { | ||
- | GraphObjectRef | + | // load ply graph from |
+ | | ||
[ | [ | ||
- | r: | + | r: |
- | r: | + | |
] | ] | ||
- | | + | |
| | ||
+ | [ | ||
+ | r: | ||
+ | r: | ||
+ | ] | ||
} | } | ||
</ | </ | ||
Line 126: | Line 134: | ||
] | ] | ||
| | ||
- | (*Cloud*).setUpdate(true); | + | (*Imp3dCloud*).setUpdate(true); |
} | } | ||
</ | </ |
tutorials/using-mesh-clouds-as-organ.1731321750.txt.gz · Last modified: 2024/11/11 11:42 by tim