Posts: 15
Threads: 3
Joined: Apr 2023
Reputation:
0
03-04-2023, 02:21 AM
(This post was last modified: 17-04-2023, 02:45 AM by Balou.)
Hi,
I'm having a lot of fun with the asset, trying, as many did before me, to simulate a Fly fishing line and rod. I know it's not possible to simulate it exactly as it is in real life, but I'm getting closer and closer to something that is satisfying enough.
Here is a reminder of the effect wanted:
Couple of things to focus on, the line motion is a straight line, the leader with the fly is following perfectly.
The fly is not that heavy and the difference with or without a fly is not that important.
My setup is as follow: 1 Solver and Update, a Rod and Rope. The Rope start (fishing line) is snitched to the tip of the rod so i can get the impulse from the rod. I don't have a fly or leader for now.
When I bring the rod from the back, it's usually the tip of the line that goes first instead of last as you can see in the video the fly is last and driven by the rest of the line. For me it looks like it's driven by a rebound or elasticity of the line how can I avoid that?
When I try to "deploy" my line, it also has a rebound, adding damping doesn't help much and makes the casting harder.
Probably because of the rod, but my line is not going very straight even if my movement is right, I've read that it's difficult to have a more rigid rod, what are my options?
If I use a physic rod (configurable joint) how can I get the impulse from the rod?
When changing the length of the rope, is the mass automatically changing too?
Is it possible to use a custom model with a rod? Right now I've a custom handle but when moving my hand there is a slight delay at the connection (attachments static) so it's not really a solution ...
That's already a lot of questions!
Here are some settings of my solver and rope. And a video of some casts.
Thanks a lot!
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-04-2023, 07:27 AM
(This post was last modified: 03-04-2023, 09:49 AM by josemendez.)
(03-04-2023, 02:21 AM)Balou Wrote: When I bring the rod from the back, it's usually the tip of the line that goes first instead of last as you can see in the video the fly is last and driven by the rest of the line. For me it looks like it's driven by a rebound or elasticity of the line how can I avoid that?
Hi!
It seems the rod is way too light. Because of this the tip of the rod doesn't bobble at all and has no inertia of its own, since there's not enough mass pulling it around. Try increasing the rod's rotational mass (in the path editor), this controls how much rotational inertia the segments in the rod have.
(03-04-2023, 02:21 AM)Balou Wrote: When I try to "deploy" my line, it also has a rebound, adding damping doesn't help much and makes the casting harder.
Not enough mass at the tip of the line.
(03-04-2023, 02:21 AM)Balou Wrote: Probably because of the rod, but my line is not going very straight even if my movement is right, I've read that it's difficult to have a more rigid rod, what are my options?
Same as the previous one, not enough mass at the tip of the line. When casting, the mass of the fly/bait is very high compared to the line's so you're basically throwing the bait like a projectile using the rod as a spring, and the line - that has very little mass - just follows it. Since there's no bait here, the line is free to move any way it wants and the chances for it to go in a straight trajectory are very slim. If you try taking a regular rope from one end and then try to cast its other end in a straight line in the real world, you'll realize it is pretty much impossible: you're essentially throwing a large spaghetti around .
(03-04-2023, 02:21 AM)Balou Wrote: If I use a physic rod (configurable joint) how can I get the impulse from the rod?
Not sure I understand this one: do you mean the impulses exchanged between the configurable joint and the rope?
(03-04-2023, 02:21 AM)Balou Wrote: When changing the length of the rope, is the mass automatically changing too?
Yes. Increasing the length of the rope creates new particles in the rope, each particle has a given mass (that you can specify in the path editor) so more rope = more particles = more mass.
(03-04-2023, 02:21 AM)Balou Wrote: Is it possible to use a custom model with a rod? Right now I've a custom handle but when moving my hand there is a slight delay at the connection (attachments static) so it's not really a solution ...
Yes, you can use bone hierarchies:
http://obi.virtualmethodstudio.com/manua...setup.html
Internally they use the exact same constraints and structure as rods, but they're built based on a skeleton structure - instead of a spline like rods are.
Hope to have helped somewhat! let me know if you need further assistance
kind regards,
Posts: 15
Threads: 3
Joined: Apr 2023
Reputation:
0
03-04-2023, 02:34 PM
(This post was last modified: 03-04-2023, 02:59 PM by Balou.)
(03-04-2023, 07:27 AM)josemendez Wrote: Same as the previous one, not enough mass at the tip of the line. When casting, the mass of the fly/bait is very high compared to the line's so you're basically throwing the bait like a projectile using the rod as a spring, and the line - that has very little mass - just follows it. Since there's no bait here, the line is free to move any way it wants and the chances for it to go in a straight trajectory are very slim. If you try taking a regular rope from one end and then try to cast its other end in a straight line in the real world, you'll realize it is pretty much impossible: you're essentially throwing a large spaghetti around .
That's the thing, a fly is almost weightless, sure the leader is even lighter but if you look at the video you can the the fly is not driving the fly line but is driven by it. This is what I can't achieve, it works sometimes, but most of the time it's the fly leading the way and it feels weird.
Just FYI the order is Rod > Fly Line (usually a colored line) > leader (regular fishing line) > Fly.
Quote:Not sure I understand this one: do you mean the impulses exchanged between the configurable joint and the rope?
Yeah kind of, i think it's what you call a double way coupling in the doc, the line has an influence on the rod and vice versa.
Quote:Yes, you can use bone hierarchies:
Nice! But the doc says that "The ObiSolver component should almost always be placed at the character's root. This ensures simulation happens in character space, and gives you fine control over inertial forces." but for snitching 2 actors together they need to have the same solver no? If the rope is parent of the rod is this going to be an issue?
Thanks!
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(03-04-2023, 02:34 PM)Balou Wrote: That's the thing, a fly is almost weightless, sure the leader is even lighter but if you look at the video you can the the fly is not driving the fly line but is driven by it.
There must be some weight at the end of the fishing line, typically this is a combination of the hook, the fly, and and actual weight just for this specific purpose. Try casting with the fishing line alone, you'll find it's basically impossible.
Mass doesn't matter in absolute terms: you'd get the exact same behavior out of a 100 kg mass at the end of the rope and a 10 kg rope that you'd do from a 10 grams mass at the end and a 1 gram rope. Only the ratio between masses matters. The thing is that the tip of the line must be heavier than the rest of the line, otherwise there's no momentum to reel it out, and it will be basically impossible to cast or control.
(03-04-2023, 02:34 PM)Balou Wrote: Yeah kind of, i think it's what you call a double way coupling in the doc, the line has an influence on the rod and vice versa.
You can get a constraint force out of each constraint in Obi, which is a lagrange multiplier. You need to retrieve the specific kind of constraint batch you're interested in, and access its lambdas array. See the manual for info on how to access and iterate constraints: http://obi.virtualmethodstudio.com/manua...aints.html
Also, see the "ApplyTearing" method in ObiRope.cs. It's a good example on how to access the constraint forces for all constraints in an actor. In this case, it iterates trough all distance constraints in the rope and finds the ones above a force threshold. Then it sorts them by force and tears the ones under the most force.
(03-04-2023, 02:34 PM)Balou Wrote: Nice! But the doc says that "The ObiSolver component should almost always be placed at the character's root. This ensures simulation happens in character space, and gives you fine control over inertial forces." but for snitching 2 actors together they need to have the same solver no? If the rope is parent of the rod is this going to be an issue?
This only applies to characters, when you want to have fine control over inertial forces. For instance a character wearing a scarf, which you don't want to become entangled during a somersault. In your case you can place the solver wherever you feel makes most sense. Just keep in mind that simulation takes place in solver space.
Posts: 15
Threads: 3
Joined: Apr 2023
Reputation:
0
03-04-2023, 09:16 PM
(This post was last modified: 04-04-2023, 01:28 PM by Balou.)
Yeah I guess it's different for fly fishing, when I was learning it was with a feather instead of a fly and it was possible to cast! But you are right, the weight is somewhere and by reading a couple of article on the subject it's the fly line that is the most weighted thing and there is more weight close to the leader. I'll try that.
So I did try the bone things and I'm having good result on the rod physic with a nice model. The only thing is I can't find a good way to attach the rope at the top. When stitching the stitch moves back to the handle when starting, and attachments doesn't move the rope.
Here is what my bone gizmos looks like when I start:
What am I doing wrong?
Also another question: I'm changing the length of the rope at runtime, how can I preset a profil for the generated section. For example, I want the first meter to be X radius and Y mass, then the next 3 meters Z radius and K mass etc... Right now I'm generating with the blueprint and the Rope Cursor component ... Should I move the source cursor to different position on the blueprint?
One last thing, could be a bug, if your rope is inside a prefab, the stitch from the stitch component is not saved.
TY
Posts: 15
Threads: 3
Joined: Apr 2023
Reputation:
0
Any ideas on the issues above?
On a side note I'm really close to the real behavior so thanks for you help.
Posts: 6,321
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
05-04-2023, 11:17 AM
(This post was last modified: 05-04-2023, 11:18 AM by josemendez.)
(03-04-2023, 09:16 PM)Balou Wrote: So I did try the bone things and I'm having good result on the rod physic with a nice model. The only thing is I can'tfind a good way to attach the rope at the top. When stitching the stitch moves back to the handle when starting, and attachments doesn't move the rope.
Make sure you're not stitching the rope to the handle, when using the stitcher make sure you have the Gizmos button in the scene view enabled. Two small squares joined by dotted line should appear, you can drag the squares around to stitch together the particles closest to them.
(03-04-2023, 09:16 PM)Balou Wrote: Here is what my bone gizmos looks like when I start:
What am I doing wrong?
What does your bone hierarchy look like? Could you share the rod model you're using for this? (you can send it to support(at)virtualmethodstudio.com)
(03-04-2023, 09:16 PM)Balou Wrote: Also another question: I'm changing the length of the rope at runtime, how can I preset a profil for the generated section. For example, I want the first meter to be X radius and Y mass, then the next 3 meters Z radius and K mass etc... Right now I'm generating with the blueprint and the Rope Cursor component ... Should I move the source cursor to different position on the blueprint?
The cursor can only create instances of already existing particles, you can select which particle along the rope to sample by moving its "source mu" parameter. This said, you can tweak any property of any particle at runtime via scripting, so you should be able to get the last (or first) element in the rope and set the properties of the particles at either end to whatever values you want. See:
http://obi.virtualmethodstudio.com/manua...icles.html
http://obi.virtualmethodstudio.com/manua...ropes.html
(03-04-2023, 09:16 PM)Balou Wrote: One last thing, could be a bug, if your rope is inside a prefab, the stitch from the stitch component is not saved.
Thanks, will look at it! stitches are stored in a serialized list so they should be stored fine in prefabs as well (t least in theory).
kind regards,
Posts: 15
Threads: 3
Joined: Apr 2023
Reputation:
0
Thanks again for the detailed answer.
The stitching looks right in edit mode, I can see the green dotted line at the top of the rod, between the last bone and the start of the obi rope. But I soon as I start the rope is moved to the origin of the rod. I've send you an email with the rod model.
Quote:Thanks, will look at it! stitches are stored in a serialized list so they should be stored fine in prefabs as well (t least in theory).
Thanks, to add more to that, when adding a stitches from a model, like the rod, if the rod is not unpack it's not going to stay between Play mode so it could be related?
|