开发者

Build a fur texture responsive to touch for iphone

I've been challenged with build a fur like texture on a iphone screen that would respond in a realistic way when stroked.

The gestures and all are easy I know. Build suc开发者_如何学Pythonh a texture that isn't a static image and then having it be responsive is where I'm looking for some direction.

Any help here is appreciated, Thanks!


The simple option would be just have lots of fur rendered textures with different displacements but it will probably look awful on 3D models. If it's just 2D overhead though this can work well by just blending in different textures based on the vector of movement.

If it's real fur you're after you're in the realm of OpenGL shaders and worth taking a peek at nVidia's fur rendering examples. If you want a top down fur rendering this should be fairly trivial and doesn't even need advanced shaders, just render some shells... if you want 3D objects with fur displacement it's going to be a lot more work especially if you need to disturb the fins correctly.

Typically I believe the easiest way would be to break it into small sections and have a 'disturb' vector for each section of the fur which will offset the layers. Each layer is moved by (TransformToModelSpace(vector) * layer * k). You'll need to blend these 'offsets' with neighbouring sections so it doesn't look obvious one part is moving and another isn't.

http://developer.download.nvidia.com/whitepapers/2007/SDK10/FurShellsAndFins.pdf

Alternatively you could just render each hair and get very slow updates :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