I want to have a moving 3D Animated Flag in SceneKit where I can change the Flag-Textures to different countries.
My current solution is the following:
I imported the flag scene from Maya to SceneKit in the DAE format. The DAE consists of a Plane which has joints attached to it. It is converted from an original nCloth movement using this method.
My Problem is now, that the flag has artifacts in it - especially visible in the shadow areas:
I can't figure out if this artifacts come from the number of faces in the plane or the number of joints on the plane or the smoothing out of the movement itself.
My thoughts:
Maybe increasing the amount of joints to smooth out the movement would be successful, but my problem is that the exported DAE has already 50 MB and I don't want to increase these, because of storage of the endusers-device. At the moment there ~450 jointpositions * 500 keyframes = 50MB
I tried already subdividing the flag in maya, but with the "Smooth Bind Tool" which I have to apply, the result is poorer than before. I expect because the amount of joints stays equal and the subdivided areas don't get more "Movement-Information".
I tried also subdivision in SceneKit directly, but without an better result.
In Mayas Weight Paint Tool, there are the same bad geometries visible when I select a joint. However I am not successful in smoothing out these sharp lines of the weights between the corners of the quads:
Has anyone an Idea how to clean out the artifacts or helpful advices?
Are there any recommendations for a complete other solution?
I don't want to use third party game engines for that. I found already examples for such an simulation for Open GL, but I don't want to teach myself the next few month (years..?) how to programm an realistic Cloth simulation. Blender has also an cloth-Simulator, but I can't use the code of blender without porting it to swift (I am not capable of that either..)
Edit:
No Luck in enabling/disabling litPerPixel on Material, although a slightly bit better:
material.litPerPixel = true
material.litPerPixel = false