Closed onox closed 8 years ago
Is this possibly related to #13 or not at all?
This is about the large windshield and the glass in the doors. I just noticed there is already a "glas" object. ("glas_interior" and "glas_interior_sides" are for the interior).
And now I notice Models/Effects/glass.eff
does already exist! :open_mouth:
@wlbragg It seems object "glas", "leftwindow", and "rightwindow" have a Effects/interior/c172p-interior-glass-shadow
effect applied to them. What does this do? If I remove that effect and try to apply Effects/glass
to them, I'm not getting any reflection at all. Are the normals pointing outward?
rightwindow.. have a Effects/interior/c172p-interior-glass-shadow effect applied to them. What does this do?
interior-glass-shadow applies the cubemap shadow to glas leftwindow rightwindow.
interior-glass-reflection-front applies the cubemap reflection to glas_interior.
interior-glass-reflection-side applies the cubemap reflection to leftwindow_interior rightwindow_interior glas_interior_sides
glas_interior and glas are duplicate, offset, front windows (only one effect per window) same with leftwindow, rightwindow and glas_interior_sides leftwindow_interior rightwindow_interior
interior rain visual is applied through reflection effect (I think).
outside rain effect and sky reflection is already applied through bumpspec "Effects/model-combined-deferred"
Did it get broke along the way?
No I mean this:
Look at the rainbow reflection on the canopy. That should be handled by , but when I tried to apply it to the "glas" object, I didn't see the cool reflection.Models/Effects/glass.eff
in our repository
Is this cube map shadow thing an ALS effect to be seen from inside the cockpit or from external views?
outside rain effect and sky reflection is already applied through bumpspec "Effects/model-combined-deferred"
Transparent objects need to use Effects/model-combined-transparent
(which is used by not Models/Effects/glass.eff
)Effects/model-combined-deferred
as far as I know.
glas_interior and glas are duplicate, offset, front windows (only one effect per window)
You say they are duplicate, but shouldn't the normals be opposite? Normals pointing inwards for "glas_interior" and outward for "glas".
Everything I posted except bumpspec is all internal.
Internal shadows and internal reflection and rain drops. OK, rainbow, yes I am familiar with it. Give me a second to look at it and see what I know about it.
I just noticed this
Any surface using the glass effect will automatically register itself as transparent for use in Rembrandt.
I don't know much about all these ALS effects, but to me it looks like you need an "interior" glass that uses Effects/glass
for fancy windshield rain/fog effects + another "interior" glass that uses Effects/model-interior
for cockpit shadow + an "exterior" glass that uses Effects/model-combined-transparent
for shiny rainbow canopy effect?
I have read on the wiki about needing two glass objects (1x "interior" and 1x "exterior"), but now it seems we need 2x "interior" + 1x "exterior" :confused:
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.
Appears so.
I'm familiar with a lot of it but there is "A LOT OF IT"!
I'll ask Thorsten if he can check whether we're using all those ALS effects correctly.
This is the bumpspec http://wiki.flightgear.org/index.php?title=Howto:Aircraft_reflection_shader&redirect=no
Do you know where the docs for rainbow are?
Probably here: http://wiki.flightgear.org/ALS_technical_notes
I thought it was there too but don't see it.
I've send a PM to Thorsten, hopefully he can tell if we're doing anything wrong.
Here is the forum thread showing it being used and the threads leading up to it. http://forum.flightgear.org/viewtopic.php?f=47&t=25456&start=75#p235963
http://forum.flightgear.org/viewtopic.php?f=47&t=25456&start=90#p236002 Is this what you tried?
This is similar to bumpspec.eff, I didn't add the bumpspec.eff that already existed and that is where I got deferred instead of transparent.
It could be that the interior effect (for shading) can be applied to the "glas_interior" object (which has normals pointing inward AFAIK) and then we flip the normals of "glas" (that's the outer glass object) and apply the shiny rainbow reflection effect to it :smile:
But Thorsten needs to answer this because I'm guessing here.
No glas is for shadows, can't use it. We have to have two layers for internal effects.
I just switched the bumpspec to inherit transparent instead of deferred and it still looks to be applying the bumpspec and external reflections correctly. Still lots to look at though. I need to check external rain, etc. and do some image comparisons.
Yes, I am sure Thorsten can answer this in a few seconds.
bumpspec to inherit transparent instead of deferred and it still looks to be applying the bumpspec and external reflections correctly
This is all fuselage objects, not glass. Why use one over the other? If we can use transparent to fuselage objects, why not just add glass to it. My next test.
I have a feeling we are going to need another layer for external effects.
onox, you still there?
Try adding the object glas to line 291 in Models/c172p.xml ...
is that what your looking for?
@wlbragg No, that's the Effects/model-interior
effect. I want "glas" to have the Models/Effects/glass.eff
effect. But when I tried it, it didn't work.
I have a feeling we are going to need another layer for external effects.
That's what I'm confused about as well. Do we need 1x external glass + 2x internal glass or 1x external (shiny rainbow reflection) + 1x internal (interior + rain/fog effects)?
And now I'm going to watch TV!
brain fart!
No, that is model-transparent and it inherits from model-transparent.
glass.eff inherits from model-combined-transparent
Try it and look at the glass reflection on the outside, I think that is what your looking for and as far as I can tell it isn't breaking anything but I am not sure were suppose to be able to apply two different effects to the same glass unless it is because it is two sided?
There is a file in Models/Effects/ called glass.eff, I am not sure where or when that file got put there. It may have been by me, but I think it is not being used by anything Unless that is what the code block defining the following starting at line 374 is using. landinglightcover landinglightcoverLD landinglightcoverRD landinglightcoverBD landinglightcoverCollapse.
I am pretty sure the internal glass reflections inherit directly from fgdata/effects/glass and it is possible so can the above.
This is what Thorsten said in a PM (I think he would have no problem with this post being public):
Glass should always be single-sided surfaces anyway to avoid trouble (or so Emilian says).
So you have one glass layer from outside, one from inside.
The outside layer for the rainbow should use model-combined-deferred.eff (because that does fogging and all the stuff you see from outside), the inside layer should use glass.eff (because that does the forward light scattering effects which you can only see from inside).
wlbragg is using model-interior.eff in addition to get the impression of a shadow falling onto the interior glass - something that I had not intended at all, but which looks neat nevertheless. You don't need that though. Eventually, I might also add the support for the interior shadow to the glass effect.
So if we decide to not have shadow falling onto the interior glass, we should flip the normals of "glass", "leftwindow", and "rightwindow". And then on lines 353 of Models/c172p.xml
use Effects/glass
?
I tried to do it myself and export to c172p.ac
file, but the whole model became ugly and appeared with the wrong cockpit livery, so better drop this issue if you don't consider yourself a Blender guru :smile:
Maybe this will help a little.
There are other things attached to each of these effects.
I noticed with the Cessna 172P detailed that the glass dosen't really show.
from http://forum.flightgear.org/viewtopic.php?f=4&t=25157&start=2055#p247971
onox, please try my suggestion above
Try adding the object glas, leftwindow and rightwindow to code block around line 291 in Models/c172p.xml
<!-- Transparent Surfaces for Rembrandt rendering -->
and let me know what you think. I don't think this includes the rainbow effect but it does appear to correct this users observation and I don't think there is a negative effect in doing this, (I have to verify this). It may be that we want the full glass effect with rainbow and the likes as you pointed out. But for now I am really curious what you think about this effect on the glass.
If I do that I don't see any difference.
Mine does, it looks like it puts some kind of reflection or noise on it. It is subtle and I can only see it at an angle.
In Rembrandt? To be honest I only checked for differences under ALS.
No, in ALS.
The outside layer for the rainbow should use model-combined-deferred.eff (because that does fogging and all the stuff you see from outside), the inside layer should use glass.eff (because that does the forward light scattering effects which you can only see from inside).
Your post from Thorsten. Remember we just switched deferred to transparent. I'm going to keep at this until we get it.
On the wiki it recommends model-combined-transparent
:
The recommended effect for glass surfaces seen from outside is model-combined-transparent.eff.
@onox, I really think we have this as good as it can be with the shape of our glass. I studied several aircraft that look good and have tried the settings they used (all slightly different). I made some more adjustments and I think this is done. See #521
It's mainly the lack of reflection on the front window I'm concerned about. See for the V-22 for example:
Perhaps we should ask Thorsten on the mailing list to test our aircraft and tell us if we're asking ALS to do the impossible or whether we made some stupid mistake.
Duplicate the glass and give it a very small distance from the interior glass, so that there is no z-fighting. Add an effect based on
Effects/model-combined-transparent
.Tune the parameters to get something like: http://tigert.1g.fi/kuvat/MIK/2006-07-30-parnu/_DSC2655.jpg