Board index FlightGear Development Aircraft

Glass, textures and material settings in Blender

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

Glass, textures and material settings in Blender

Postby wlbragg » Fri Mar 23, 2018 9:08 am

I have a problem with the sim crashing when I try to export an object that is representing glass.
The same object exports fine in one Blender file but crashes the sim when exported from another Blender file. As far as I know they are identical. In fact I appended the one that crashes the sim from the other Blender file.
It appears that the object crashes the sim if it has no texture assignment, yet the one that works has no texture assignment, they both only have a UVMap assigned.
Anyone have any idea what is going wrong here? Is there a correct way to do a transparency in Blender?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3954
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass, textures and material settings in Blender

Postby wlbragg » Fri Mar 23, 2018 4:59 pm

For the next dummy that comes along and does this, I figured this out.

I am such a dummy, I accidentally left the glass material joined with a another object using non-compatible settings, duuu!
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3954
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass, textures and material settings in Blender

Postby wlbragg » Fri Mar 23, 2018 5:42 pm

I spoke too soon, while that could have been the issue, It wasn't. I completely started from scratch and as soon as I try to import or assign an object with the settings we typically use for glass, it crashes the sim and I don't know why.

Anyone know of a tutorial for glass available on FG wiki. I briefly looked ad some general Blender glass effects on line but they all seemed to use raytrace but we appear to use z-transparency.

Also the online tutorial all look like they aren't assigning any uv-mapping or texture at all, that very thing is the catalyst for it crashing in the simulator from what I can tell.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3954
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass, textures and material settings in Blender

Postby Necolatis » Fri Mar 23, 2018 6:59 pm

The sim have no problems with faces without UV or texture.

However one of the Blender export scripts (Mr. No) cannot export properly if UV and texture is not assigned. It will just fail silently.

Just use Z-transparency.

Maybe if you paste your AC file here, and let us take a look?
"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: 1831
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.1.1
OS: Windows 10 Pro

Re: Glass, textures and material settings in Blender

Postby wlbragg » Sat Mar 24, 2018 7:31 am

one of the Blender export scripts (Mr. No) cannot export properly if UV and texture is not assigned. It will just fail silently.

Does that mean it doesn't export an .ac file or it is a broken .ac file? This very well could be Mr. No's export script. I had to go back to some old ac exporters awhile back to export something I was working on at the time. I'll have to check it out and make sure it isn't Mr. No's.

Compare landinglightcover in this .ac (works)
https://www.dropbox.com/s/5k1a83btrrc3bls/c172p.ac?dl=1

with landinglightcover_D in this .ac (doesn't work)
https://www.dropbox.com/s/ywgngirymde7m1h/c172p-damage.ac?dl=1

Now that I think about it both these use the same exporter and one works while the other doesn't, so it probably isn't Mr. No's.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3954
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass, textures and material settings in Blender

Postby Necolatis » Sat Mar 24, 2018 1:58 pm

I looked at landinglightcover_D, it has no errors as far as I could see.
..and the model loaded up fine for me in FG.

The error must be something else.

Image
"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: 1831
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.1.1
OS: Windows 10 Pro

Re: Glass, textures and material settings in Blender

Postby wlbragg » Sat Mar 24, 2018 4:32 pm

Hum, this is bizarre, it loads in my system also now. The only thing that changed was I had closed the Blender session out and had to start it back up to export this .ac for you. Now it just works. I can export the object in question and use it in the sim with no issues. I even duplicated it and used it for a different damage model and it still works.

So, I see your one of those who have the Midis touch, thank you for the magic! :lol:
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3954
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Glass, textures and material settings in Blender

Postby Necolatis » Sat Mar 24, 2018 6:00 pm

I think it goes for all exporter scripts that you have to not be in edit mode when you export. Maybe that was your issue?
"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: 1831
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.1.1
OS: Windows 10 Pro

Re: Glass, textures and material settings in Blender

Postby wkitty42 » Sat Mar 24, 2018 6:04 pm

wow... you'd think that something as critical as that would be handled automatically... sounds like a design flaw or oversight to me...
"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: 4286
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Glass, textures and material settings in Blender

Postby wlbragg » Sat Mar 24, 2018 8:48 pm

you have to not be in edit mode when you export.

I'm aware of this, it wasn't that.

What it may have been was confusion in Blenders internals. What originally caused the issue was joining two objects with different material and texture mappings together to allow me to align some verts using "snap cursor to select" then "snap selection to cursor". After which I separated the two joined objects back into two individual objects. But I forgot to reassign all the materials and they both had picked up the others setting as well as their own. I think even though I finally caught that and reassigned them individually, Blender may have still been confused.
What is interesting though is I did compare the broken landinglightcover_D object with a non-broken version in another .ac and they were identical. I was able to verified it was that object that was indeed causing the trouble, even though it appeared identical in settings to the one that worked.
Obviously there had to be something it was doing in that .ac that the sim didn't like and closing Blender and restarting it, then exporting again, appears to be what fixed this issue.

Thanks for taking a look anyway, I appreciate it.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 3954
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 8 guests