Board index FlightGear Development Scenery

FGBlenderTools - FlightGear Development Tools (Blender)

Questions and discussion about enhancing and populating the FlightGear world.

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Fri Mar 27, 2020 4:52 pm

My AC3D Importer was abandon. We had enough different versions, so I joined with @Necolatis to collaborate on an official version.

I haven't tackled the importing + alignment of airport models yet. Some of the plumbing to support it is already in place, but not yet implemented.
xDraconian
 
Posts: 304
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Fri Mar 27, 2020 9:20 pm

Ok, thank you. Is there anything special to do to export a btg? I attempted deleting the material of AirportArea in order to make some "holes" for the airport. However I am not sure what happened - it appears that I silently failed as there was no visible output. When I tried overwriting the imported file there was no change either but again no error message. This was using the "save" button beside the "load" - I presume that is where exporting is, if not I did not see it elsewhere?
User avatar
legoboyvdlp
 
Posts: 7584
Joined: Sat Jul 26, 2014 1:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Fri Mar 27, 2020 10:43 pm

Just make sure you have one of the scenery layers selected. Otherwise, it has no idea what you are trying to save. It pulls the tile id out of the layer name and saves all layers with the same prefix, so don't get too creative with changing the layer names. Making this less ridgid is a future enhancement.
xDraconian
 
Posts: 304
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby www2 » Mon Mar 30, 2020 12:58 am

xDraconian thanks for the tool.
But I have a wish list and ideas for improvements
1. I like to see the directory and and xml file as an (sub-) collection.
Image

2. add an global setting for FGROOT path.

3. animation

4. export function
www2
 
Posts: 267
Joined: Thu Apr 16, 2009 1:58 pm
OS: Ubuntu

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby legoboyvdlp » Mon Mar 30, 2020 4:37 pm

My issue was I didn't realise it was saving to Blender folder - not trying to overwrite the .btg file!

It now works - and I was able to edit the .btg to fit a new airport into the tile pretty much exactly :)
User avatar
legoboyvdlp
 
Posts: 7584
Joined: Sat Jul 26, 2014 1:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Mon Mar 30, 2020 11:18 pm

@legoboyvdlp,
That's great to hear! Thanks for giving FGBlenderTools a try.

@www2,
All very good suggestions.
Subcollections - on my todo list.
FGRoot - If you have it set as an OS environment variable, then FGBlenderTools will pre-populate that field for you.
Animation - on my todo list, but not a focus anytime soon.
Export - BTG export was recently added. You can also convert BTG files into shapefiles. The one big thing not yet exportable is saving back the XML, however, you can save the modified AC3D models.

Some other ideas I want to implement:

Aircraft::
Aircraft Paint - One-click shader generation for fresh paint or weathered paint.
Panel Cutter - Draw where you want an access panel and the script will cut the hole/panel. e.g. Entry doors, Cowling Access Door, Fuel Caps, etc.
Cockpit Panel Layout - Click an asset and where you want it placed and the script handles the alignment.

Scenery::
Scenery Layout - Click an asset and where you want it placed.
Traffic Routes - Visualize and Edit
Shaders - Glass, Lights, etc.

No shortage of ideas - but a big shortage of time.
I'm happy to review pull requests if others wish to help me to expand the functionality of these Blender tools.
xDraconian
 
Posts: 304
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby www2 » Tue Mar 31, 2020 2:49 am

@xDraconian
Thanks there is already an add-ons for the Panel Cutter for this call Jmesh or at least is close to you idea
www2
 
Posts: 267
Joined: Thu Apr 16, 2009 1:58 pm
OS: Ubuntu

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby ctesc356 » Thu Apr 02, 2020 9:28 am

Hello,
some news...
The export of modified btg scene files works pretty well, with a few minor bugs. We'll come back to that later...

But I can't export airport files.
Even without modification the file is not exported, we get a file <icao>.btg.gz of ~40 bytes with the message:
Warning: Active object is required. Aborting.
output: /home/tt/.config/blender/2.82/terrain/LFIF.btg.gz
Info: BTG export time: 0.0006 seconds
Info: Export successful

There is one active object
Same for a grass airfield or an international airport.

I think I have the updated version of the script? :
git log
commit ef97930cfaa6217be6965c2bf7445cd5a057c538 (HEAD -> master, origin/master, origin/HEAD)
Author: Scott Giese <scttgs0@gmail.com>
Date: Mon Feb 17 21:34:41 2020 -0600
ctesc356
 
Posts: 55
Joined: Wed Aug 25, 2010 8:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Thu Apr 02, 2020 3:52 pm

Airport BTGs have not been implemented yet. Now that some folks have begun to use the tool, I will begin to work on airport file handling.
xDraconian
 
Posts: 304
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Hooray » Thu Apr 02, 2020 4:04 pm

It would be great if some of the screen shots posted here could be uploaded to the wiki so that they can be added to the FGBlenderTools wiki page at: http://wiki.flightgear.org/FGBlenderTools
While this is currently still a draft obviously, doing so will make it much easier to copy forum announcements over to the wiki page/newsletter and include corresponding screen shots.
Please also feel free to post a few youtube videos here, to illustrate how the tool looks/works - this will ensure that more people will get involved in testing and reporting issues/feature requests, and ultimately get involved in contributing to FlightGear scenery.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11738
Joined: Tue Mar 25, 2008 8:40 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby ctesc356 » Thu Apr 02, 2020 9:14 pm

xDraconian wrote in Thu Apr 02, 2020 3:52 pm:Airport BTGs have not been implemented yet. Now that some folks have begun to use the tool, I will begin to work on airport file handling.

Okay, thanks for the reply. I'll wait then.
ctesc356
 
Posts: 55
Joined: Wed Aug 25, 2010 8:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby ctesc356 » Wed Apr 08, 2020 9:08 am

Hello,
some findings on the import-export of btg files.

I took as an example the file "Terrain/e000n40/e006n46/3056179.btg.gz" from terrasync.

Import in Blender (v2.82) the original file is 1MB
We get:
Vertices: 40,562.
Faces: 79,478
with weird faces (< 2vertices?) Can we avoid those faces?
Image
image of a section of road.
Selection: 8/2,699 vertex, 11/5,929 edges, 12/5,396 faces.

Export in btg (without any modification), we obtain a file of 1.6MB
If we re-import that file:
Vertices: 135,597.
Faces: 44,199
the weird faces have disappeared, the remaining faces are independent, no common vertex between 2 adjacent faces. This can be remedied by a "vertex merge by distance", but I think the script could do it?
Image
Selection:15/9,666 vertex, 15/9,666 edges, 5/3,222 faces

This re-imported file cannot be exported again. No error message.
ctesc356
 
Posts: 55
Joined: Wed Aug 25, 2010 8:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Wed Apr 08, 2020 4:22 pm

I'm aware of those and share your desire to improve upon it.
At one point I was clean the model during import, but that slows down import a lot.
I've got some work in progress code to further improve the cleansing of the model on export.

Failing to export a re-imported model is a new issue report... I'll see if I can replicate it.
xDraconian
 
Posts: 304
Joined: Sun Jan 21, 2018 5:53 am
Version: Git
OS: Linux Mint

Previous

Return to Scenery

Who is online

Users browsing this forum: ludomotico and 2 guests