Skip to content

Commit 2796f17

Browse files
committed
2 parents 0510f89 + dd13b94 commit 2796f17

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

documentation/modifiers.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,47 @@ mesh.apply(modifier); // Apply the modifier to the mesh
169169

170170
By understanding the basic principles and parameters of the Bend Modifier, you can effectively use it to create a wide range of 3D shapes and effects.
171171

172+
## Noise Modifier
173+
174+
**Purpose:**
175+
176+
The Noise Modifier is a versatile tool for adding random variations to the vertex positions of a 3D mesh. It can be used to create a variety of effects, such as adding wrinkles to a surface, creating organic shapes, or simulating natural phenomena like turbulence or wind.
177+
178+
**How it Works:**
179+
180+
1. **Random Noise Generation:**
181+
* A random number generator is used to create a random value for each vertex.
182+
* The range of the random values is determined by the `minimum` and `maximum` parameters.
183+
2. **Vertex Displacement:**
184+
* The random value is multiplied by the vertex's normal vector.
185+
* The resulting vector is added to the vertex's position, effectively displacing the vertex along its normal direction.
186+
3. **Seed Value:**
187+
* The `seed` parameter allows you to control the randomness of the noise. By setting the same seed value, you can generate the same noise pattern multiple times.
188+
189+
**Using the Noise Modifier:**
190+
191+
1. **Create a Mesh:** Start with a basic 3D mesh, such as a plane, cube, or sphere.
192+
2. **Apply the Modifier:** Create an instance of the `NoiseModifier` class, specifying the desired `minimum`, `maximum`, and `seed` values.
193+
3. **Modify the Mesh:** Apply the `modify` method of the `NoiseModifier` to the mesh.
194+
195+
**Example:**
196+
197+
```java
198+
Mesh3D mesh = new CubeCreator().create();
199+
NoiseModifier noiseModifier = new NoiseModifier(-0.1f, 0.1f);
200+
noiseModifier.setSeed(1234);
201+
mesh.apply(noiseModifier);
202+
```
203+
204+
**Additional Considerations:**
205+
206+
* **Noise Intensity:** The ```minimum``` and ```maximum``` parameters control the intensity of the noise. Higher values will result in more pronounced deformations.
207+
* **Seed Value:** The ```seed``` value allows you to control the randomness of the noise. By setting the same seed value, you can generate the same noise pattern multiple times.
208+
* **Mesh Topology:** The effectiveness of the Noise Modifier can be influenced by the mesh topology. For complex meshes, additional considerations may be necessary.
209+
* **Combining with Other Modifiers:** The Noise Modifier can be combined with other modifiers to create more complex deformations.
210+
211+
By understanding the basic principles and parameters of the Noise Modifier, you can effectively use it to add organic and natural-looking variations to your 3D models.
212+
172213
## Push-Pull Modifier
173214

174215
**Purpose:**

0 commit comments

Comments
 (0)