Board index FlightGear Development Aircraft

Douglas DC-3 C47 - Dual Control

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

Re: Douglas DC-3 C47 - Dual Control

Postby i4dnf » Mon Oct 03, 2011 8:31 pm

Unfortunately for the lightcones it doesn't work that way. Because of the stencil operation they multiply whatever colour you have in the lightcone with the object's colour, which happens to be very close to black at night because of the multiplication with ambient light. (Ambient light is set very low, it shouldn't be 0 anyway, and when you multiply with 0 anyone knows what happens) That's why their intensity is dependant on time of day too. And the target object's colour cannot be affected, the effect/shader only knows what happens on the current object.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Douglas DC-3 C47 - Dual Control

Postby Thorsten » Tue Oct 04, 2011 7:32 am

Because of the stencil operation they multiply whatever colour you have in the lightcone with the object's colour, which happens to be very close to black at night because of the multiplication with ambient light.


Well, as long as you have gl_LightSource around you can take its norm to determine the multiplier (the lightcone color) for the object color, and the net result should then be independent of ambient light, no?
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Douglas DC-3 C47 - Dual Control

Postby i4dnf » Tue Oct 04, 2011 9:09 am

Not quite. You have control over the source object (the lightcone), you can do whatever you want with it, but you have no direct control over the destination objects (runway, terrrain, buildings etc). You can do whatever you want with the lightcone itself, but in the end it will get multiplied with 0 at night.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Douglas DC-3 C47 - Dual Control

Postby Thorsten » Tue Oct 04, 2011 10:03 am

You can do whatever you want with the lightcone itself, but in the end it will get multiplied with 0 at night.


Agreed, if the terrain you want to illuminate has exactly (0,0,0) as color vector, then this doesn't work. If it's (0.00001, 0.000002, 0.00000008) then it does. But is it really zero? And if so, should it, or should we not rather make the core insert a small value at all times (stars, stray light, moon,...).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Douglas DC-3 C47 - Dual Control

Postby i4dnf » Tue Oct 04, 2011 10:38 am

It is very, very, very low. I've done some tests with a hardcoded value in a shader, and 0.005 ~ 0.01 as a lower limit would suffice, and would be more realistic than it currently is.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Douglas DC-3 C47 - Dual Control

Postby Thorsten » Tue Oct 04, 2011 10:55 am

Not sure if we are talking the same issue - it shouldn't matter if it's very small as long as its non-zero.

Suppose a pixel is blue in the texture, so it might be (0,0,0.9). We illuminate this with a very weak ambient light source of (0.001, 0.001, 0.001). This should probably transform the pixel to (0,0,0.0009) which is, for all practical purposes, black.

Now, if I create a secondary light source, i.e. my cone which is defined by (c1, c2, c4) where c1 = 1/ambient.r, c2 = 1/ambient.g, c3 = 1/ambient.b, i.e. (1000, 1000, 1000) - that's an intense white. That transforms my pixel to (0,0, 0.9), i.e. the pixel goes back to where it was unless it really was (0,0,0) and not (0,0,almost 0).

If I define the cone by a * (c1, c2, c3) then I can even dim the result by any factor a I want. Why wouldn't this work?
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Douglas DC-3 C47 - Dual Control

Postby i4dnf » Tue Oct 04, 2011 11:43 am

Because on the target object, let's say the runway, everything in gets clamped first to (0.0, 1.0), as per the default shader (or any other shader), before being multiplied with the ambient, and mixed with the fog to get the final colour.

Again, I repeat , you cannot control what happens on the target object from the lightcone shader. You can control that from the respective shader active on the target object, but that's just a bad thing(tm), hardcoding localy values that should be global and checked and dealt with in the core.

What you're talking about is a light, this however is not a light, it's a clever trick that used to work.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Douglas DC-3 C47 - Dual Control

Postby Thorsten » Tue Oct 04, 2011 12:32 pm

Again, I repeat , you cannot control what happens on the target object from the lightcone shader.(...)What you're talking about is a light, this however is not a light, it's a clever trick that used to work.


Apparently what you can do is 'multiply whatever colour you have in the lightcone with the object's colour'. Now if my lightcone has color (1000, 1000, 1000) (and this *must* accept values > 1 in order to see any enhancement at all), then my argument above applies.

It seems currently you can multiply the existing light with a constant, hard-coded value - which is why you get the daytime modulation of ambient light. The question is - can you multiply it with something else that is not a hard-coded number - a property, a run-time determined constant, ... if so, you can make that so such that the cone always shines with constant intensity. That's a mathematical truth (a multiplication group structure has an inverese element). I don't need to control the target object for that - I just choose a suitable color for the lightcone.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Douglas DC-3 C47 - Dual Control

Postby F-JJTH » Tue Oct 04, 2011 3:27 pm

Hi,

@El Fauta: I understand what you explain about the cone light ;) I think this is question of tast isn't it ? I have planned to create a GUI for DC-3, maybe I'll add your proposition to it. Thanks for your proposition ;)

