Speed change of the dot (circle SOP)

Hello,

I just created a single dot following the line horizontally but I have no idea how to change the speed of the dot. I would appreciate it if someone could help.

One more thing I am curious about is, can I use more than one render TOP? If not, is there a good way to locate the green dot over the pink line instead of just changing the z-axis of one of them? Thank you so much.

linecircle2.toe (11.2 KB)

For speed control, a Lookup CHOP is nice to use and you can drive it with an adjustable LFO, slider, or any signal really.
You could also use Animation COMP if you want to do keyframe animation.
Note: recommend always translating at the Object COMP level, not the SOP level if you can avoid it. Transform a SOP will cause the SOP to cook, transforming a COMP is “free”.

You can use multiple Render TOPs, but that isn’t needed here.
If you turn off the Wire MAT’s ‘Depth Test’ parameter, then you can use the Object’s Draw Priority parameters to set the order in which they are drawn. The higher the number the earlier it is drawn, so I increased the Line geometry’s Draw Priority here.
linecircle2.1.toe (11.5 KB)

Thank you so much @ben This really helps!

BTW, I am a newbie so it is a bit difficult to follow “translating at the object comp level”. If I am not mistaken, it seems like you don’t recommend me to use “transform SOP” after the circle SOP in my file. If so, I am wondering how I can avoid using it and switch to the Object COMP level approach? Thank you so much.

Ah, so Object COMPs are the group of COMP you see in the first column of the OP Create Dialog, they are all to do with 3D objects. So in your example here, instead of adjusting tx,ty,tx on the Transform SOP, you can do it on the Geometry COMP, in your case geo3. I think I already set this up in the modified file I posted.

Sometimes a Transform SOP is needed, like when moving many parts of a complicated geometry separately, but when just doing a simple full-object transform, its a good habit to do it in the Geometry COMP.

Now I got it. This is a really great tip I haven’t thought about. Thank you so much @ben

Hello @ben

I would like to ask some of my questions. I am trying to put an “on and off” switch for the green dot (when the key 3 is pressed). What I tried is using the “delete SOP” turning “Use Number” on and off. It is kinda working but I am wondering if I am in the right page or if there are better ways I should do. Thank you so much.

I would use the Render Parameter on the geo2 to turn it on and off. Again, you want to use extra SOPs as sparingly as possible, and a Delete SOP would force the geometry to cook (recalculate) every time you make a change. The Render parameter is simple tell it to be displayed or not by the renderer, the geometry stays static and does not need to be calculated.

Thank you @ben This helps a lot and looks better than what I tried.

I edited my original question so you may not catch the later one. I am looking for a way to apply gradient colors into the pink line (geo1). I think I can only use a plain color in the line MAT, so I am completely stuck. I would appreciate it if you could let me know by any chance. Thank you so much.

UPDATE: I solved it by following the ramp TOP->topto CHOP->chopto SOP.

Line MAT allows point colors along its length (not across its width). See Snippets and wiki page.

Thanks @greg I could pick up a single color in the line MAT (or two colors based on the distance) but what I am trying to do is using multiple (gradient) colors like we can easily do with the ramp TOP. Please correct me if I am wrong. Thank you.

right, you can’t do that unless you subdivide the line with something like a Refine SOP. Line MAT doesn’t do textures.