Board index FlightGear Development Aircraft

Simple Glass example

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

Simple Glass example

Postby jam007 » Sat Dec 30, 2017 4:39 pm

Saw that Draken canopy looks like a mirror from outside. I used
Code: Select all
 <effect>
   <inherits-from>Effects/model-combined-transparent</inherits-from>
     <object-name>draken_canopy_glass01</object-name>
     <object-name>draken_canopy_glass02</object-name>
 </effect>

For the glass effect.

How do I get a transparent glass?

I have tried looking at some aircraft files but they have complicated glass with effects that I do not understand. What is the most basic settings I need?
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Simple Glass example

Postby wkitty42 » Sat Dec 30, 2017 4:58 pm

i don't know all the details but much glass is actually two items... one for the inside and one for the outside... this is so different effects can be applied to them... for example, the rain effect on the outside and fog/frost on the inside... i do know that the normals of each glass are reversed from each other but i'm not sure if the outside glass' normal is inside or out... i also think i understand that a two faced glass doesn't work very well...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Simple Glass example

Postby jam007 » Sat Dec 30, 2017 5:04 pm

Yes. I have two objects for both glass parts. One inside and one outside. The normals should be correct. It is the view from outside that are strange with the glass looking like a mirror.
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Simple Glass example

Postby Thorsten » Sat Dec 30, 2017 8:14 pm

Actually, if you don't want to configure anything, model-transparent.eff and a material/texture with alpha channel is what you want to create a transparent surface.

model-combined-transparent.eff needs to be tuned with additional parameters for best effect, and glass.eff is only if you really want to go into scattering details.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Simple Glass example

Postby jam007 » Sat Dec 30, 2017 8:57 pm

Thorsten wrote in Sat Dec 30, 2017 8:14 pm:Actually, if you don't want to configure anything, model-transparent.eff and a material/texture with alpha channel is what you want to create a transparent surface.

So model-transparent not model-combined-transparent. Is that correct?
The material of the outer glass is 0.875 transparent.
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Simple Glass example

Postby Thorsten » Sat Dec 30, 2017 9:15 pm

The material of the outer glass is 0.875 transparent.


That's near fully opaque, not really what glass is like.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Simple Glass example

Postby jam007 » Sat Dec 30, 2017 10:22 pm

Thorsten wrote in Sat Dec 30, 2017 9:15 pm:
The material of the outer glass is 0.875 transparent.


That's near fully opaque, not really what glass is like.

Not in Blender. (Thats 87.5%)
The inner glass is the same and the glass in the sight-plane is less transparent. They both look ok in different settings for rendering quality.
The problem I found is that from the outside the glass looks mirror like in any Shader effects setting above 0. At 0 it is ok, transparent and just visible.
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Simple Glass example

Postby jam007 » Fri Jan 05, 2018 6:45 pm

model-transparent did the trick. Thanks
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 22 guests