Hi !

I've been playing around with the procedural examples, eagerly searching for something to read along with the examples.

So, after reading the CrumpleMesh.js which appears to be quite straightforward, I tried to apply it to a more detailed subdiv mesh i modeled, and the strange thing, is that it wobbles around the screen randomly.

would look like some kind of pivot misplacement, but I also tried resetting it, and transformations, both in my modelling program, and in unity, without luck.

Here's visually what happens, sphere on the left, is the example one, the one on the right is the one i modeled, and to which I applied the same script.

Uploaded with ImageShack.us

And here's what happens when i hit play: the second sphere is squashed, and floating around, while the first correctly deforms.

Uploaded with ImageShack.us

Here's the code i'm using

Code:

// This script is placed in public domain. The author takes no responsibility for any possible harm. var scale = 1.0; var recalculateNormals = false; private var noise : Perlin; { noise = new Perlin (); } if (baseVertices == null) baseVertices = mesh.vertices; { var vertex = baseVertices[i]; vertex.x += noise.Noise(timex + vertex.x, timex + vertex.y, timex + vertex.z) * scale; vertex.y += noise.Noise(timey + vertex.x, timey + vertex.y, timey + vertex.z) * scale; vertex.z += noise.Noise(timez + vertex.x, timez + vertex.y, timez + vertex.z) * scale; } if (recalculateNormals) }

Thank you for your time, if anybody can point me to a simpler approach to perlin noise deformation on an arbitrary mesh, i would really appreciate that.

have a good day !