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 ctesc356 » Sat Jul 11, 2020 9:16 am

Hello,
a concrete application...
VNLK, the famous airport of Lukla in Nepal.
With its 12% sloping runway, the generation in ws2 is unrealistic and ugly.
Image

We tried to improve the scene with an ac patch on the existing terrain.
https://github.com/FGMEMBERS-SCENERY?q= ... &language=
Image

The ability to enhance the 3d landscape that FGBlenderTools offers makes it possible to get something that comes close to reality.
Image

Playing a little with the regionalized textures makes it almost perfect.
Image

Ok, we are far from automatic generation, but for specific adaptations, which some sites deserve and on reduced perimeters, it is an interesting tool.

We lack the possibility to intervene on airports generated by genapts, it would be an alternative to WED which is very heavy and exclusively 2d.
xDraconian has promised to look into it... :wink:

A work in progress: the Alpe d'Huez Altiport (LFHU) with its 15% slope.
Image
ctesc356
 
Posts: 74
Joined: Wed Aug 25, 2010 9:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Sat Jul 11, 2020 5:19 pm

@ctesc356,

Those results look great!

I've got my computer in a bit of a mess right now. Installed a new OS and time is going into getting everything functional once more. Just yesterday I was able to compile the Blender dependencies, so I should have Blender operational soon.

Scott
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Thu Jul 23, 2020 1:34 am

I've begun to work on importing the airport BTG files while loading the tile terrain.

Work Items:
    Import tiles into separate collections - done
    Import the airport terrain while loading the terrain tile - In progress
    Support for loading multiple tiles and aligning them appropriately - not started
    Experiment with multiple Scenes - not started
    - Airport loaded with their associated objects to allow positioning
    - Main Scene containing terrain only
    - Airport Scene containing airport terrain and objects
    - Object Scene containing only a single object
Scott
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby ctesc356 » Wed Aug 05, 2020 10:21 am

Hello,
I wanted to test your work.

Under Mint 19.1, Blender 2.83.3 installed by downloading "blender-2.83.3-linux64.tar.xz" from "www.blender.org" I can't install "pyshp" and "pyproj".
If someone has a solution...

As to work with "fg_btg_io.py" these libs are not essential I did without.

To get a compliant situation, I installed Mint 20 and Blender 2.82 by the package manager.
"pyshp" and "pyproj" are installed.
But... mint 20 comes with python3.8 and apparently FgBlenderTools is not compatible?

What can I do about it?
ctesc356
 
Posts: 74
Joined: Wed Aug 25, 2010 9:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Fri Aug 07, 2020 5:53 am

@ctesc356,

It works with Python3.8 just fine.

Blender utilizes the Python installed within its installation folder. I assume you have a path similar to blender/2.83/python/bin.
Check to see if this python/bin folder contains pip or pip3.8.
install pyproj via:
Code: Select all
pip install -U pyproj

or
Code: Select all
python3 -m pip install -U pyproj

If you are missing pip then review the FGBlenderTools readme file. There are instructions for downloading pip.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby ctesc356 » Sat Aug 08, 2020 8:53 am

Hello,
thank you for your help. I finally managed to install "pyproj" and "pyshp" with the damn "pip".

To install in blender's python 3.7.4:
Code: Select all
./python3.7m -m pip install -U pyproj

./python3.7m -m pip install -U pyshp

into ".../2.83/python/bin."

The test:
Verify pyproj Installation within Blender
Open Blender's internal Python Console
import pyproj; pyproj.test()

doesn't work, but it's well installed in ".../2.83/python/lib/python3.7/site-packages".

PYTHON INTERACTIVE CONSOLE displays:
>>> import pyproj; pyproj.test()

Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: module 'pyproj' has no attribute 'test'
ctesc356
 
Posts: 74
Joined: Wed Aug 25, 2010 9:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby xDraconian » Sat Aug 08, 2020 9:12 am

That appears to a success. Don't worry about the pyproj.test() failing. They may have removed that within pyproj. As long as you are seeing the modules within site_packages it should work.
xDraconian
 
Posts: 406
Joined: Sun Jan 21, 2018 6:53 am
Version: Git
OS: Linux Mint

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby ctesc356 » Mon Aug 10, 2020 10:58 am

Hello,
Testing your improvements:
- when loading a "btg" the mesh does not turn to "global"position in blender
I uncommented the lines :
Code: Select all
# rotate bucket into viewing position
        if bucket_num != -1:           
            bl_obj.rotation_mode = 'ZYX'
            bl_obj.rotation_euler = rot_euler
