PDA

View Full Version : Using Bullet for a flying kite?



Sebasvideo
03-11-2014, 03:39 AM
I'm trying to do a project where I need to use Bullet with wind forces to fly kind of a kite that is attached to two ropes, one at each end, and the two ropes are connected to a pole that will be moving around. Is there a way to do this in Lightwave? I'm trying to find information on it but so far nothing. For starters, what is the right procedure to attach a soft body to a hard body?

Thanks,

Sebastian

50one
03-11-2014, 04:40 AM
I think youshould only use the bullet for the surface of the kite, but then you could probably use noise, depends what you're aiming for. Anyway I'm quite curious seeing a quite wide range of question you're asking here and on lux forums, can you tell me what are you working on?:)

Sebasvideo
03-11-2014, 10:16 AM
It's not something I can talk about, but it's very important for me to get this right, even if it's just for the sake of learning it. I'm quite disappointed that apparently it's not something that can be done with bullet dynamics, I thought it was a matter of setting up things right.

3DGFXStudios
03-11-2014, 10:46 AM
Bullet in LW is really basic. There are no constraints/hinges of any kind. Also there are no forces. You can't for example make a balloon go up and hit the ceiling and let the ceiling deform it by it's impact. Or you can't get the ballloon to bounce of a lamp or something like that.

Sebasvideo
03-11-2014, 10:51 AM
I know it's more basic than in Modo, but I think at least forces are available. It's on page 121 of the latest manual.

Sebasvideo
03-11-2014, 11:30 AM
Still, not just by this, but it seems to me that Bullet physics is great for basic stuff, but it's not up to the task on things that are a bit more complicated, and this I say both in Modo and Lightwave, even if Modo has more settings to play with, but usually it takes a lot of tweaking to get things more or less working. In both programs it's typical to see a lot of small objects that keep dancing on the floor after falling, especially if it's pieces of a fractured object.

Is dynamics simulation more realistic in the expensive packages like Maya?

Sebasvideo
03-11-2014, 02:19 PM
This just occurred to me, but isn't this something that perhaps could be done with Genoma?

prometheus
03-12-2014, 12:00 AM
you could probably rig it to constrain hard parts, but for the general approach, why bother with dynamics...just move and keyframe it all, and use displacement for the softbody, or use old soft body or cloth fx.

But if you insist on learning and doing it in bullet...maybe just create the kite hardbody frame in a second layer the kite softbody in another layer, parent the softbody kite layer to the hardbody layer, the hardbody layer being set to a rigid body.
..so just parent the softbody to the hardbody in scene editor.

these should work when you apply vortex field so it affects both the rigid body and the soft body, the rigid body is stiff and the softbody will deform, remember to set softbody geometry subpatch to last.

Edited..you donīt even need to set the hardbody to rigid, should work fine with the kite frame being a part body too, just make sure to parent the elmements, static wonīt work of course.

Michael

prometheus
03-12-2014, 12:45 AM
Further note on using a vortex field, I would recommend using vortex acceleration, not force, or use velocity..with force you have to use sparse values or it will be vay to strong and it will just be a sort of pushing drag force, the other is doing
some turbulence motions.

Michael

3DGFXStudios
03-12-2014, 02:27 AM
I know it's more basic than in Modo, but I think at least forces are available. It's on page 121 of the latest manual.
Yes winds and turbulence is possible but no forces directly applied to an object.

3DGFXStudios
03-12-2014, 02:42 AM
But if you insist on learning and doing it in bullet...maybe just create the kite hardbody frame in a second layer the kite softbody in another layer, parent the softbody kite layer to the hardbody layer, the hardbody layer being set to a rigid body.
..so just parent the softbody to the hardbody in scene editor.


Michael

I don't want to whine but just parenting soft bodies to hard bodies won't work with bullet, or are you talking about the FX Dynamics? Your first suggestion is the best I think. Just do it all by hand.

Ztreem
03-12-2014, 02:47 AM
For doing this only with dynamics and get a realistic result you should have aerodynamics and as far as I know it's only Cinema4D that has that implemented. You could of course do something quite realistic without dynamics and without much of a setup, it all depends what kind of motions the kite has to do.

