neilmendoza / ofxPtf

Parallel transport frames addon for openframeworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to avoid the rotation of the skin?

hamoid opened this issue · comments

I'm successfully creating a tube with ofxPtf: https://vimeo.com/198995535

I have a question though: how to avoid the rotation of the "skin" around the the core curve? (see the video). This is not a problem if you create the tube just once, or even if you recreate the same growing tube by adding points. But if the curve point positions change (think of a snake moving), the texture applied to the snake would spin (the top of the skin would move to the bottom, and then back to the top).

Would it be possible to specify the normal of the first frame somehow to have predictable results with animated tubes?