Scenekit how to bend an object

I am new to 3D.

I have a direct stick object, which is an SCNBox, and at some point I want to bend it (with animation). Is there any way to achieve this? Or do I need to use several objects to simulate an SCNBox first, and then move and rotate these objects to simulate a bend?

0
source share
2 answers

SCNBoxhas a property heightSegmentCountthat can be used to create more vertices.

, . , : SceneKit Xcode. SceneKit, ( SceneKit WWDC 2015) .

SCNShaderModifierEntryPointGeometry:

float offset = _geometry.color.x * (sin(1.2 * u_time + (_geometry.position.x + _geometry.position.z) * 4.0) + 0.5) * 0.02;
_geometry.position.x += offset;
_geometry.color.xyz = vec3(1.0);

(SCNGeometrySourceSemanticColor, ), reset 1.0, .

+3

, , . , SCNBox.

3D-, Blender, Maya Cheetah3D. , Collada/DAE SceneKit. .

API- . 34 WWDC 2014 SceneKit. 610.

, , . IK Collada .

.

+1

Source: https://habr.com/ru/post/1625908/


All Articles