Board index FlightGear Development Effects and shaders

Rendering of "materials" (no texture assigned)

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

Rendering of "materials" (no texture assigned)

Postby jsb » Thu Dec 22, 2016 10:19 pm

Hi,

maybe not 100% the right place but hopefully competent readers here:
I created a simple model of a cockpit display with Blender 3D. It contains two objects sharing the same material definition (no texture involved at all, no UV mapping defined by me).
I would expect FG to render both objects in "similar" color/lightness, but computer says "no".
Image
To "fix" this issue, I merged both objects in Blender and re-export, but that's of course no solution.
Image
I checked the ac file manually (text editor), same material is used.
Any idea, what is going on here?
jsb
 
Posts: 207
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: Rendering of "materials" (no texture assigned)

Postby Necolatis » Thu Dec 22, 2016 10:35 pm

Is only 1 material assigned to each object?

Did you check the ac file that no texture were exported by mistake?

When you say you checked the ac file, you made sure all mat x referenced was to the same number?

Did you set 1 object to be smooth and the other not? That would produce different result, maybe is what you see?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1833
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.1.1
OS: Windows 10 Pro

Re: Rendering of "materials" (no texture assigned)

Postby jsb » Fri Dec 23, 2016 10:19 am

Code: Select all
AC3Db
MATERIAL "DefaultWhite" rgb 1.0000 1.0000 1.0000  amb 0.2000 0.2000 0.2000  emis 0.0000 0.0000 0.0000  spec 0.5000 0.5000 0.5000  shi 10 trans 0.0000
MATERIAL "Frame" rgb 0.2530 0.2722 0.3185  amb 1.0000 1.0000 1.0000  emis 0.0000 0.0000 0.0000  spec 0.2526 0.2526 0.2526  shi 50 trans 0.0000
MATERIAL "Black" rgb 0.0000 0.0000 0.0000  amb 1.0000 1.0000 1.0000  emis 0.0000 0.0000 0.0000  spec 0.0166 0.0166 0.0166  shi 50 trans 0.0000
MATERIAL "Screen" rgb 0.0100 0.0100 0.0100  amb 1.0000 1.0000 1.0000  emis 0.0000 0.0000 0.0000  spec 0.0166 0.0166 0.0166  shi 50 trans 0.0000
OBJECT world
...
mat 1
mat 2
mat 3


The frame around the screen area (which is rendered as it should) has two materials assigned mostly "mat 1", only a few faces towards the screen have "mat 2" which is black.
The handle however uses only one material (mat 1)
There is a third object, a rectangle with mat 3 and texture "black.png" for canvas placement - I guess we can ignore this?

I know, I can just merge the handle - problem gone - but I am curious what is going on and willing to learn ;-)

btw. are "materials" the way to go or is it recommended to create textures for /everything/, even if the texture could be just a plain color?
jsb
 
Posts: 207
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: Rendering of "materials" (no texture assigned)

Postby jsb » Fri Dec 23, 2016 10:33 am

I just moved the thing outside the aircraft so there is no shadow or something from the cockpit interfering - same strange behaviour...
jsb
 
Posts: 207
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: Rendering of "materials" (no texture assigned)

Postby Thorsten » Fri Dec 23, 2016 11:14 am

btw. are "materials" the way to go or is it recommended to create textures for /everything/, even if the texture could be just a plain color?


I'm aware of plenty of models which define a few materials in the header and then assign them to differently named objects and this is supposed to work (and always has in models known to me). So if you have two objects which look different, chances are they're either not using the same material despite what you think (the classic is editing the wrong file...), or one of them is later affected by a <material> animation or by an <effect> which makes them look differently (note that materials can be changed runtime via xml animations).

Note that since visual perception keys on monochromatic surfaces as unrealistic pretty efficiently, you should actually never leave surfaces untextured if you're aiming for realism (and the textures should always contain some small dirt or discoloration to work), but that doesn't free you from the need to define materials, because they will for instance regulate how glossy your surface looks or how deep shadows appear.
Thorsten
 
Posts: 9539
Joined: Mon Nov 02, 2009 8:33 am

Re: Rendering of "materials" (no texture assigned)

Postby jsb » Fri Dec 23, 2016 2:26 pm

Thanks! Evil little XML files... found an <effect> doing some lightmap stuff.
jsb
 
Posts: 207
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 4 guests