c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
79 stars 44 forks source link

Yoke is missing PPT cord #1098

Closed legoboyvdlp closed 6 years ago

legoboyvdlp commented 6 years ago

There is a noticeable is the telephone cable type thing under the yoke:

image

Probably connects to the PTT button?

gilbertohasnofb commented 6 years ago

The yoke cable is only present on the pilot side on the model P as far as I can tell:

aag

The issue is that will be extremely difficult to model since the cable extends and contracts with movement. I am not sure we are capable of doing that at the moment, and the pain/gain ratio do not look too promising IMO.

legoboyvdlp commented 6 years ago

Thank you for your comment (and the reference images).

As for the cable, I agree that it would be very difficult so definitely we don't need it. However, for future reference, Thorsten's / wlbragg's flexible rope code could maybe be adapted - however, not a priority.

gilbertohasnofb commented 6 years ago

About the cable: it is indeed for the Press-To-Talk button. Some examples of the model P do have them on both yokes, though most seem to have only on the pilot side.

@wlbragg if you ever feel like doing this, here is a possible solution for the cable:

But even this would be difficult to do properly, as the yoke metal bit 'enters' the cockpit.

Notice that we would also need to include the PPT button:

Scrap that above, see this:

In the Cessna 172, the PTT button is located on the back of the yoke, where it is pushed by the first finger, trigger style. In some planes, there's an autopilot disconnect button, and that goes on top of the yoke, to be pushed with the thumb.

gilbertohasnofb commented 6 years ago

@legoboyvdlp I am not too happy with too many unrelated things in a single issue. For instance, if I fix the pocket on the right bottom via texture work, this issue cannot be closed. So If you don't mind, I will edit it and make it only for the yoke cable and I will open new ones for the lighter and for the pocket. Is that all right with you?

legoboyvdlp commented 6 years ago

Sure. That's fine.

gilbertohasnofb commented 6 years ago

Cool. See https://github.com/c172p-team/c172p-detailed/issues/1099 and https://github.com/c172p-team/c172p-detailed/issues/1100

onox commented 6 years ago

@wlbragg Can we make the PPT cord movement dynamic by re-using the code written for that orange cargo helicopter? Just with fewer parts.

wlbragg commented 6 years ago

Can we make the PPT cord movement dynamic by re-using the code written for that orange cargo helicopter?

You probably could, but I don't think it worth the pain or the overhead. Those ropes are segmented. I think the aircrane's is 30+ segments. Then the math behind it to do what you want.

Yesterday I tried making a 5 segment cord (similar to the mike cord) and used the mike cord texture to test the look. I had it sag slightly in the middle and narrowed the plug end that would plug into the panel. I assume it plugs into the panel? I think with a decent x and y rotation centered at the panel plug location you could match the yoke rotation close enough. The problem was the forward and back motion of the yoke. Either we use ??? to stretch the cord (same way we do the tie-downs or the original rescue helo rope, or I remove the tapered end and translate the rope end closest the panel into the panel which you can't see anyway. That would require a bit of x/y rotation on that end to match the elevation and lateral movement of the sag when it moved in and out, that might look cheep and funky. Any comments or suggestions?

wlbragg commented 6 years ago

FYI: you really cant see the cord in front of the pilot from the plots perspective.

yoke2

yoke1

gilbertohasnofb commented 6 years ago

Yesterday I tried making a 5 segment cord (similar to the mike cord) and used the mike cord texture to test the look. I had it sag slightly in the middle and narrowed the plug end that would plug into the panel. I assume it plugs into the panel?

That doesn't look bad at all! Do use the mike texture for now and later we can duplicate it if we stick with your solution. And yes, it plugs into the panel, perhaps a tiny bit higher than where you put it from what I can see in the photos posted before.

I think with a decent x and y rotation centered at the panel plug location you could match the yoke rotation close enough.

Great!

The problem was the forward and back motion of the yoke. Either we use ??? to stretch the cord (same way we do the tie-downs or the original rescue helo rope, or I remove the tapered end and translate the rope end closest the panel into the panel which you can't see anyway. That would require a bit of x/y rotation on that end to match the elevation and lateral movement of the sag when it moved in and out, that might look cheep and funky. Any comments or suggestions?

I don't have an opinion in what option to try, please try whatever you feel will work better without too much pain. I completely agree with you that this isn't visible from the default angle (just the copilot's one, but barely) so we don't need to go overboard simulating a super precise string. I think you are excellent at judging the pain/gain ratio and coming up with very satisfactory solutions :smiley:

onox commented 6 years ago

You probably could, but I don't think it worth the pain or the overhead. Those ropes are segmented. I think the aircrane's is 30+ segments. Then the math behind it to do what you want.

Yesterday I tried making a 5 segment cord

If it's only 5 segments, the amount of computation needed to simulate it should be limited?

wlbragg commented 6 years ago

5 segments version was for a more simple rotate and translate animation. To do it justice and make it look really cool I think I would do a segment per coil or something close to that. You could potentially get some stretch out of it that way as well. But the math logic to manipulate the segments would be the difficult part, at least for me.

wlbragg commented 6 years ago

@gilbertohasnofb OK, I think this is done except for a new or better texture for the new cord. The new texture needs to be added to c172p/Models/Interior/Yoke/yoke.png It needs to be approximately the same size and shape as... yokecord

The rotation and scaling is not perfect, but due to it being mostly hidden from view, I think it'll be good enough. Please review and let me know what you think and if there needs to be anything else added. I wasn't sure about the plug-in portion on the panel, If we can find a lose up of it I could possible model it better.

gilbertohasnofb commented 6 years ago

@wlbragg Looks really good, this is such a clever solution. I pushed the new texture.

gilbertohasnofb commented 6 years ago

@wlbragg Just want to say once again how fantastic your solution is. I thought this issue would be nearly impossible to solve easily and it is looking so good. Even the compression of the texture looks natural given that we are modelling a cord like this. Bravo!

gilbertohasnofb commented 6 years ago

@wlbragg small bug: the cord is not being hidden when the yoke is hidden

wlbragg commented 6 years ago

@gilbertohasnofb done.

Thanks, this turned out to be a really easy solution.

gilbertohasnofb commented 6 years ago

@wlbragg What do you think if we would remove the shadow effect from the yoke's PPT cord and from the yoke cylinder (the main bar connecting the yoke to the cockpit)? Sometimes they go 'randomly' darker and that doesn't look too good, and I suspect that's the shadow effect getting crazy on rotating and moving objects.

wlbragg commented 6 years ago

@gilbertohasnofb done.

gilbertohasnofb commented 6 years ago

Perfect, much better!