Mesh deformation/removal
Posted: 11 January 2018 06:41 PM   [ Ignore ]  
Avatar
Total Posts:  29
Joined  2008-02-19

Hello,
I’m looking for a C4D technique that can mimic the look of the video at the URL below. Basically, the animation I’ll make needs to show a boney decompression technique (bone removal) using a drill on a vertebra. 
(Around 37 second mark)
https://youtu.be/pXUjT0QC7r8?t=37s

I have not found an ideal way to animate and render mesh destructions/deformations.


The Collision deformer sorta works, but it get’s messy on the edges of a mesh.
I also tried using an animated mograph tracer and sweep nurbs inside a boolean - also a bit messy on the edges.

Both techniques above are close, but not quite ideal.

The ideal look might come from the inverse of the Pull or Inflate brush in sculpting mode, but I will need to animate the mesh deforming in the final renders.

If that works, I will probably re-topo the mesh as it’s about 20K of tri-polys.

—-
Thank you in advance for any suggestions.
—-

 Signature 

Imagination is more important than knowledge. Knowledge is limited.
- albert einstein

Profile
 
 
Posted: 12 January 2018 09:45 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  5457
Joined  2011-03-03

Hi GiantSimon,

Please have a look at this scene file:
https://www.amazon.com/clouddrive/share/t1D8vDpn6xEm3EhHBMlkhGvwvoL4VjOAUw3w7W8Ppnc
It needs to play to refresh. The a key isn’t always successful.

Click on the Vertex Tag to see the effect.

The change of the Surface is measured and then placed, per point, into a Vertex Tag. From there it is used in a Material.

Material: (Layer-Shader)
-used as is and color is produced with a Colorizer
-used as a Layer-mask between two textures and/or shaders

Object/Xpresso
-With normal shift a final sized copy is created and the distance is used, here a distance of zero is the target, and the initial distance is the Range Mapper input upper
-The distance is taken from a copy of the object and the new distance is used and the final distance is then the input upper of the Range Mapper

IN both cases the output upper of the Range Mapper is “one”.

Please let me know if that works for you.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 12 January 2018 11:50 AM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  29
Joined  2008-02-19

As always, thanks for the quick reply Dr. Sassi.

I’m looking at your set up now. It’s an unconventional approach I don’t think I could have discovered without your help.

I should be able to reverse engineer this, or a variation on this approach for my scene.

Thank you.

 Signature 

Imagination is more important than knowledge. Knowledge is limited.
- albert einstein

Profile
 
 
Posted: 12 January 2018 12:06 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  5457
Joined  2011-03-03

You’re very welcome, GiantSimon.

Please let me know if you need anything to ease the re-engineering. I’m happy to share.

I have searched the web, but I couldn’t find anything.

What I have as an alternative in my mind would be an animated displament texture, that also serves with a colorizer to create the effect, or just a transition mask between to shaders.

Perhaps a MoGraph Tracer with a Proximal Shader using a Spline (the “Spline Shader” itself works only with a flat object)

