Board index FlightGear Development

W.I.P. Blender to flightgear

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: W.I.P. Blender to flightgear

Postby Gijs » Tue Jul 17, 2012 12:44 pm

Cool! I have zero experience with animations in Blender, but looking at this it's definitely worth learning!
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9447
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: W.I.P. Blender to flightgear

Postby Hooray » Tue Jul 17, 2012 6:46 pm

Yes, absolutely impressive - it would be great to see this effort combined with TheTom's code, so that we get a single Blender/FG plugin eventually!
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: 11925
Joined: Tue Mar 25, 2008 8:40 am

Re: W.I.P. Blender to flightgear

Postby run » Thu Jul 19, 2012 4:20 pm

Hooray wrote in Tue Jul 17, 2012 6:46 pm:it would be great to see this effort combined with TheTom's code, so that we get a single Blender/FG plugin eventually!




Yes I agree


run
 
Posts: 17
Joined: Fri Jul 06, 2012 2:03 pm

Re: W.I.P. Blender to flightgear

Postby F-JJTH » Fri Mar 08, 2013 7:13 pm

Proof of concept in 3 minutes :

User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: W.I.P. Blender to flightgear

Postby F-JYL » Sun Mar 17, 2013 7:22 pm

Great !!! :D
F-JYL
 
Posts: 54
Joined: Mon Mar 11, 2013 8:34 pm
Callsign: F-JYL
Version: git
OS: Ubuntu 13.10

Re: W.I.P. Blender to flightgear

Postby F-JJTH » Thu Aug 29, 2013 8:42 am

Hi,

Here is a tutorial in 2 parts, at the end of the second part you can see the result in FG

Part 1: Positioning armatures


Part 2: Animating armatures


Videos are in real time, it took less than 45min to animate all the blade, the rotor, the cyclic, etc etc with high precision (the precision provided by Blender) all of this without writting anything by hand in the XML animation. The only XML part you can see in these video is the gui dialog used at the end for the demo in FG.

Regards,
Clément
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: W.I.P. Blender to flightgear

Postby speedflighery » Tue Nov 12, 2013 7:57 pm

Hi I downloaded the fg2bleder script. I followed the video tutorials but I can't save the xml file. I get this eror
Code: Select all
Traceback (most recent call last):
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/ops/ops_xml.py", line 267, in invoke
    self.charge_xml( context, name_path, no )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/ops/ops_xml.py", line 213, in charge_xml
    xml_export.write_animation_all( context, node, filename, no )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/xml/xml_export.py", line 641, in write_animation_all
    append_path( node, nodePropertyList[0], filename, no )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/xml/xml_export.py", line 575, in append_path
    ac_file = "" + fg2bl.path.rel_from( obj.data.fg.ac_file, filename  )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/fg2bl.py", line 75, in rel_from
    rel_path = os.path.relpath( pathname, from_pathname )
  File "/usr/lib/python3.3/posixpath.py", line 456, in relpath
    raise ValueError("no path specified")
ValueError: no path specified

location: <unknown location>:-1

location: <unknown location>:-1

I'm using linux and blender 2.69.
speedflighery
 
Posts: 14
Joined: Thu Oct 31, 2013 9:17 am
Version: 2.12
OS: linux

Re: W.I.P. Blender to flightgear

Postby run » Wed Nov 13, 2013 3:16 pm

Hi all,

Reload the script .... there is some change

Do you use windows ??? I haven't made test
run
 
Posts: 17
Joined: Fri Jul 06, 2012 2:03 pm

Re: W.I.P. Blender to flightgear

Postby speedflighery » Wed Nov 13, 2013 3:40 pm

I reloaded the script and still got the same problem. I'm using linux
speedflighery
 
Posts: 14
Joined: Thu Oct 31, 2013 9:17 am
Version: 2.12
OS: linux

Re: W.I.P. Blender to flightgear

Postby run » Wed Nov 13, 2013 4:16 pm

