On-demand body creation breaks [SOLVED]

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby misho » Mon Apr 01, 2019 5:43 pm

Thanks, guys!!

Ok, Julio, I just posted a short video of the space capsule catapulting and the parachute sequence:

FSX SpacePort NASA Orion LAS Parachute Sequence

cheers,
Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby Dave Gravel » Mon Apr 01, 2019 6:13 pm

Nice video, It can look nicer with a comment about newton dynamics use. :P
It is just my point of view, don't take it bad hehe.
What the video showing is not only coming from the ms fly sim.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby misho » Mon Apr 01, 2019 6:21 pm

Dave Gravel wrote:Nice video, It can look nicer with a comment about newton dynamics use. :P


Oh - DEFINITELY! :mrgreen: but for a few reasons I don't want to get into right now, I'd like to keep the technology I'm using under wraps until the "big reveal" :mrgreen: I'm hoping to have a downloadable demo in a few weeks, and I look forward to including Newton Dynamics logo with branding and promo material (IF that's ok with Newton's stakeholders :wink: )

Cheers,
Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby misho » Mon Apr 01, 2019 6:36 pm

So, regarding the video - if you watch it towards the end, starting around 1:30 and before it fades out, there is a weird oscillation on the parachute object - it starts to vibrate.

I am looking into it now, and it has something to do with the drag force. The biggest parachute has obviously the largest drag force, and I had to scale the reference area parameter until I figure out what it is, just to have it behave with some stability. You can't notice it on the smaller parachutes, but the large one, when it has the full reference area specified, it just starts vibrating, and then spinning wildly until the whole system eventually crashes... :?:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby Julio Jerez » Mon Apr 01, 2019 7:18 pm

How are you making the parachut?
I assume you are using ballandsocket joints.

Try setting the joint stiffness to something like 0.95f
Or some value around.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby misho » Mon Apr 01, 2019 7:58 pm

Julio Jerez wrote:How are you making the parachut?
I assume you are using ballandsocket joints.

Try setting the joint stiffness to something like 0.95f
Or some value around.


Thanks Julio, I am trying that now!

I just want to illustrate how I'm doing this, so that you have a general idea of the complexity (or in this case, simplicity)

Newton parachute body has a collision in the shape of inverted cone (in the image below, a transparent cone). The VISUAL object roughly fits inside this cone. This visual object actually consists of 3 parachutes, and they are all animated internally (nothing to do with the Newton body). The animation that you see, the parachute domes buffeting in the wind, is purely for visual effect :mrgreen: . The newton body is an inverted cone attached to the capsule through dCustomBallAndSocket joint (represented by little green cube at the bottom of the cone), and it is supposed to be still once it reaches its equlibrium and aligns with the velocity vector (which eventually points downwards).

Image

The internal animation is quite effective - I have it set up so that each parachute has an animation "sway" in 2 axis, and they are all fired randomly and independently, so with all the permutations, the effect is quite good :wink: I don't think I want to go as far as modelling wind buffeting on the actual Newton body :mrgreen:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: On-demand body creation breaks in _NEWTON_USE_DOUBLE bui

Postby misho » Tue Apr 02, 2019 5:54 pm

Ok, so I just made a bit of headway with this. There are several problems I noticed:

  1. The gimbal lock precision value for double precision build was misplaced in dMatrix.cpp. A while ago I asked if this could be added to dMatrix::GetEulerAngles(), and it was, but it was implemented on the wrong section. Since my capsule and the parachute, while falling straight down, are in a gimbal lock position, part of the vibration/shifting I was observing was caused by this.
  2. When creating a collision object for the parachute, I create an inverted cone object with top radius at 50 meters, and the bottom at 0.1 meters (so, pointy :mrgreen: ). With this value, I get a crash, somewhere in Newton (it's an assembly file, I can easily reproduce it). When I change pointy radius to more blunt, say 5.0, everything is fine. So, I left it at this value, no big deal, I just wondered why the system doesn't like such a "pointy" cone... perhaps the dimensions are too extreme?
  3. Most of my bodies are designed with a Y-longitudinal axis (meaning, the direction of motion is in y axis). I designed parachutes with the longitudinal Z-axis. I thought this shouldn't matter, because I specify in the object's parameters the axis of fluid flow equilibrium. I must have overlooked something in my code, because for some reason, the parachutes are unstable with Z-axis (at least, the large parachute seems to be). I re-oriented the large parachute to align with Y-axis, and things are now much more stable - no vibrations, and a nice, steady terminal velocity descent.

So, everything as far as parachute dynamics is now working ok, except one thing: When the large parachute is deployed, it is attached to the capsule through dCustomBallAndSocket hinge. At the moment of linking, the parachute is placed at the right location, but then it drifts away sideways, and keeps drifting from side to side until it settles in a location, except not where the hinge was specified, but on the longitudinal axis. I observed the same behavior with a fixed dCustomHinge hinge, but to a lesser extent.

Any thoughts on why the linking might be so unstable? I'll look into it some more, but I was wondering if I'm missing something obvious...

Thanks,
Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: On-demand body creation breaks [SOLVED]

Postby misho » Thu Apr 04, 2019 3:49 pm

I got parachutes working - finally!

It is probably not the ideal solution, but it is stable and it works well. First - the problem with instability and linking was with the shape of collision I was assigning it - a large inverted cone (as in the previous pic I posted). I am not sure why, but this shape had a lot of problems linking using the Ball and Socket hinge. I experimented with other shapes and found that a tall, slender box (or uniform cylinder) with origin on one end works well.

This will not give me proper collision envelope because the parachute object is much wider at the top, but I don't care for now - I don't see anything colliding into a parachute during the capsule descent.

I guess one thing that would fix this would be ability to add 2 collisions into compound collision, but with different mass properties. Then, I would add a slender box as a central object, and a much lighter, almost zero mass inverted cone collision object for the actual collision envelope. Is that possible?

Or - I could just override the the inertia matrix of the large cone and give it the inertia matrix of the tall slender box - that should work, right? :mrgreen:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: On-demand body creation breaks [SOLVED]

Postby Julio Jerez » Thu Apr 04, 2019 5:34 pm

I was thinking the inertia is the problem, a volume that big will drive what ever small volume is attach to it, but you can just overide it with a small value.
Just get the mass matrix of the capsule and a signed to the parachute, that way both will have equal pull.

Make a video to see how it looks.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: On-demand body creation breaks [SOLVED]

Postby misho » Thu Apr 04, 2019 6:16 pm

Thanks Julio, I will!

Here's a fact that completely blows my mind:

Before I implemented the parachute system, I researched NASA's specs for Orion capsule, and got all the parameters I could from them (weight, reference area, parachute coefficients of drag, etc)... In my sim, after the main parachute opens and the capsule settles to terminal velocity, the speed indicated is 21.8 km/h. NASA's spec calls for "a comfortable splashdown velocity of about 22 km/h".

I think that's an incredible testament to Newton physics engine :mrgreen:
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 8 guests