.
of "fg_btg_io.py" and it does.

- The recording (SAVE btg) doesn't work. I added the following lines at the beginning from ""fg_btg_io.py":
Code: Select all
from .btg_bounding_sphere_chunk import bounding_sphere_chunk
from .btg_vertex_chunk import vertex_chunk
from .btg_normal_chunk import normal_chunk
from .btg_uv_chunk import uv_chunk
from .btg_property_chunk import property_chunk
from .btg_geometry_chunk import geometry_chunk

it seems to work.

If there's anything I can do to move forward, let me know.
ctesc356
 
Posts: 74
Joined: Wed Aug 25, 2010 9:20 am

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Alant » Tue Sep 29, 2020 7:53 pm

Did Zac´s problem get resolved? I am seeing the same on my Windows laptop with Blender2.83, but not with my desktop running Blender 2.82.
BTW blender 2.90.1 is out now. Dare I upgrade?
Alan

Edit:
P.S. I still have Blender 2.82 on my laptop, and it works OK with that.
Alan
Alant
 
Posts: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Alant » Tue Sep 29, 2020 11:20 pm

Furher tests.
Blender 2.9 has the problem that Zac reported.
Another problem with Blender 2.83 is that the textures are not loaded when the .blend file produced by FG dev tools is loaded. The model is grey.
The same -blend file (produced by Blender 2.82) loads correctly in Blender 2.81, Blender 2.82 and Blender 2.9.
I have been testing using the 707.ac file in fgaddon.
Alan
Alant
 
Posts: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Alant » Wed Sep 30, 2020 3:19 pm

I have not tested this hypothesis, but the problem may lay in the new versions of pyshp/pyproj, and not with the Blender version.
Alant
 
Posts: 1223
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Zdenal » Sun Apr 11, 2021 1:24 pm

Mageia 8/54, Blender2.83.
I installed FGBlenderTools_v0.4.1. The "3D View" addon is installed and enabled, the "Import / Export AC3D FG" addon reports an error:

File"/usr/share/blender/2.83./scripts/modules/addon_utils_py",line351 in enable mod=_import_(module_name)
File $home/username/.config/blender/2.83/scripts/addons/io_scene_flightgear_import/_init_py",line 25, in <module>
from bpy. types import Operator, INFO_MT_file_import, INFO_MT_export
ImportError: cannot import name 'INFO_MT_file_import' from 'bpy.types' (unknown location)

where am I making mistake?
tks
Zdenal
 
Posts: 13
Joined: Mon May 26, 2014 4:47 pm

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Zdenal » Sun Apr 11, 2021 1:26 pm

sorry,
Mageia 8/64, python 2.7.18
Z
Zdenal
 
Posts: 13
Joined: Mon May 26, 2014 4:47 pm

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Zdenal » Fri Apr 16, 2021 5:17 pm

I'm here again. I advanced the installation of FGBlenderTools. An error is reported when Blender starts :

File "/usr/share/blender/2.83/scripts/modules/addon_utils.py", line 351, in enable
mod = __import__(module_name)
File "/home/zdenda8/.config/blender/2.83/scripts/addons/io_scene_flightgear/__init__.py", line 63, in <module>
from . import fg_shapefile_io
File "/home/zdenda8/.config/blender/2.83/scripts/addons/io_scene_flightgear/fg_shapefile_io.py", line 35, in <module>
import shapefile


and FGBlenderTools are not available.

When I comment out line 35 in the fg_shapefile_io.py file: "import shapefile", FGBlenderTools are available, but only for .ac files. .btg files cannot be loaded.

Thank you for your help in finding the shapefile module
Zdenal
 
Posts: 13
Joined: Mon May 26, 2014 4:47 pm

Re: FGBlenderTools - FlightGear Development Tools (Blender)

Postby Zdenal » Fri Apr 16, 2021 6:03 pm

And again: after installing "pyshp" and marking the files to load (in Blender):

Info: STG import time: 0.0005 seconds
Error: /usr/share/games/flightgear/Scenery/Terrain/e000n40/e007n43/3072361.btg: Unsupported BTG version: 6
Info: BTG import time: 0.0010 seconds
Error: /usr/share/games/flightgear/Scenery/Terrain/e000n40/e007n43/3072361.btg: Unsupported BTG version: 6


Am I getting closer to my goal? :wink:
Zdenal
 
Posts: 13
Joined: Mon May 26, 2014 4:47 pm

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 9 guests