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
   
1 of 2
1
Animating a bullet moving through a barrel
Posted: 02 August 2017 09:08 AM   [ Ignore ]  
Avatar
Total Posts:  197
Joined  2017-02-07

I am animating a bullet moving through a rifle. That part is easy… What I’m having difficulty with is showing the “expanding gases” move through the chambers behind the bullet. As you can see in attachment 1c, the red orange travels up through a small chamber a pushes a piston back. In attachment 1b I just have a cylinder inside the barrel. Then I applied a material with a gradient to the cylinder. Attachment 1a shows what it looks like rendered. What I’m having trouble figuring out is getting the cylinder to also move up the small chamber as well. This animation basically shows what I am trying to do: https://youtu.be/lQe864rGLyk?t=34s

If you look at 0:34-0:54, this is what I am trying to achieve. Although I am trying to make it look much better :D Anyway, I’ve thought about using a sweep nurb and animating the start and end growth. But not sure how to get it to branch up to go to the upper chamber. I’ve thought about building the geometry through the chamber and just animating the texture itself. But not really sure how to make it follow the bullet well. I’ve even thought about using a particle system…but that just seems too complicated. I’ve thought about doing it in After Effects with Particular, but I can’t think of a good way to do it even then.

So I figured I’d ask on here to see if you had any other ideas on how I could achieve this. Maybe there’s something right in front of my face that I haven’t thought about.

Thanks!
Matt

Profile
 
 
Posted: 02 August 2017 01:28 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Matt,

Here is a little sketch. Select “Gradient.Start” or “Gradient.End” and move it on the Z axis.

Scene file:
https://www.amazon.com/clouddrive/share/4OQVqQr2o5ARquZNjptOxit7cocYOmR8mrslSOZUju3

Please note that I have used here the space World for the Gradient, that leads to problems if the object needs to be moved. As I don’t know the animation, please explore what would work.

I’m not an expert in it, but from my understanding the hottest part is where the ammunition is placed initially (as in image 3 of yours.), not the where the bullet travels, as the bullet is just metal.  Hence my color-set up. You might change that, and the bluish tone for the secondary chamber, for the automatic process, is colored so differently to make a point: to make clear that I used an alpha channel here to get a nice transition. You might find a Layer shader with mask and gradients perhaps more useful.

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: 02 August 2017 03:39 PM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Thanks Dr. Sassi, I really appreciate you helping with this. I didn’t think about tying the gradient animating to null objects and animating those. Definitely seems like this is heading in the right direction!

A couple of things though… I think having the red going backward through the barrel does makes more sense, yes. But trying to animate this in conjunction with the bullet is where it gets confusing. When they move in opposite directions, it looks very odd. I want the red to appear as if it’s coming from behind the bullet.

Second thing is, the gradient needs to fade off with an alpha. Instead of going to solid black and solid white. That way when it animates, it can basically fade in and out of the scene completely. Is that possible?

Thanks again!

File Attachments
CV2_r18_mr_17_TXan_01.zip  (File Size: 74KB - Downloads: 58)
Profile
 
 
Posted: 02 August 2017 03:49 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Matt,

You could use the same Gradient in the Alpha or Transparency channel, but in black to white, settings. The Nulls for the Gradients could be constrained to the bullet. I wouldn’t use the bullet directly, as you might have plans after the bullet left, so you can move it independently afterwards.

