Board index FlightGear Development Effects and shaders

ALS traffic shader -artwork needed

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: ALS traffic shader -artwork needed

Postby vnts » Wed Mar 08, 2017 11:11 pm

Thorsten wrote in Wed Mar 08, 2017 12:22 pm:Also, greyscale image is fine, because the shader supplies color already (we could probably encode the glass areas in the alpha channel and pass it to the reflection map for added effect...)

Vehicles can have non-specular areas belonging to trailers/hoods/wheels/bumper/etc that stand out from metallic, window & light glassy surfaces. Perhaps tagging in a channel would work with those as well. Tagging 4 different sides might allow rough shading. Tagging for a secondary colour might be appropriate on big non-car vehicles - like stripes/markings (could be randomly turned off by setting to primary colour).
Thorsten wrote in Wed Mar 08, 2017 7:28 am:Also, at this point some input on what ought to be configurable where (runtime/design time/hard-coded/...) would be good.

Congestion / traffic could be seen to vary depending on weekday/week end/time of the year/festivals, or might be very low away from population centers. A runtime override to regional definitions might end up being used?

The small insignificant digits of the same random number used to determine vehicle presence in a domain could possibly be used, without correlation problems, to control the percentage of different types of vehicles on different types of road (e.g. more trucks on larger motorways). (Lack of roads on nightly builds, but from following the math/logic in road shader instead). Vehicle frequencies would vary from region to region.

I guess it could be done manually, but an option to automatically turn off when the illusion is completely broken might be convenient (at night time it probably matters less).

Not sure it's worth performance hit of having an extra branch, or is possible, but perhaps relaxing lighting at large distances so headlights flatly light the whole street at night might stop (possible?) flickering at low lod due to points being sampled, or simulate very small relatively bright sources being visible. From far away there would be bright points moving back and forth through each other.
Thorsten wrote in Wed Mar 08, 2017 2:23 pm:
it's the car's shadow that is the most obvious optical component when in the air.

That's a toughie, because the shadow might be outside the road polygons.

Perhaps (?) lack of shadow won't be noticeable if shadows were faded out as they get really long. Perhaps lack of shorter day time shadows on adjacent material won't be noticeable - because grass etc. reflects less and is less uniform (maybe cars closer to one edge can get away with not casting shadows at all). Then again, maybe there is just no way around it in current scenery format (until transition metadata is available).

The occluded space underneath cars stands out a bit from the road and shiny car at shallower angles, as well.

Perhaps a strip of the image at the boundary of the texture can be interpreted as relative height of the occluder that casts the shadow (e.g. lengthwise profile is 2x higher in the middle section of a car than at ends). It does create problem towards the back/front of the car at lower sun angles where the high midsection casts the shadow. Data in the other two channels could reference midsection height and ratio of depth of bonnet/boot to midsection height-boot height, or the midsection height could be read at an appropriate place for low sun angles. There probably isn't an easy solution.
CaptB wrote in Wed Mar 08, 2017 8:46 pm:Three versions so far, a city hatchback, pickup and a lorry.

Looked at SVGs on public domain clip art, but it seems you are modeling it in 3d, which is better as a heightmap could be extracted. Looks good.

Kind regards,
Posts: 44
Joined: Thu Apr 02, 2015 12:29 am


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest