methusalah / SplineMesh

A Unity plugin to create curved content in real-time with bézier curves
https://twitter.com/dumas181
MIT License
1.05k stars 104 forks source link

[Question] Add band around points #39

Closed LiorBanai closed 3 years ago

LiorBanai commented 3 years ago

Hi, Great project. I was wondering if there is a way to mark the points on the spline curve (maybe with width). some thing like: image

I try to create something like tihs: image

methusalah commented 3 years ago

Hi,

You can do a mesh that contains hals the metal part like this : [image: image.png]

but in this case, the metal part will be bent in the same way than the tube, which may not be what you need.

You can also have one big mesh with all the metal parts in it, and bend it in the spline space instead of the curve space.

You an also have a different mesh for the pipe and the metal connexion. You will have to write a script to apply different meshes on different nodes (the ExampleTrack file does just that). This way you can add straight nodes toi avoid the metal part being bent.

Finally, you can also bend only a mesh that represents the pipe, and add metal parts as static, non-bent meshes at the position you need, using the ExampleSower or your own script derived from this one. The metal parts will not be bent but the way the pipe will go through it may not be perfect as the pipe won't be exactly centered in the metal ring, depending on the curve.

Hope one of these solutions helps. Have fun bending things!

Ben

Le mar. 22 déc. 2020 à 10:17, Lior Banai notifications@github.com a écrit :

Hi, Great project. I was wondering if there is a way to mark the points on the spline curve (maybe with width). some thing like: [image: image] https://user-images.githubusercontent.com/36262995/102871416-13c55b80-4447-11eb-9f2f-86d22563ceb7.png

I try to create something like tihs: [image: image] https://user-images.githubusercontent.com/36262995/102871547-3bb4bf00-4447-11eb-896b-34243b234921.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/benoit-dumas/SplineMesh/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5QKTXKHGT6SFPXPQBPZETSWBP3ZANCNFSM4VFLRBNQ .

LiorBanai commented 3 years ago

Thanks! I'll check those options.

One more question I have, I try to modify the points location in game mode and unable (for example in the example scene the basic pipe). Only in editor mode it is possible.

What I'm doing wrong? basically I have 10 points that are changing over time and I want to model the pipe around them when they change ( I don't think ropes connection is real close representation).

methusalah commented 3 years ago

Do you mean the generated bent content is not updated when you move the spline nodes at run time? this can be caused by two things

Le mar. 22 déc. 2020 à 12:21, Lior Banai notifications@github.com a écrit :

Thanks! I'll check those options.

One more question I have, I try to modify the points location in game mode and unable (for example in the example scene the basic pipe). Only in editor mode it is possible.

What I'm doing wrong? basically I have 10 points that are changing over time and I want to model the pipe around them when they change ( I don't think ropes connection is real close representation).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/benoit-dumas/SplineMesh/issues/39#issuecomment-749491645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5QKTSLVZF6R2X5K7DCMU3SWB6NDANCNFSM4VFLRBNQ .

LiorBanai commented 3 years ago

now it is working (disabling Static batching). Thanks again!