I hope that makes sense, if not, let me know and I set up a scene file.

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: 02 August 2017 04:21 PM   [ Ignore ]   [ # 4 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Thanks Dr. Sassi. I dunno, this is getting way over my head. I might just do something in post.

Matt

Profile
 
 
Posted: 02 August 2017 05:35 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Please have a look here, Matt.

The Gradient has a start and and end point, which can be defined by objects or numbers.
Below is a different approach, perhaps that works better in your scene.

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

I have used the MoGraph Cache Tag here, to see clearly where the “split” into the chamber might happen. The same animation could go then from that point on, perhaps with a Cylinder then.

Similar to that could be a MoGraph Tracer, set to Limit>End, and which produces a similar effect.

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

Let me know if that is more to your liking.

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: 02 August 2017 05:50 PM   [ Ignore ]   [ # 6 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Dr. Sassi, thank you so much. I think that first scene file you attached may be incorrect. It’s a scene with a banana. Unless I’m missing something haha. The second scene with the MoGraph Tracer is definitely looking closer to what I had in mind. I think this will be something I can use. I really really appreciate your help!

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

Tehehe, Matt. Thanks for pointing it out!

Too funny, but that happens when I go against my own idea: that multi-tasking is a myth, at least with “non muscle memory work”. Watching Siggraph, using a new cloud interface (It doesn’t keep the date sorting, so the file was a r14 file1!), and trying to keep up with the forum, while full-filling requests for digging holes in the garden for new plants.

So sorry, hehe.

I hope the file is now correct, I checked it.

Enjoy!

 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: 02 August 2017 06:14 PM   [ Ignore ]   [ # 8 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Haha no worries whatsoever! I know how it goes smile

Hey thanks again for your help. This should definitely get me to where I want to be!

Matt

Profile
 
 
Posted: 02 August 2017 06:17 PM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for understanding, Matt.

There are always many ways to do something, and I’m interested to find the best for your needs.

If there is anything, just let me know! As usual, I’m happy to look into it.

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: 03 August 2017 01:52 AM   [ Ignore ]   [ # 10 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Dr. Sassi,

Thanks again for your help with this. The tracer object seems to be working well. Here it is with just one tracer animated:
http://www.mattrittman.com/wp-content/uploads/2017/08/bullet-animation.mp4

I’m using multiple tracer objects to fill the barrel cavities. The only part I don’t like is where 2 tracers meet, it’s not very “fluid”. You can see in this still image where they intersect:
http://www.mattrittman.com/wp-content/uploads/2017/08/bullet.png
I’ll have to add a 3rd tracer to the upper cavity.

Any ideas on how I might be able to make it more seamless? If not, this just might have to do :D

Profile
 
 
Posted: 03 August 2017 02:47 AM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Matt,

The first thing that comes to mind, render without a clean pass, then have an Object Buffer for each, render without the alpha channel on the material for that, then with. With the alpha off, you can combine and color correct it in post, then use at least the main alpha to get the transparency back. Sounds like effort and a lot of time.

.
The clip below shows how I would match it. Notice my hint during start to only use the play button, so the Tracer is producing the right results. Anything else will not work.
Forward to the point where they “split” and measure the RGB value, perhaps with the alpha off, to get proper values.
Then copy the material and apply it to the secondary object. I would simplify the gradient for the secondary, your idea might of course vary.

With the Command or Control key down, the picture viewer will give you the RGB values. As shown, animate the end of the 2nd gradient accordingly. I was fast here, but you get the idea. The tricky part is really the transparency. I was debating if I should suggest to boole the end of the secondary, so it is cut straight above the main element.

Clip: one minute
https://www.amazon.com/clouddrive/share/JOA0hrNME76bu9aBSi95tmUnR9ESuyM4VRs6i3BI0yv
Scene file:
https://www.amazon.com/clouddrive/share/qqBrBZx4i6PZX9bKogvMkgDMxIejPlo5rAhPk7LF4qR

My best wishes

 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: 03 August 2017 03:42 AM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: Yes, I know you didn’t like this set up. But perhaps just open it and render a preview, which shouldn’t take longer than a minute.

If that looks good to you, I try to take the un-familiarity out of it and hope to explain it better. Just let me know.

For anyone interested, reading along this thread:

In short, a gradient like a sphere has its middle point where the bullet is. The Alpha channel works in the same way, center, bullet.
The 2nd part has only the alpha set to the animated null.

Since the second moves back, I “mirrored” the gradient, so the colors change hopefully as you like.

Scene file
https://www.amazon.com/clouddrive/share/1AkMOeGZWjcc0o3Vc1NEttv7IdIGkvEFm2WiD8MKuYk

 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: 03 August 2017 09:00 AM   [ Ignore ]   [ # 13 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

You sir, are a genius haha. I would have never figured this out on my own. Thank you so much!

Profile
 
 
Posted: 03 August 2017 02:00 PM   [ Ignore ]   [ # 14 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You very welcome, Matt. Thanks a lot for the nice feedback.

If there is anything else, please let me know.

Have a great day

 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: 04 August 2017 09:45 AM   [ Ignore ]   [ # 15 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Alrighty well here it so far:
https://www.dropbox.com/s/1vlkgfze1ah18op/bullet-animation2.mp4?dl=0

I just need to adjust timing and match up gradients. I think it’s looking pretty good so far.

Matt

Profile
 
 
   
1 of 2
1