A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Surface Deformer to deform a spline for a cloner
Posted: 19 July 2017 03:50 AM   [ Ignore ]  
Total Posts:  138
Joined  2012-04-04

I’m trying to work out the best way to make a soft carrying case unzip and open, but I’m having a bit of a problem using a Surface Deformer to deform a spline on which I’m cloning zipper teeth.

In this scene (I can’t get this to post with an attached file):

http://marshall-arts.net/Cineversity-Demos/SurfaceDeformerCloneTest.c4d

I’ve mocked up the soft case as a Sub D mesh.  I used an edge from that mesh to create a spline and onto that spline I’ve cloned the teeth of half of the zipper.  I use a correction deformer to separate the zipper teeth a bit (this sample doesn’t include the opposite half of those teeth), and then a bend deformer to fold that over.  The final simulation would have another correction deformer going the other way to unzip the right side.

That deformed mesh drives the Surface Deformer which is supposed to deform the zipper teeth along with the soft fabric.

This is almost working, but I’m having a problem when I activate the Surface Deformer.  When it’s NOT active the cloned teeth are spaced evenly.  When I activate it the spacing of the teeth gets messed up.  It appears that the spline on which the teeth are cloned has to be made up of segments of equal length for the teeth to be evenly spaced when deformed by the Surface Deformer.  In this scene the right half of the spline has segments of uneven lengths; the left side is fairly even, so the teeth appear normal. 

I could probably make a spline divided into equal(ish) segments, but I was hoping there might be a more efficient way to do this.  To make the deform work correctly the points of that edge of the sub mesh have to match those of the spline driving the cloner.

Thanks.

Shawn Marshall
Marshall Arts Motion Graphics

Profile
 
 
Posted: 19 July 2017 04:54 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shawn,

There are quite a few influences, which might create a difficult task. The Spline seems to get longer, even I couldn’t measure it. Zips to my knowledge do not stretch.

I have used a little trick here, with a MoSpline, to counter the effect and it is nearly not noticeable. Please have a look:

Scene file
https://www.amazon.com/clouddrive/share/wLAGFCP9rqglXKrmhePAR0Cg2aLKtWlpeuQAfwdfHIy?ref_=cd_ph_share_link_copy

I have marked the new elements with a yellow “labe” (Layer)l. In the Object Cloner: The “Object> Distribution” is changed.

The most difficult part is the zipper, and in this set up, it is pretty much on the end of the animation. I can’t help myself, but I would work on a solution that animates the Zipper first. With the gained elements and information, (brainstorming here as it is late, close to 1am), I would go with the other parts then based on that. Since I do not know the whole “story”, I think I leave it here.  Perhaps, this works already, after some more tweaks…

If you take a Null object as “teeth-spacer” after the Cube [teeth], the opposite side could be done in the same way, but then the Null first and then the Cube [teeth], So any adjustments [MoSpline] stay in sync.

Let me know how close the deadline is and what else is needed. I’m happy to dive into it in the morning.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 19 July 2017 03:42 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Some thoughts:

Please find attached a little idea to move the splines. It works with a point iteration. (There is a little delay in it…)
Scene File
https://www.amazon.com/clouddrive/share/ScIZzgHlNHJnW6zOSFsS6eF1glZUN1OnpyZXHw9qS8n?ref_=cd_ph_share_link_copy

Anyway, the idea—after all, should be something that doesn’t build up on each other, and what works all based on the same deformation.

Another thought, just to motivate the brainstorming is, to have the zip in two parts, before and after the Zipper handle. In this way the closed and open state could be more defined to the state of the carry case, and the change in length would be hidden in the zipper handle.