Ztreem
03-12-2014, 02:56 AM
To attach a softbody to a ridigbody couldn't be easier and more straight forward then it already is in Lightwave. Just intersect the two object on frame 0 in Layout and hit play.
Make sure that the softbody has at least one vertex inside the ridgidbody's collision object.

prometheus
03-12-2014, 03:38 AM
I don't want to whine but just parenting soft bodies to hard bodies won't work with bullet, or are you talking about the FX Dynamics? Your first suggestion is the best I think. Just do it all by hand.

Thatīs weird...why do I get that to work then?, I can parent a hardbody flagpole, kinematic, rigid or part,with softbody flag and use vortex fields to affect both of them..getting the the "cloth"flag to react and the pole flying away in the wind..bouncing against other items.

same goes with using a kinematic fiure object..and having a cape move and flicker ...so I donīt understand why you say it doesnīt work?
and nope..Im not talking about.."Old dynamics"

The mesh filter in the soft body uses a weightmap set to 100% for deformation, the points without any weightmap value will not deform at all.

Please try again since I think you are wrong on this.

and for forces..whatīs the point of forces applied on objects directly? a force is external and shouldnīt be used on the object directly, It affects the other dynamic objects externally...what I might understand is if you would want some sort of thrust force applied on any object and make it lift from the ground..that isnīt possible as I understand it..if thatīs what you mean.

Michael

Ztreem
03-12-2014, 03:53 AM
Did a quick test 5-10 min setup using bullet. It seems like it could work with only bullet dynamics.

prometheus
03-12-2014, 03:54 AM
Did a quick test 5-10 min setup using bullet. It seems like it could work with only bullet dynamics.

Thatīs what I said...it does.

Ztreem
03-12-2014, 04:12 AM
Not trying to ignore your post. You're right about pareting, it works with bullet. I mean that the whole kite with two wires flying in the wind is possible to setup with only bullet. Did you check my attached scene file?

prometheus
03-12-2014, 04:19 AM
Not trying to ignore your post. You're right about pareting, it works with bullet. I mean that the whole kite with two wires flying in the wind is possible to setup with only bullet. Did you check my attached scene file?

I was busy doing superman cape stuff:)

Just tested it...but I knew all that should work, anyway..great sample, I wasnīt in any mood to set it up though...so thanks for sharing that.:thumbsup:

and this also shows it does work without parenting too, if the object layers intersect properly.

Michael

3DGFXStudios
03-12-2014, 06:44 AM
Thatīs weird...why do I get that to work then?, I can parent a hardbody flagpole, kinematic, rigid or part,with softbody flag and use vortex fields to affect both of them..getting the the "cloth"flag to react and the pole flying away in the wind..bouncing against other items.

same goes with using a kinematic fiure object..and having a cape move and flicker ...so I donīt understand why you say it doesnīt work?
and nope..Im not talking about.."Old dynamics"

The mesh filter in the soft body uses a weightmap set to 100% for deformation, the points without any weightmap value will not deform at all.

Please try again since I think you are wrong on this.

and for forces..whatīs the point of forces applied on objects directly? a force is external and shouldnīt be used on the object directly, It affects the other dynamic objects externally...what I might understand is if you would want some sort of thrust force applied on any object and make it lift from the ground..that isnīt possible as I understand it..if thatīs what you mean.

Michael

Well. That's strange. When I try it is doesn't work. You just get two different pieces that move on there own. With a weight map applied to the mesh filter it does something totally wrong. Do you have a scene where it works?

Edit: Aaah I checked the scene that was posted and discovered that I doesn't have anything to do with parenting. It has something to do with penetrating geometry. I'll post a scene showing my point.

Oh Sure.... Now after creating my scene for the 5th time it for some reason works, but only if I parent it to a kinematic body...... I had to reload my scene but it work.
Soft body to Hard body doesn't work.

3DGFXStudios
03-12-2014, 07:20 AM
Here are some scenes I setup. Some work like expected some are not.
Parenting a Soft to a hard body doesn't make any difference. Parenting a soft to a kinematic object does make a difference but then you need a weight map to make stuff lock.

I do not like the way this works and wonder whether this is a function or purely accidental behavior.

