Archive: need some assistance


29th August 2006 22:40 UTC

need some assistance
This preset started out as a tech tryout.
I wanted to have a line that went up, and as soon as y>1 then it would re-enter at the bottom.
I have that working now.

I went a little further - I changed the line to an arrow and added a background, if you can call it that, and rotation.

Then, it seemed fun enough to -try to- turn this into a worthy preset.

I have one problem though. (see attached preset)
What I want is that if an arrow leaves the top (or when it re-appears at the bottom, whatever) that it shifts along the x-axis.

Point is however, that I can't shift the entire arrow at once because the rest of the arrow isn't there yet when the tip reaches the top. I have a somewhat working solution that's based on y1<-0.97
That solution shifts like I want to, but it causes the arrow to 'shake' when it's re-appearing.

I don't know if this post makes enough sense, so if you have any questions: just ask

All ideas and insights are more than welcome..


30th August 2006 18:39 UTC

problem solved..
you just needed to generate the new mx value once per passthrough of the arrow.

see the commented code


30th August 2006 23:11 UTC

I had thought about such a solution, but this method doesn't really fix the issue.

I'll show you the bug in your fix:
Set rx to 0 (bz in init too), and remove the *1.5 at the end of x and y to make it more clear. Close/reopen AVS.
When the tip of the arrow reaches the top, the remaining part suddenly shifts.


2nd September 2006 11:58 UTC

i finally fixed the problem by rewriting major parts of the code. if you have question on the code just ask.


2nd September 2006 15:09 UTC

Quite a different approach indeed.

I'll dig into your code and find out what you did..
Thanks a lot, man


6th September 2006 13:13 UTC

This is a classic problem. The easy solution to making something appear at a different x each time it wraps around y is to use 2 of it, when one goes off the top it just let it keeps going until the next arrow goes off the top. This way is lazy, but it works. This boils down to rendering twice and using some if and mod for n/skip

I would open the preset and look... but I'm at work :/