Object transparency from one side to the other using Ramp>Transparency. Wracking my brains out figuring it out

Object transparency from one side to the other using Ramp>Transparency. Wracking my brains out figuring it out

greekgooner
Advocate Advocate
2,138 Views
7 Replies
Message 1 of 8

Object transparency from one side to the other using Ramp>Transparency. Wracking my brains out figuring it out

greekgooner
Advocate
Advocate

Spent the last 3 hours figuring out how to make my object show 0 opacity one one side, then slowly transition to solid object on the other side (as if a tube is squeezing gel out). I've used nparticles, but found out there is a way using a Ramp shader attached to lambert transparency.

 

So many different methods and it's not working.!

Dont understand what settings to choose/change.
Would also prefer w/Arnold material, but lambert can be ok.

0 Likes
2,139 Views
7 Replies
Replies (7)
Message 2 of 8

mspeer
Consultant
Consultant

Hi!

Just us a Ramp texture and animate the "Selected Position" of a color entry (and if required also the color itself).

0 Likes
Message 3 of 8

greekgooner
Advocate
Advocate

Yes i'm still trialing and erroring but still cant get it to work.

What are the steps to be taken and can I get it to work with an Arnold standard material?

I think I have it working with a lambert, but it doesnt go at the rate I want. e.g paste coming out/following the tube nozzle.

Maybe my nparticles is the best way after all

 

0 Likes
Message 4 of 8

mspeer
Consultant
Consultant

Hi!

Sorry, I don't understand the problem.

Please show what you got so far.

 

The steps are

1. choose a value, then set a key,

go to next frame

2. choose a value, then set a key.

==> Done.

 

"...but it doesnt go at the rate..."

This I also don't understand.

Do you know how to edit keys in Graph Editor?

 

These are all basic tasks and the setup of this texture animation should doable within one minute.

 

"Maybe my nparticles is the best way after all"

Sure, you can also use nParticles, but setting up a particle animation takes much longer, but you can achieve a complete different look.

 

0 Likes
Message 5 of 8

greekgooner
Advocate
Advocate

rampH.JPG

I think I need to start from the beginning as i'm trying too many different methods. 

Do I add the "ramp" in the colour attribute to this arnold shader? Or connect it to it's 'opacity'?

If I want to get the opacity to start at 0 first (on the left side), then increase from 0>full opacity to the right, do I need to link it to  'transparency'? (in which case I'd need to change to blinn/lambert.).

0 Likes
Message 6 of 8

greekgooner
Advocate
Advocate

So to add, this shows you what I have.

But when I try to change keyframes so the 'visibility' matches/lines up with the tub squeezing the gel out, I get 
Warning: extrude1 (Extrude): Extrude pivot is outside of the bounding box for the profile. This could lead to strange results. //  ?

 

0 Likes
Message 7 of 8

Kahylan
Advisor
Advisor

Hi!

 

So the error you mentioned doesn't have anything to do with your ramp. If you want to change Keyframes on the Ramp, it needs to be selected in the Hypershade or Nodeeditor or via the select button in the Attribute Editor. We don't know what "extrude1" referes to in your project. So it's impossible for us to tell what object causes this error.

 

But tbh. From your render I don't think you'll be able to get the result you want from an animated ramp. I would probably use a deformer based setup to animate your gel geometry. An animated lattice, Blendshape with inbetweens or wire deformer, that way you can also match up the end of the gel with the nuzzle of your tube.

0 Likes
Message 8 of 8

mspeer
Consultant
Consultant

Hi!

 

There is only a warning message and it has no impact on the animation of the ramp.

Based on the provided video I guess you do not have a proper UV mapping.

Either correct your UV mapping or just use a projection( from the side).

I recommend to test a projection.

Using an animated ramp is for sure the fastest option (and can also be used with a volume shader if needed).

 

There are of course a lot more options to do such an animation, like using deformers, booleans, particles or even using a fluid simulation, but they require more time to be set up.

Just a simple example for a Deformer (Lattice) based solution.

toothp.gif

 

0 Likes