Ztreem
03-12-2014, 09:41 AM
Here are some scenes I setup. Some work like expected some are not.
Parenting a Soft to a hard body doesn't make any difference. Parenting a soft to a kinematic object does make a difference but then you need a weight map to make stuff lock.

I do not like the way this works and wonder whether this is a function or purely accidental behavior.

I've looked at your scenes and it looks like it behaves as you would expect from your setup. To have a soft body follow a parent item without mesh filter would transform the soft body into a rigid body, so it need the meshfilter to define wich point to follow the transformation and rotaion of the object.
If you have both mesh filter and an intersecting rigid body over the same points then you're telling Lightwave two things. First that these points should only follow the transform and rotation of the object and second you're trying to apply a deformer(dynamics) to the same points. (impossible to solve)

Don't make it harder then it is.

If you want a deforming body to follow a rigidbody you use intersecting objects no parenting needed.
If you need a deforminng body to follow it's own motion or follow another object use mesh filter and parenting or no mesh filter and intersecting objects. It's as easy as that! :thumbsup:

prometheus
03-12-2014, 09:47 AM
Here are some scenes I setup. Some work like expected some are not.
Parenting a Soft to a hard body doesn't make any difference. Parenting a soft to a kinematic object does make a difference but then you need a weight map to make stuff lock.

I do not like the way this works and wonder whether this is a function or purely accidental behavior.

I got to do some other things than 3d for now..and then go to sleep, so maybe tomorrow I could post something, but your scenefile with parenting with soft to rigid works..that is if you turn of the mesh filter, you have some weird placing of it where it seems when the mesh filter is active, it will just push the soft body away and it twirls akwardly...and besides you have positioned it in layout with 90 degree rotation, as opposed to how it is built in modeler facing it the other way.

if you were to move the softbody up a little, so it intersect with the box a little, it will simulate more correctly and drag the softbody a little more with the cube.
but as Ztreem also pointing out, you donīt have to make it harder on yourself, should be enough with intersecting geometry, though I made a cape not intersecting and just parented to
a kinematic daz figure ...that works too, might depend on how you set mesh filter and where the bodies are placed.

prometheus
03-12-2014, 10:32 AM
and for parenting to work with kinematic ..you need a mesh filter and weight map setup, depending on how you want to place the softbody near the kinematic body, otherwise..if geometry of soft and kinematic body overlap...no need to parent it...there is difference between the two methods, though subtle.

Michael

Sebasvideo
03-12-2014, 03:17 PM
I'm glad that my question led to such a productive discussion. I just got home and I'll have to go through all your posts and scenes to dedicate proper time to soak it all in, but basically late last night I achieved it very easily. One thing I learned from this scene is that Modo's implementation of Bullet is terrible and Lightwave's is much better. At least it's dependable, because the same exact geometry was giving me crazy geometry explosions whether is was at the default values, or setting values that according to the manual should make the simulation much more accurate. But then I exported the scene in Collada, brought it into Lightwave and it work right off the start. It takes quite a while to simulate, but in Modo even at the settings that took the same time to simulate the results were terrible, with the same exact geometry.

Then I also found out that Lightwave has an anchor system like Modo, but it's more automatic. I learned that watching this video: https://www.youtube.com/watch?v=MwoPTl5ykiY I still don't understand how it works, but basically if a soft body is joined to a kinematic body, the kinematic body will pull on the soft body. It's like Ztreem said in a post on page 1:

"To attach a softbody to a ridigbody couldn't be easier and more straight forward then it already is in Lightwave. Just intersect the two object on frame 0 in Layout and hit play.
Make sure that the softbody has at least one vertex inside the ridgidbody's collision object."

Works for me, much easier than setting an anchor in Modo.


Thank you all for your replies :)

prometheus
03-12-2014, 10:52 PM
I'm glad that my question led to such a productive discussion. I just got home and I'll have to go through all your posts and scenes to dedicate proper time to soak it all in, but basically late last night I achieved it very easily. One thing I learned from this scene is that Modo's implementation of Bullet is terrible and Lightwave's is much better. At least it's dependable, because the same exact geometry was giving me crazy geometry explosions whether is was at the default values, or setting values that according to the manual should make the simulation much more accurate. But then I exported the scene in Collada, brought it into Lightwave and it work right off the start. It takes quite a while to simulate, but in Modo even at the settings that took the same time to simulate the results were terrible, with the same exact geometry.

