Jump to content

Reverse curve direction not working


kiryha

Recommended Posts

I use curves as paths to animate objects along this curves — cars on the roads.
Some curves give me the right count clockwise direction of object movements and some of them not. At some point, if I change the curve orientation ("reverse" checkbox on curve_# object in LAND container) I got it fixed.
But now reversing each curve do not necessarily change motion direction and I am not able to find the reason of issue or the way how else I can change individual orientations. 

Animation flipbook
Scene file: GEO_CITY_008_reverse_001.hipnc
PS. This is next stage of the topic I started earlier.

Edited by kiryha
Link to comment
Share on other sites

if you read the helpcard on 'reverse' in the curve node...I think that might hint at the problem...ie...it does NOT reverse the point order...so after you've built your path 'loop'...I think just sort/reverse the points there ?

(or sort/reverse the curve itself....)

Edited by Noobini
  • Like 1
Link to comment
Share on other sites

Great! I can create a group and add primitives (curves) manually to this group for selective reverse. Works, fixed!

But I wonder... how can I control it procedurally if I will have a LOT of curves? How to determine a curve orientation, if its clockwise or opposite?

Link to comment
Share on other sites

to check the (counter-)clockwiseness, you can enclose the primitive (in the curve sop directly, in a primitive sop or an ends sop), then check if the primitive normal is up or down.
(if your curve self intersects, there obviously may be issues with this or any method)

Edited by acey195
  • Like 1
Link to comment
Share on other sites

@acey195

Thanks, Twan, nice hint!

@ThomasPara
Wow, that's really fast setup!

Despite I just start to examine this setup and do not understand how it works, I have several questions already:
1) I am trying to copy random alembic models on points instead of proxy cubes (with set_time_and_variation node) but it does not work. The path to alembic file is correct and different for each point (check @DISP attribute). Have no clue what is wrong!
Here is a scene GEO_CITY_008_reverse_003_fix.hipnc (and alembics: CAR_B_01.abc and CAR_A_01.abc)
The only way I was able to handle it - with one more nested for loop, as you could saw in initial setup (i delete other models to keep the scene clean there).

2) What the purpose of the carve1 node? Turning it off seems does not change anything, but the setup works much faster with it.

3) What happens with point numbers if I would not divide a time by perimeter (u += @Time/@perimeter;)? The points still move along the path but numeration of points jumps if I use only time (u += @Time;).

Edited by kiryha
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...