Currently I work on the fuel system and hydraulic system.

Cheers,
Clément
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: Douglas DC-3 C47 - Dual Control

Postby Thorsten » Wed Oct 05, 2011 8:14 am

Let me just add that after test-flying the DC-3, I think you did really a great job with the model!
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Douglas DC-3 C47 - Dual Control

Postby F-JJTH » Fri Oct 28, 2011 12:11 am

Hi everybody,

I'm glad to tell you a new release of the Douglas DC-3 C47 !
In this new release :

- 2 new tutorials French / English (Presentation, Startup)
- hydraulic system (cowl flaps, flaps, landing gear, brake)
- wipers system
- Dual Control improvment (every switch can be controlled by pilot and copilot, )
- new livery (up to 34 liveries)
- new GUI for option (select texture quality, select interior variant, immatriculation, autostart, show yoke, show pilot...)
- new sound (under test, if you can help about sound your help is welcome !)
- interior texture improvment
- interior model improvment
- electrical system improvment
- fuel system
- realistic start procedure (select fuel tank, boost pump ON (fuel pressure increase), magneto BOTH, starter switch ON then OFF
- ... and many other little things ;)

Your suggestion are welcome ! I hope you like this work.
Download here : http://equipe-flightgear.forumactif.com ... -de-la-paf

In the TODOLIST :
- details selector
- landing light cone selector (El Fauta ;) )
- bug about cargo doors
- other tutorial
- autopilot improvment (currently we don't know exactly how it work)
- light indicator on panel (landing gear, oil pressure...)
- bug about landing gear and the new hydraulic system on Reset

Remember that you can fly with many people in this DC-3 C47 you can have 4 passenger (dc-3-psg1, dc-3-psg2, dc-3-psg3, dc-3-psg4) and 1 copilot (dc-3-copilot). The copilot can really help you in every sequence (start engine, landing gear manipulation, flaps manipulation, cowl flaps manipulation...)

In order to launch paratroopers you need to open the cargo doors then put ON the switch "Paratroopers signal" on the left of the overhead.

Image

Image

Image

Image


Cheers,
Clément
Last edited by F-JJTH on Sun Jan 15, 2012 6:31 pm, edited 1 time in total.
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: Douglas DC-3 C47 - Dual Control

Postby Marschi » Fri Oct 28, 2011 6:43 am

That looks absolutely fantastic! :shock:

Little time at the moment, but I'm looking forward to fly this beautiful airplane :)

Thank you!
User avatar
Marschi
 
Posts: 122
Joined: Wed Mar 30, 2011 12:10 pm
Location: EDWO
Callsign: D-BUK
OS: Win7

Re: Douglas DC-3 C47 - Dual Control

Postby durk » Mon Oct 31, 2011 1:22 pm

F-JJTH wrote in Fri Oct 28, 2011 12:11 am:- bug about landing gear and the new hydraulic system on Reset


Just a quick question: I've been having a few problems that caused to to use the reset function, and now the gear appears to be stuck in the downward position (even after restarting flightgear). Is there something I can do to fix this?

Other than that, this is a really well done aircraft, and I'm looking forward to many hours of demonstrating this at FSWeekend.

cheers,
Durk
durk
 
Posts: 354
Joined: Mon Nov 17, 2008 2:01 pm
Location: Ghent, Belgium
Callsign: PH-DRK
Version: git
OS: linux

Re: Douglas DC-3 C47 - Dual Control

Postby F-JJTH » Mon Oct 31, 2011 2:52 pm

Hi durk,

It's very stange, do you use g/G on your keyboard in order to handle the gear ?
Try to Reset 2 times.

Cheers,
Clément
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: Douglas DC-3 C47 - Dual Control

Postby durk » Mon Oct 31, 2011 3:13 pm

Hi Clément,

I'm using the gear up/down button on my joystick. I'll try to use the g/G later and see if that makes a difference. I'll report back later.

Cheers,
Durk
durk
 
Posts: 354
Joined: Mon Nov 17, 2008 2:01 pm
Location: Ghent, Belgium
Callsign: PH-DRK
Version: git
OS: linux

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: AndersG, erik and 4 guests