Then I also found out that Lightwave has an anchor system like Modo, but it's more automatic. I learned that watching this video: https://www.youtube.com/watch?v=MwoPTl5ykiY I still don't understand how it works, but basically if a soft body is joined to a kinematic body, the kinematic body will pull on the soft body. It's like Ztreem said in a post on page 1:

"To attach a softbody to a ridigbody couldn't be easier and more straight forward then it already is in Lightwave. Just intersect the two object on frame 0 in Layout and hit play.
Make sure that the softbody has at least one vertex inside the ridgidbody's collision object."

Works for me, much easier than setting an anchor in Modo.


Thank you all for your replies :)

Glad you found some insights on the bullet system, and yes...Ivé heard some fuzz rumours a while ago that Lightwave bullet system seem to be more efficient thatn modoīs, though I canīt tell first hand so to speak.
I do think the bullet system is quite easy to set up and seem fast, comparing to working with dynamics in for example houdini..now thereīs so much more you can connect in houdini and create more advanced stuff...but
the speed and ease of use is an imporant factor as well, I just hope they continue to work on it a little more for the next releases and it will be great...I do miss particle interaction though, which modo has, maybe next version will catch up on that.

Michael

3DGFXStudios
03-13-2014, 07:03 AM
I've looked at your scenes and it looks like it behaves as you would expect from your setup. To have a soft body follow a parent item without mesh filter would transform the soft body into a rigid body, so it need the meshfilter to define wich point to follow the transformation and rotaion of the object.
If you have both mesh filter and an intersecting rigid body over the same points then you're telling Lightwave two things. First that these points should only follow the transform and rotation of the object and second you're trying to apply a deformer(dynamics) to the same points. (impossible to solve)

Don't make it harder then it is.

If you want a deforming body to follow a rigidbody you use intersecting objects no parenting needed.
If you need a deforming body to follow it's own motion or follow another object use mesh filter and parenting or no mesh filter and intersecting objects. It's as easy as that! :thumbsup:

Yup I know there are setups that don't work that was exactly the point. The point I was trying to make was that this way of constraining geometry to each other isn't really user friendly. I think intersecting geometry is wrong. You can get render errors this way or imagine having a transparent object. With intersection geo you will see it sitting in there. I just think it's better to have real constraints that the users can assign them selfs than randomly picket constraints by the software.

Ztreem
03-13-2014, 09:32 AM
Yup I know there are setups that don't work that was exactly the point. The point I was trying to make was that this way of constraining geometry to each other isn't really user friendly. I think intersecting geometry is wrong. You can get render errors this way or imagine having a transparent object. With intersection geo you will see it sitting in there. I just think it's better to have real constraints that the users can assign them selfs than randomly picket constraints by the software.

If you know how it works, I would say that it's very user friendly and amazingly fast system to work with. Just because you work with intersecting object doesn't mean you have to see the actual object at render time. You can get the exact same behaivor with this system that you could with another type of system. Note that it's not only working with intersecting geometry it also works with intersecting collision objects( invisible). Nothing is happening by random, you as a user set it up exactly as you want it to be with precision down to vertex level.

3DGFXStudios
03-13-2014, 10:27 AM
If you know how it works, I would say that it's very user friendly and amazingly fast system to work with. Just because you work with intersecting object doesn't mean you have to see the actual object at render time. You can get the exact same behaivor with this system that you could with another type of system. Note that it's not only working with intersecting geometry it also works with intersecting collision objects( invisible). Nothing is happening by random, you as a user set it up exactly as you want it to be with precision down to vertex level.

You have got a point there. I actually avoided penetration of objects because I figured it would cause errors. I haven't checked how solid this way of connecting stuff works but it seems it works great. Now we just need forces directly applied to objects or is this also doable by sticking a null inside an object? I haven't tried it yet. I'm to busy doing work ;)

prometheus
03-13-2014, 11:08 AM
You have got a point there. I actually avoided penetration of objects because I figured it would cause errors. I haven't checked how solid this way of connecting stuff works but it seems it works great. Now we just need forces directly applied to objects or is this also doable by sticking a null inside an object? I haven't tried it yet. I'm to busy doing work ;)


I donīt follow you here...forces can be directly applied to any object, or nulls to use as a source force...radius control is set by using gradients in strenght channel, use item shape to determine and match what size you need.

However...here is an area I think they should improve on though, by simply making add new force directly as a button and have it assigned with a null with dynamic dimensions, so once you simply click add force, it will show up as a force in the scene with radius visual feedback, today you have to add an object or a null, then assign the force properties...thatīs not user friendly, and you have no idea on the strengt radius since it has to be set with gradients, instead a simple value slider of the radius, and also have it visible...in fact, that is how the old add collision object worked, the new forces are a little too invisible and to much of a hazzle to set up.

Michael

prometheus
03-13-2014, 12:24 PM
testing some forces with bullet, and I have some issues with it, I donīt like the way simple pieces jiggles and swing back and fort when affected by forces, the old hardfx was much nicer in that sense that you could control the spinning in a lot of ways ..and they could roll in a more natural behaviour without spinning/jiggling back and fort, now ..not even explosion force on a brick wall avoids this...not sure if I am missing something here.

Michael

3DGFXStudios
03-13-2014, 01:10 PM
I donīt follow you here...forces can be directly applied to any object, or nulls to use as a source force...radius control is set by using gradients in strenght channel, use item shape to determine and match what size you need.

However...here is an area I think they should improve on though, by simply making add new force directly as a button and have it assigned with a null with dynamic dimensions, so once you simply click add force, it will show up as a force in the scene with radius visual feedback, today you have to add an object or a null, then assign the force properties...thatīs not user friendly, and you have no idea on the strengt radius since it has to be set with gradients, instead a simple value slider of the radius, and also have it visible...in fact, that is how the old add collision object worked, the new forces are a little too invisible and to much of a hazzle to set up.

Michael

Huh? How can forces be directly applied to an object? I'm not talking about winds an turbulence kind of things. I mean things like balloons going up and rockets flying around. Or just cubes going from left to right on there own ;)

Sebasvideo
03-13-2014, 01:22 PM
There's an example on page 123 of the 11.6 manual for swirling leaves that might be a good idea to do to learn more about forces, and it uses not one but three for what I see. I still haven't done it, but it seems interesting.

Now, the "vector" property is not explained in the manual, but basically it's the range of influence of the force, right? Meaning 10 meters on the Y will exert the force up to ten meters upwards from the null, correct?

One thing I wonder (and unfortunately I have to do something else and can't wait for all these simulations to run) is if it's better to set the forcefield to a null or to a square plane or flat cube. I would think setting it on a null would make the force come from a single point, while setting it to a flat cube would make the force start from the full surface of it.

3DGFXStudios
03-13-2014, 01:27 PM
OOOh crap... Now I understand how they implemented forces. I'm probably the only dumbass on earth to think that the whole lightwave bullet plugin works really weird, but hey! I got it working.
I just parented a force to an object and it freakin moves.

I've asked for this in several threads before but no one pointed me in the right direction so there must me more people not getting it.

prometheus
03-13-2014, 01:42 PM
Huh? How can forces be directly applied to an object? I'm not talking about winds an turbulence kind of things. I mean things like balloons going up and rockets flying around. Or just cubes going from left to right on there own ;)

uhh?

well you did talk about lightwave forces..right, and those can be applied on any object...select your object, or null and click the vortex or forcefield or explosion...and that selected item will have a force.
You seem to talk about something new that needs invention....such as rockets flying around etc.

Why do you talk about winds and turbulence?, those are only available with the old dynamics system and those do not affect bullet, rigid,part or kinematic or soft body

noticed your last post ...guess you need to take a look at the bullet forces closely,why donīt you check this..
http://www.youtube.com/watch?v=tyYzvmJokYU

Explosion force doesnīt seem to behave in terms of what we would expect a true explosion would it seems to me.
I did figure out that using convex shape or mesh shape parts will swirl and pending when forces are used on them, if I use box shape they donīt.

what we do know though...bullet forces can not affect and push lightwave particles around, we need another update for that if they decide to pay attention to it.

3DGFXStudios
03-13-2014, 01:55 PM
Thanks for opening my eyes guys ;)