I am sorry , but it's not the good version....

Code: Select all
 File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/xml/xml_export.py", line 575, in append_path
    ac_file = "" + fg2bl.path.rel_from( obj.data.fg.ac_file, filename  )


In the latest version this line appears in line 579 not 575. Before this line there is some test for validate export.
Clone the git deposit of this script :
https://gitorious.org/paf/fg2blender/so ... b68d6522f6:

or use command : git clone git@gitorious.org:paf/fg2blender.git
for cloning deposit
run
 
Posts: 17
Joined: Fri Jul 06, 2012 2:03 pm

Re: W.I.P. Blender to flightgear

Postby speedflighery » Wed Nov 13, 2013 4:28 pm

I uploaded it again and got this error

Code: Select all
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
fake_module: addon missing 'bl_info' gives bad performance!: '/home/gusti/.config/blender/2.69/scripts/addons/import_ac3d.py'
libpng warning: iCCP: known incorrect sRGB profile
read blend: /home/gusti/montaza/blender/panthera/anim_test.blend
Run script without debug info
Traceback (most recent call last):
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/props/props_armature.py", line 545, in update_xml_file
    self.creer_xml( xml_file, active_object )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/props/props_armature.py", line 498, in creer_xml
    if xml_file.name == filename:
AttributeError: 'str' object has no attribute 'name'
File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/props/props_armature.py", line 517, in update_xml_file
Traceback (most recent call last):
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/ops/ops_xml.py", line 267, in invoke
    self.charge_xml( context, name_path, no )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/ops/ops_xml.py", line 213, in charge_xml
    xml_export.write_animation_all( context, node, filename, no )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/xml/xml_export.py", line 645, in write_animation_all
    append_path( node, nodePropertyList[0], filename, no )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/xml/xml_export.py", line 579, in append_path
    ac_file = "" + fg2bl.path.rel_from( obj.data.fg.ac_file, filename  )
  File "/home/gusti/.config/blender/2.69/scripts/addons/io_fg2blender/fg2bl.py", line 75, in rel_from
    rel_path = os.path.relpath( pathname, from_pathname )
  File "/usr/lib/python3.3/posixpath.py", line 456, in relpath
    raise ValueError("no path specified")
ValueError: no path specified

location: <unknown location>:-1

location: <unknown location>:-1

I also checked and the line you mentioned above is on line 579
speedflighery
 
Posts: 14
Joined: Thu Oct 31, 2013 9:17 am
Version: 2.12
OS: linux

Re: W.I.P. Blender to flightgear

Postby run » Wed Nov 13, 2013 4:36 pm

The reason :

You have create a mesh.
You have create a armature,
After you made a link beetwen the bone and the mesh.

You assign a xml file for the armature, but there is no ac file assigned for your mesh.

Assign a ac file for the mesh and after the export is good.
run
 
Posts: 17
Joined: Fri Jul 06, 2012 2:03 pm

Re: W.I.P. Blender to flightgear

Postby run » Wed Nov 13, 2013 4:39 pm

I will write a popup message for this ....

Is it working , now ???
run
 
Posts: 17
Joined: Fri Jul 06, 2012 2:03 pm

Re: W.I.P. Blender to flightgear

Postby speedflighery » Wed Nov 13, 2013 8:31 pm

How do I assign the ac file for the mesh
speedflighery
 
Posts: 14
Joined: Thu Oct 31, 2013 9:17 am
Version: 2.12
OS: linux

Re: W.I.P. Blender to flightgear

Postby run » Wed Nov 13, 2013 10:45 pm

When you select your armature, you can assign the xml file

Image

For ac file ...
Select the objet (mesh) and assign the file.
If you save the blender file the ac filename was convert in relative path from the blender filename
Note : in this screenshot the "flightgear object" tab is first. May be in your blender this tabs is the last.
See blender configuration to change it.

Image
run
 
Posts: 17
Joined: Fri Jul 06, 2012 2:03 pm

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest