meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
geometry_forces [2021/04/07 12:35] – croft | geometry_forces [2023/07/10 11:34] (current) – steph.jorgensen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Geometry | + | ======Geometry |
When you need scene geometry to control anything about your model then you’ll need to take advantage of Geometry Forces. | When you need scene geometry to control anything about your model then you’ll need to take advantage of Geometry Forces. | ||
* Identify the geometry to be used (either a mesh asset or parts of the model itself) | * Identify the geometry to be used (either a mesh asset or parts of the model itself) | ||
* Position it in the scene (if it’s a mesh asset, model parts remain where they are) | * Position it in the scene (if it’s a mesh asset, model parts remain where they are) | ||
- | * Embed it in the output (if it’s a mesh asset, model pars already are) | + | * Embed it in the output (if it’s a mesh asset, model parts already are) |
* Specify how things behave around the geometry (attracted to it, avoid it, ignore it, etc.) | * Specify how things behave around the geometry (attracted to it, avoid it, ignore it, etc.) | ||
* Specify what happens if anything hits the geometry (crawl around it, stop, etc.) | * Specify what happens if anything hits the geometry (crawl around it, stop, etc.) | ||
Line 15: | Line 15: | ||
- | =====Adding a Geometry Force===== | + | =====Adding a geometry force===== |
Geometry Forces are added just like any other force. | Geometry Forces are added just like any other force. | ||
Line 22: | Line 22: | ||
This will add an empty Geometry Force to your scene. | This will add an empty Geometry Force to your scene. | ||
- | =====Assigning | + | =====Assigning |
Geometry Forces can use mesh data from two sources: mesh assets (imported models) or generators (meshes created by the procedural modeler). | Geometry Forces can use mesh data from two sources: mesh assets (imported models) or generators (meshes created by the procedural modeler). | ||
- | ==== Mesh Assets | + | ==== Mesh assets |
Create a mesh asset by importing a model. | Create a mesh asset by importing a model. | ||
Line 31: | Line 31: | ||
* Select your mesh asset with the property “Geometry: | * Select your mesh asset with the property “Geometry: | ||
- | {{ :geometry_forces_mesh_asset_mesh.png? | + | {{geometry_forces_mesh_asset_mesh.png? |
If you’re using a mesh asset, you can assign a material to it, embed it in the model, and transform it with the scene gizmo using the other properties in the “Geometry: | If you’re using a mesh asset, you can assign a material to it, embed it in the model, and transform it with the scene gizmo using the other properties in the “Geometry: | ||
Line 44: | Line 45: | ||
If you’re using generators, this geometry will update every time the model updates. You don’t need to do anything else. This feature enables you to freely change the model and have other parts of the model update accordingly. | If you’re using generators, this geometry will update every time the model updates. You don’t need to do anything else. This feature enables you to freely change the model and have other parts of the model update accordingly. | ||
- | {{ :geometry_forces_properties.png? | + | {{geometry_forces_properties.png? |
Using generators as the source of the geometry requires some special consideration. | Using generators as the source of the geometry requires some special consideration. | ||
- | ===== Adding | + | ===== Adding |
“Behaviors” control how Branch generators react to the geometry in the force. | “Behaviors” control how Branch generators react to the geometry in the force. | ||
Line 64: | Line 65: | ||
Geometry Forces can have multiple behaviors and which one is used is specified per generator. | Geometry Forces can have multiple behaviors and which one is used is specified per generator. | ||
- | ===== Using a Geometry Force ===== | + | ===== Using a geometry force ===== |
Geometry forces are enabled and disabled just like any other force. | Geometry forces are enabled and disabled just like any other force. | ||
- | {{ :geometry_forces_enabling_force_1.png? | + | |
+ | {{geometry_forces_enabling_force_1.png? | ||
The value of the property is multiplied by the Geometry Force’s strength value and applied to the branch. | The value of the property is multiplied by the Geometry Force’s strength value and applied to the branch. | ||
Line 73: | Line 76: | ||
Once a Geometry Force obstructs any given branch, the properties in the group “Geometry Force Crawling” on the Branch generator (pictured below) control how the branch will crawl over the surface of the geometry. | Once a Geometry Force obstructs any given branch, the properties in the group “Geometry Force Crawling” on the Branch generator (pictured below) control how the branch will crawl over the surface of the geometry. | ||
- | {{ :geometry_forces_crawling.png? | + | {{geometry_forces_crawling.png? |
These properties are explained in detail [[branch_generator|here]] but the general idea is to use these properties to convey how much the branch can bend (“Max bend angle”), how much of it can press into the mesh (“Tolerance”), | These properties are explained in detail [[branch_generator|here]] but the general idea is to use these properties to convey how much the branch can bend (“Max bend angle”), how much of it can press into the mesh (“Tolerance”), | ||
Line 82: | Line 85: | ||
- | ===== Using a Geometry Force to Align ===== | + | ===== Using a geometry force to align ===== |
All forces have an “Align strength” property. | All forces have an “Align strength” property. | ||
When a Geometry Force is used to align it will cause nodes to shift away from the geometry as much as possible at their anchor points and point away from the geometry as well. This technique is useful, for example, to ensure ivy leaves do not cut through the wall they are growing. | When a Geometry Force is used to align it will cause nodes to shift away from the geometry as much as possible at their anchor points and point away from the geometry as well. This technique is useful, for example, to ensure ivy leaves do not cut through the wall they are growing. | ||
- | ===== Force Attenuation | + | ===== Force attenuation |
Attenuation applies to Geometry Forces just as it does to any other force type. For Geometry Forces, the distance used is the distance away from the closest point on the geometry’s surface instead of the distance away from the force’s position. | Attenuation applies to Geometry Forces just as it does to any other force type. For Geometry Forces, the distance used is the distance away from the closest point on the geometry’s surface instead of the distance away from the force’s position. | ||
Both “Force: | Both “Force: | ||
- | {{ :geometry_forces_attenuation.png? | + | {{geometry_forces_attenuation.png? |
In the screenshot above, the “Rook” geometry force is selected and the orange lines indicate the attenuation distance for alignment attenuation. | In the screenshot above, the “Rook” geometry force is selected and the orange lines indicate the attenuation distance for alignment attenuation. | ||
=====Containers===== | =====Containers===== | ||
- | {{ :: | + | Similar to attenuation, |
- | One additional feature that mesh forces | + | |
+ | In the following image, there are four forces: two direction forces and two geometry forces with a sphere mesh indicating the area of effect for the corresponding direction force. The branch is affected by the direction forces in a very precise manner. | ||
- | In the picture to the right, there are four forces: two direction forces and two mesh forces with a sphere mesh indicating the area of effect for the corresponding direction force. The branch is affected by the direction forces in a very precise manner. | + | {{container_force.jpg? |
- | ===== Using Generators: Compute | + | ===== Using generators: Compute |
If you’re using generators as the geometry source you must take the order in which the generators are computed into account. | If you’re using generators as the geometry source you must take the order in which the generators are computed into account. | ||
The screenshot below is from the sample named “vines_on_tree.spm” in the Geometry Forces sample folder. | The screenshot below is from the sample named “vines_on_tree.spm” in the Geometry Forces sample folder. | ||
- | {{ :geometry_forces_pass_values.png? | + | {{geometry_forces_pass_values.png? |
Notice that several of the vines have a “Pass” level shown next to them. Computation is done in passes. | Notice that several of the vines have a “Pass” level shown next to them. Computation is done in passes. |