Board index FlightGear Development Aircraft

The big glider project

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: The big glider project

Postby D-ECHO » Sat Feb 01, 2020 4:56 pm

Knüppelrührer wrote in Fri Jan 31, 2020 9:01 pm:is there anything in the K6, which makes it not working in 2019.1.1?

last line of log file

47.81 [INFO]:flight /build/flightgear-e1iPVb/flightgear-2019.1.1/src/FDM/JSBSim/JSBSim.cxx:249: aero does not exist (you may have mis-typed the name).

That's strange. I'm using flightgear next, but this should not cause JSBSim to fail like this.
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: The big glider project

Postby Ysop » Sat Feb 01, 2020 5:08 pm

No problem. Maybe I have to wait, until 2019.1.2 is ready (for Ubuntu) and make a nice clean new installation with that.
No reason to put time into single-user-problems.
User avatar
Ysop
 
Posts: 1350
Joined: Thu Oct 25, 2018 10:06 pm
Version: 2020.3.18
OS: ubuntu 22.04

Re: The big glider project

Postby D-ECHO » Sun Feb 02, 2020 4:50 pm

During further tests with the new shader, I noticed that it breaks rotate animations, because under high load, e.g. the ailerons now rotate around a wrong pointed. Is this something that just has to be accepted or do you by chance know any fix? On that note, can animation coordinates be adjusted run-time?
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: The big glider project

Postby Thorsten » Sun Feb 02, 2020 5:09 pm

The rotations are part of the matrix stack that is applied after the vertex shader does its job. So theoretically you can construct a matrix that compensates for the vertex displacement inside the vertex shader and multiply that on top of the stack, that would fix the rotation.

In practice, computing that matrix may be... challenging.

It may in fact be easier to dispense with the rotation animation and give the shader the ability to do a rotation after the displacement has been computed.

But basically you have re-discovered the reason why a wingflex shader isn't more widely in use :?

On that note, can animation coordinates be adjusted run-time?


At least some of them can, but I'm not sure axis definitions fall under that heading.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The big glider project

Postby D-ECHO » Sun Feb 02, 2020 5:13 pm

mh.... that sounds complicated, and I didn't know of this limitation before :(

I am afraid I am not capable of doing this at the moment.
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: The big glider project

Postby wlbragg » Sun Feb 02, 2020 7:06 pm

I take it it is a small defect in the aileron and flap rotations or is really noticeable?

I suppose a wing such as the DaSH has that has no control surfaced won't be affected?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: The big glider project

Postby D-ECHO » Mon Feb 03, 2020 6:14 am

With no moving parts there should be no problems. The defect unfortunately is pretty huge
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: The big glider project

Postby erik » Mon Feb 03, 2020 6:04 pm

Thorsten wrote in Sun Feb 02, 2020 5:09 pm:The rotations are part of the matrix stack that is applied after the vertex shader does its job. So theoretically you can construct a matrix that compensates for the vertex displacement inside the vertex shader and multiply that on top of the stack, that would fix the rotation.

In practice, computing that matrix may be... challenging.

After thinking about this, and if I'm understanding this correctly, you should move the object to the intersection of the circle centered at the original rotation point with the circle centered at the translated rotation point, both with a radius of the distance between them:
Image

If the object is translated after flexing then the object would rotate neatly in place again.
In theory this would only be necessary for the up-down axis.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: The big glider project

Postby Thorsten » Tue Feb 04, 2020 8:10 am

Sounds plausible enough (not sure if there can be hidden surprises...)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The big glider project

Postby erik » Tue Feb 04, 2020 8:59 am

I thought of a couple:
  • It only gives you the solution for a 60 degree rotation (since it's an equal sided triangle).
  • this only works for an aircraft aligned rotational vector.
  • Since the wing rotates around the center-line of the aircraft you'll need to compensate for left-side displacement also.
You'll need the following additional steps:
  1. Do it for the side (left-right axis) too
  2. multiply the translation vector with the inverse rotation vector
  3. rotate the translation vector another (60-angle) degrees using the rotation vector

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: The big glider project

Postby D-ECHO » Tue Feb 04, 2020 10:22 am

Your ideas sound very good but both undersranding and implementing this is above my capability, Im sorry.
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: The big glider project

Postby erik » Tue Feb 04, 2020 10:31 am

What I'm mostly wondering is whether all information is available to the shaders:
rotation point and rotation vector of the individual objects.

I've not messed with shaders that much myself.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: The big glider project

Postby Thorsten » Tue Feb 04, 2020 12:33 pm

What I'm mostly wondering is whether all information is available to the shaders:
rotation point and rotation vector of the individual objects.


No, it's not, because from the point of view of the shader it's all in the matrix stack, already multiplied and you can't undo that. You'd have to give the info of the animation parameters separately to the shader as uniforms (i.e. change the effect to pass more parameters).

Then you could do the required math, but I's not really fun.

As I said, it might be easier to not do the rotation as animation but inside the shader - that is in principle straightforward (and would require the same info - rotation origin, axis and angle).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The big glider project

Postby erik » Tue Feb 04, 2020 12:35 pm

Ok clear. Then I agree with you.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Re: The big glider project

Postby D-ECHO » Wed Feb 05, 2020 4:19 pm

I am trying to implement the rotation inside the shader. Can someone confirm that this formular (from wikipedia https://de.wikipedia.org/wiki/Drehmatrix (de)) needs to be implemented therefor or whether there is a simpler way?
Image
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 12 guests