Another side note, deformed and non-deformed object might work best with a Matrix object between, to take the position and not the deformation.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 19 July 2017 04:12 PM   [ Ignore ]   [ # 3 ]  
Total Posts:  138
Joined  2012-04-04

Hi:

Thanks again for the samples, I appreciate your help.  It looks like you’re in the Pacific Time Zone, too.  I have a few days (maybe a week) to work this out.

This isn’t going to be scrutinized in close detail, so I doubt a bit of stretching would be noticeable.  The actual case is black nylon with black zipper teeth, and a laptop and other hardware will be flying into the case, so there will be other things to distract the viewer.

Using a Spline Effector with the cloner to ensure even spacing of the teeth should be the missing ingredient to making my basic approach work.

Best.

Shawn

Profile
 
 
Posted: 19 July 2017 05:21 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shawn,

Yes, Pacific Time Zone, L.A., CA.
Your question came in while I was just “shutting shop” last night, but I certainly had to look into it.
I will explore this a little bit more, as each question will create something new, and I’m certainly interested in it.

How much is visible, camera work and editing, etc., that is part of the “story”, thanks for sharing more details about it. As usual, this is forum and others might search later for solutions, so I might add something, even you have no direct need for it now. I hope you don’t mind grin

My best wishes for your project.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 20 July 2017 04:25 AM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: Here is a “sketch” of all the informations I got so far.

I haven’t tweaked it to the end, but the idea should be clear.

Scene file: _31
https://www.amazon.com/clouddrive/share/QCIFcfcYirO0TJTRVHNo2ZIaIJb4J9mBPuEkDb8cvxv?ref_=cd_ph_share_link_copy

I left all steps before the final inside the file.

This file is an example if you like to keep the Zip-teeth separated. The spline was harvested from the Polygon. Then set to: Intermediate points 128 uniform, and with a Object Manager>Objects> Current State To Object turned into a high vertices spline. A copy shifted in Z is used as a Rail. I left a “stress test” inside, so it can be explored.
The amount of Nulls in the Object manager allowed me to use a large zip-tooth size and alternate with the other side (not included in the file), if smaller teeth are needed, reduce the size and the amount of nulls.

Scene file: _41
https://www.amazon.com/clouddrive/share/rQeXD8wLLVXPMOiLl7UIs0r2t3XLLKz50HXyBTO9WA2?ref_=cd_ph_share_link_copy

Of course Cage Deformer comes to mind. Here is an example. In some areas, I guess it squeezes too much.

Scene file: _42
https://www.amazon.com/clouddrive/share/1l76NeJcSdd4juBBoeHTEyN8B8Y0Zdkpaz8ZGGDGKqj?ref_=cd_ph_share_link_copy


My best wishes for the project.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 28 July 2017 10:23 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  138
Joined  2012-04-04

I’ve got my zipper animation working well enough for this particular project and budget, but I’m having a strange issue when I rotate my case to look like it’s laying flat on a plane. The cloned zipper teeth are oriented correctly when the case is upright as I originally modeled it, but if I rotate its master null 90° to lay it on its back the teeth rotate to the wrong orientation.

I’m using spline effectors on standard cloners to place the teeth on splines which are deformed by a surface deformer when the case opens.

I’m going to suggest showing the case sitting vertically (I think it looks better that way), so this issue shouldn’t affect me, but I’d like to know what’s going on in case the client insists on depicting it laying flat.

I’ve posted a pared-down scene.  Even when upright the teeth get a little out of whack when I use the Bend deformer, but that anomaly probably won’t be visible with these black teeth over black fabric.

http://marshall-arts.net/Cineversity-Demos/ZipperTeethCloneWeirdness.c4d

Best.

Shawn

Profile
 
 
Posted: 28 July 2017 11:02 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shawn,

It appears to me that the rotating happens twice in that set up, like a internal chain reaction. Anyway, here are the steps to get it working quickly:


1) Place the Parent on a new Layer, just the Parent Object, and switch of in the Layer Browser the Animation option for that object/layer. So it does not rotate for now. It is the little filmstrip icon.

2) Then place to each Zipper Cloner Object a MoGraph Cache tag. Cache the first one. Now do the same with the second one.

3) Allow for Animation in the Layer again, to get your wanted animation back. Done.

I hope that helps.

To have a reference of my doing:

Scene File
https://www.amazon.com/clouddrive/share/obsgxpldnFGsU9GDsXzQAn1y0hgo5KnjdVRGmG2lKEh

Have a great weekend.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 28 July 2017 11:03 PM   [ Ignore ]   [ # 8 ]  
Total Posts:  138
Joined  2012-04-04

It looks like adding Mograph cache tags to those cloners, baking them, and THEN rotating the case flat prevents the teeth from rotating incorrectly.  I should probably bake those anyway before rendering. 

I’m still curious as to what might be causing this odd behavior.

Profile
 
 
Posted: 29 July 2017 12:09 AM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You got it, Shawn.

Perhaps even simpler:
Scene file
https://www.amazon.com/clouddrive/share/wRtkwYR9RlMomxLM3tm89h0OesnJzwXPdfaNhQK47wK

I’m not certain if this is the final answer to the problem, but it demonstrates the problem:
Scene file
https://www.amazon.com/clouddrive/share/nLAf4d3xp3HVQ5HfCmV59tgtuOQHMShSj1ETsBanmNF

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 29 July 2017 01:22 AM   [ Ignore ]   [ # 10 ]  
Total Posts:  138
Joined  2012-04-04

This simpler scene file is swell; this best addresses the problem I was having at the start of this thread.  My original approach would have worked directly with the splines I’d set up if I’d set the distribution to Even rather than Count.  I’m usually pretty good about trying different settings when things behave oddly, but not this time I guess.

Thanks again for the help.

Shawn

Profile
 
 
Posted: 29 July 2017 01:29 AM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re welcome, Shawn.

There are always many ways to do a project, and each has some advantages. I tested the initial project and the set up was different, the bend in the middle lengthen the spline. The newer (todays) version is more even. A different approach would be more suitable in such a case. However, if we found now something that works, fantastic!

Here is the file with the (simplified) example file set up:

Scene file
https://www.amazon.com/clouddrive/share/ixZYpHTIAMioC1vGtKK28ZsFvztbH7LAeTIZebegubq

The teeth on the side, if you observe it closely, are not absolutely “glued” to the case. Not very obvious, but it is there. The placed camera under the rotating Null follows the rotation and in this way it is obvious. With a camera that moves independently this might be covered by many things, e.g., motion blur.

Enjoy your project.

P.S.:

I see that you stick with the original set up of yours, I get that, I’m not arguing that you should do one or the other, I can only suggest things here. Since many people read this thread, below is the most simplified version of what I had mentioned above. To get all the data into the model and go from there, here a another approach. Works fine here.
Scene file
https://www.amazon.com/clouddrive/share/QRBDCUpDZqMXFZ27wtyVvtXIAXcYlqzHTl7q8ARX616

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile