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/04 15:28] – tim | tutorials:using-mesh-clouds-as-organ [2024/12/06 14:37] (current) – [Preparation] tim2 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Idea ===== | ===== Idea ===== | ||
- | This tutorial uses a ply file of a leaf with points and meshes to simulate a small branch. | + | This tutorial uses a {{ : |
The leaf is transformed and added several times to a branch model, to simulate leaf growth and light absorption. | The leaf is transformed and added several times to a branch model, to simulate leaf growth and light absorption. | ||
Line 10: | Line 10: | ||
+ | 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 ===== | ||
- | Since the point cloud is used as an changeable asset in this model, we will use the GraphExplorer plugin to import it as a GraphObject. | + | In order to proper ship this project, |
- | To do so first open the Graph Objects | + | Therefore we first need to add the ply file to the [[user-guide: |
- | In the newly opened panel an external | + | select "All files" as type, to show files that can be edited in the text editor(see image). |
- | Afterwards the graph object | + | After load the ply file, it can now be loaded in RGG as an input Stream with the function |
+ | |||
<code java> | <code java> | ||
- | GraphObjectRef | + | Node x =Utils.loadNodeFromStream(getInputStreamFromProject("leaf.ply" |
[ | [ | ||
- | A ==> x.cloneGraph(); | + | A ==> x; |
] | ] | ||
</ | </ | ||
Line 45: | 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 71: | 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 93: | Line 101: | ||
public void loadPC() | public void loadPC() | ||
{ | { | ||
- | GraphObjectRef | + | // load ply graph from |
+ | | ||
[ | [ | ||
- | r: | + | r: |
- | r: | + | |
] | ] | ||
- | | + | |
| | ||
+ | [ | ||
+ | r: | ||
+ | r: | ||
+ | ] | ||
} | } | ||
</ | </ | ||
Line 122: | Line 134: | ||
] | ] | ||
| | ||
- | (*Cloud*).setUpdate(true); | + | (*Imp3dCloud*).setUpdate(true); |
} | } | ||
</ | </ |
tutorials/using-mesh-clouds-as-organ.1730730512.txt.gz · Last modified: 2024/11/04 15:28 by tim