Here is a little balloon test. Looks fun :D It not much but I made it on my macbook watching TV hanging upside down on my couch.

3DGFXStudios
03-13-2014, 02:07 PM
uhh?

well you did talk about lightwave forces..right, and those can be applied on any object...select your object, or null and click the vortex or forcefield or explosion...and that selected item will have a force.
You seem to talk about something new that needs invention....such as rockets flying around etc.

Why do you talk about winds and turbulence?, those are only available with the old dynamics system and those do not affect bullet, rigid,part or kinematic or soft body

noticed your last post ...guess you need to take a look at the bullet forces closely,why donīt you check this..
http://www.youtube.com/watch?v=tyYzvmJokYU

Explosion force doesnīt seem to behave in terms of what we would expect a true explosion would it seems to me.
I did figure out that using convex shape or mesh shape parts will swirl and pending when forces are used on them, if I use box shape they donīt.

what we do know though...bullet forces can not affect and push lightwave particles around, we need another update for that if they decide to pay attention to it.


No I'm not talking about LW forces. Bullet forces!
You can create turbulence and wind fields in bullet. Lino did a video about it when bullet came out. The video you just posted is exactly what I don't mean. It really starting to look like I'm from an other planet or something. But check out the scene that I posted. You just have to parent a null with a force applied to a dynamic object. So it turns out you can make rockets and balloons with Bullet. The only problem is that I can't seem to easily assign the force to one particular object. Now everything that gets near the object with the force applied to it will join it. So the problem is that the forces are global. Not object specific.

prometheus
03-13-2014, 03:39 PM
No I'm not talking about LW forces. Bullet forces!
You can create turbulence and wind fields in bullet. Lino did a video about it when bullet came out. The video you just posted is exactly what I don't mean. It really starting to look like I'm from an other planet or something. But check out the scene that I posted. You just have to parent a null with a force applied to a dynamic object. So it turns out you can make rockets and balloons with Bullet. The only problem is that I can't seem to easily assign the force to one particular object. Now everything that gets near the object with the force applied to it will join it. So the problem is that the forces are global. Not object specific.

yes..Im with you now:) however your scene was a little too slow and a little too complex for showcasing a simple force driving the motion of the object though, but this is what I mentioned earlier in this thread about doing forces like a rocket or a hovering craft etc, and I mentioned that I thought it wasnīt possible, but I am glad you proved me wrong here, I thought I had tested that some time ago, and yes I parented it correctly..but I must have forgot to turn the body to rigid or part body or something...or maybe even just had to low value on the vector or to low strenght value and I couldnīt see anything happening..so thanks for showcasing it.
Regarding anything near the object with the force applied to it will join in, canīt you just use a distance gradient to object in the strenght channel?


hereīs something different, explosion force with some wall bricks, just testing center explosion, the explosion has no radius so itīs without falloff here, but I used an envelope to just set it to die out at frame 5, otherwise it will continue to push the bricks so they sort of stick to the walls un naturally.
the explosion velocity mode is similar to wind, and important is the density, it canīt be at 0..but it should be very low for some variations in the wind density, I also added some part body density variation with textures in the density channel...so it will not be so uniform.
the scenefile nr2 is retimed to get more natural speed.


Michael

prometheus
03-13-2014, 03:50 PM
And what I said about you talking about wind and turbulence, yes you can sort of do that, but those are wrong terms, bullet forces arenīt classified as wind, or turbulence...it is vortex,and force field...otherwise it is easy to confuse with the other system.

prometheus
03-13-2014, 04:32 PM
3DGFXStudios...I know what issues might rise on the force fields and being globally, I was testing a rocket...the rocket is driven by a null with a force going up and some other axis motion...at the same time I have a more global vortex field making the rocket turn a little more, now.... the rocket hitīs a control tower and is about to crash some windows, the control tower is made of fracture parts so they will be affected too much of that vortex field...will have to rethink how I apply forces here, or something else....this is just for fun since you started the rocket sience:)
We could have use of groups here, as the old system did and exlude some things from certain forces.
It might be an idea to check chronosculpt and maybe some locking of some areas would be fine in these cases.

Michael