My best wishes for the project

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 12 January 2018 01:45 PM   [ Ignore ]   [ # 4 ]  
Avatar
Total Posts:  29
Joined  2008-02-19

I think that first method will work out just fine.
I attached a quick low-rez test render. (looping GIF)


I subdivided the mesh a few times to beef up the resolution. The vertex map/colorize shader is still a bit jaggy, but overall this should work out nicely.

Thanks - I owe you a beer.

Image Attachments
Shader-Removal_HR.gif
 Signature 

Imagination is more important than knowledge. Knowledge is limited.
- albert einstein

Profile
 
 
Posted: 12 January 2018 02:20 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  5457
Joined  2011-03-03

Nice, thanks for taking the time with the Gif. It is certainly a Resolution based effect, but as each points is read out, the Vertex map gets finer, while increasing the iteration as well..

I had to explore the Tracer idea. If that is of any interest, please have a look here:

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

It is a render based effect.

Note that the values of the Proximal for the start end end distance vary between the Color and the Displacement channel. Also, the intermediate points of the Tracer are higher, to get a smooth result.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 12 January 2018 02:26 PM   [ Ignore ]   [ # 6 ]  
Avatar
Total Posts:  29
Joined  2008-02-19

That’s a slick technique too - I might like the proximal shader better for displacement and coloring.

Now I owe you two beers!

 Signature 

Imagination is more important than knowledge. Knowledge is limited.
- albert einstein

Profile
 
 
Posted: 12 January 2018 02:35 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
Total Posts:  5457
Joined  2011-03-03

Thanks for the feedback. I hope one or the other will give you what you need for the project. Perhaps baking out the color or the displacement as a 16bit movie file might allow for even more fine tuning.

Preview-clip, after some tuning:
https://www.amazon.com/clouddrive/share/HZWDPC1D4wMfA7Sb9VdmbigzW3Byt5T8PXO2waA2LQf

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

Enjoy.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 13 January 2018 09:51 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
Total Posts:  5457
Joined  2011-03-03

P.S.: A little bit more mathematical would be this idea.

In the Formula Shader we can type in x, y and z values for local values. It creates a “pixel” value for this surface based on the distance to the object axis.

In this way we have the surface xyz and the object XYZ. Each point is related to the object axis. To get the distance between these two values each time, we just put xyz each time to square and pull the square root out of it. Since the object Axis is the origin of all points we done’ have to care about it, it will be always zero from a points view. Anyway, the formula would be something this
sqrt((x*x)+(y*y)+(z*z))/1000
Whereby the 1000 is more an adjustment based on the object size, but more for human view than needed mathematical.

When we now use the original shape of the object and bake that into a 32bit/channel linear Open EXR file, (which should be well set in UV(W) terms, no overlapping.) we have stored the original positions in RGB values.
The Formula Shader needs now to be set into a Layer Shader and on top of that the Open EXR file set to Layer: Difference. (Note a good resolution should be given)

Now we can see the change of the xyz of the surface. To push the visibility, we can multiply the Layer-Shader with the Brightness of that channel, perhaps use a Colorizer as well for that.

Sounds perhaps complicated, but once it was done it is simple.


Scene file
https://www.amazon.com/clouddrive/share/46PQHJIyWIgRTTFb1YzhAtoGOufvn1ORcesuzNpPExe
The rendered xyz map works with any sphere in this example, independent from the mesh density!

Testing it with a Torus, have a look at the one minute clip:
https://www.amazon.com/clouddrive/share/tSXV8puRkbl8ouqvI246wZRL1Ok3wUtBjqxD3yjOisQ
Note that the example is more a low res, object as well the “reference texture”.

ENJOY

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 13 January 2018 10:59 AM   [ Ignore ]   [ # 9 ]  
Avatar
Total Posts:  29
Joined  2008-02-19

Dear Math,
Is there anything you can not do?

 Signature 

Imagination is more important than knowledge. Knowledge is limited.
- albert einstein

Profile
 
 
Posted: 13 January 2018 11:10 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
Total Posts:  5457
Joined  2011-03-03

Hehe, it took me a while to explore all of that and test it, but on the end, it is fun, GiantSimon.

As one of my favorite Professors told me, chaos is only given for those who can’t see the order or structure in things. Mathematic helps me to see structure. I love it, but compared to full fledged a scientific mathematicians, well… lots to learn.

I saw your example with the two layer reduction, and I wanted to share an option of course how to do that.

However, the Formula Shader came to my mind. So, I researched a lot of apps, if any image app could pull a root from a channel. Couldn’t find one: back to C4D.

Here is a simple example, just render a preview:
https://www.amazon.com/clouddrive/share/SzsXLTJAtntQA5XNTiqqCtFLGF4RoP4g4sf0yiFSH2i
You might notice, that it would be beneficial to have the edges (knife) prepared of the final shape (not in the file).

Have a great weekend.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
   
 
 
‹‹ Q&A_miscellaneous      NURBS, Part 1 ››