Board index FlightGear Development

Blender 2.6 AC3D Importer & Exporter

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: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Mon Mar 02, 2015 5:39 am

I have been using Linux SOs since 15 years but on this computer (shared) i can't install it.What do you suggest, is this only for Linux? I think that addon scripts written on python are multiplatform. Vive l'open source!!!
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby pommesschranke » Mon Mar 02, 2015 4:21 pm

did you use this plugin:

https://github.com/majic79/Blender-AC3D

please start from Terminal ("cmd")
and report the error message that you get
in the terminal and inside blender's console.
pommesschranke
 
Posts: 1105
Joined: Sat Apr 27, 2013 7:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Lubuntu 18.04

Re: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Mon Mar 02, 2015 7:44 pm

Hallo pommesschranke! Thankyou for the reply, i don't know how to start blender from the cmd but i've activated the blender console. I installed the plugin with User settings-->Addons-->.AC activated and after importing a basic AC model i become this:
Code: Select all
Read new prefs: C:\Users\Adrianet\AppData\Roaming\Blender Foundation\Blender\2.7
3\config\userpref.blend
found bundled python: C:\Program Files (x86)\Blender Foundation\Blender\2.73\pyt
hon
Importing quatre_columnes.ac
Traceback (most recent call last):
  File "C:\Users\Adrianet\AppData\Roaming\Blender Foundation\Blender\2.73\script
s\addons\io_scene_ac3d\import_ac3d.py", line 652, in read_ac_file
    if row[0] in self.tokens.keys():
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Catalanoic\AppData\Roaming\Blender Foundation\Blender\2.73\script
s\addons\io_scene_ac3d\__init__.py", line 166, in execute
    import_ac3d.ImportAC3D(self, context, **keywords)
  File "C:\Users\Catalanoic\AppData\Roaming\Blender Foundation\Blender\2.73\script
s\addons\io_scene_ac3d\import_ac3d.py", line 621, in __init__
    self.read_ac_file(ac_file)
  File "C:\Users\Catalanoic\AppData\Roaming\Blender Foundation\Blender\2.73\script
s\addons\io_scene_ac3d\import_ac3d.py", line 656, in read_ac_file
    except csv.Error(e):
NameError: name 'e' is not defined

location: <unknown location>:-1

location: <unknown location>:-1

I made a screenshot:
Image
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby pommesschranke » Mon Mar 02, 2015 8:02 pm

hm... looks familiar.
yes, there are a few models that the importer cannot handle.
I confirm your error with the "quatre_columnes.ac" file

try to import some other model!
e.g. that cube after you exported it or one of my models:
http://scenemodels.flightgear.org/author.php?id=128
pommesschranke
 
Posts: 1105
Joined: Sat Apr 27, 2013 7:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Lubuntu 18.04

Re: Blender 2.6 AC3D Importer & Exporter

Postby Catalanoic » Mon Mar 02, 2015 8:38 pm

pommesschranke wrote in Mon Mar 02, 2015 8:02 pm:hm... looks familiar.
yes, there are a few models that the importer cannot handle.
I confirm your error with the "quatre_columnes.ac" file

try to import some other model!
e.g. that cube after you exported it or one of my models:
http://scenemodels.flightgear.org/author.php?id=128

It worked fine with one of your churches. "quatre_columnes.ac" and all of my other objects are made with sketchup and i used the AC exporter plugin. The question is: What is wrong on these AC files (and correspondingly with the Sketchup AC exporter plugin) that prevents opening on blender?

Vielen Dank!
User avatar
Catalanoic
 
Posts: 1075
Joined: Mon Mar 05, 2012 12:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: Blender 2.6 AC3D Importer & Exporter

Postby helijah » Tue Mar 03, 2015 11:58 pm

Catalanoic wrote in Mon Mar 02, 2015 5:39 am:I have been using Linux SOs since 15 years but on this computer (shared) i can't install it.What do you suggest, is this only for Linux? I think that addon scripts written on python are multiplatform. Vive l'open source!!!


Hi

It was just a joke :)

And to answer your last post there exist some simple rules to follow :

The main one being that any 3D object MUST have defined UV Map. If there is no UV Map importer generates an error.

This can be considered an error, but personally I think that this forces designers to work properly. Ie create UV Map and textures for ALL objects instead of just using the "materials" Blender :)

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1109
Joined: Wed Dec 27, 2006 12:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: Blender 2.6 AC3D Importer & Exporter

Postby firefly » Wed Mar 04, 2015 3:43 am

What about objects that can't be UV mapped? like an empty or a object without a mesh. Cain and I have been having problems exporting the ME 323 (from the official download page). Could someone else try importing and exporting it?


The 323 has some empties in it, I think they have something to do with the animations, but I can export when I move them to another layer.
User avatar
firefly
 
Posts: 86
Joined: Thu Jul 24, 2014 2:15 am
Callsign: Firefly
Version: 3+
OS: Windows 10 (it's OK)

Re: Blender 2.6 AC3D Importer & Exporter

Postby wkitty42 » Fri Mar 13, 2015 10:18 pm

i've just installed Blender 2.69.0 on my kubuntu system and following the given instructions on github, i can't get these script installed into it... i don't have a ~/.blender directory... i thought that if i manually created one with the subdirectories in it as described in the instructions that it would work but no... then i saw the "Install from file" option in blender's Addons tab in user preferences and that didn't work selecting any of the .py files in this kit...

anyone got any ideas on how to do this?
"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: 6825
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Blender 2.6 AC3D Importer & Exporter

Postby sanhozay » Fri Mar 13, 2015 10:24 pm

I ran into the same problem recently. The instructions in this thread are out of date, although correct in the manual:

http://wiki.blender.org/index.php/Doc:2 ... on/Add-Ons

In short, the directory containing the scripts goes into $HOME/.config/blender/2.69/scripts/addons/. If you refresh the user preferences dialog, you should see the AC3D import.
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 11:57 am
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Blender 2.6 AC3D Importer & Exporter

Postby wkitty42 » Sat Mar 14, 2015 12:23 am

yes! thank you very much! i had followed those in the thread and those on the github site in the readme right on the front page... now to try to figure out how to goof things up with blender :lol:
"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: 6825
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun May 31, 2015 4:59 pm

I have fixed some bugs and shortcoming of the Majic79 script, I have made a merge request, but until/if it gets accepted you can try out my changes here:

https://github.com/NikolaiVChr/Blender-AC3D

Changelog:
Nodes that contain children, but has no own mesh now also gets exported to preserve node structure (supplied by kroki not me)
Importer now supports ngons: faces with more than 4 vertices. (I tesselate them before importing, UV map preserved)
Shininess is now handled properly. It is now mapped to Blender hardness (1-511 [Blender] from 0-128 [AC3D]).
Imported materials will be Phong per default now, which should match Flightgears fixed pipeline shading more closely. (minor thing)
Fixed a major bug that made imported UV map not set properly to texture. (now set to default 'UVMap')
Crease angle is now also supported when exporting, not only when importing. (so be mindful of your smoothing/auto-smooth settings in Blender)

Tested in Blender 2.69 and 2.74.

Hope some will find this useful, feedback will be appreciated. :)


A quick note if you are used to Mr. No's script and wanna try this out:
- This uses the real Blender texture assignments, not what's shown in the UV editor.
- To see your object textured in blender, make blender render using GLSL. That will also make transparent meshes be rendered transparent.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2113
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby DFaber » Mon Jun 01, 2015 7:53 pm

Necolatis wrote in Sun May 31, 2015 4:59 pm:I have fixed some bugs and shortcoming of the Majic79 script, I have made a merge request, but until/if it gets accepted you can try out my changes here:

https://github.com/NikolaiVChr/Blender-AC3D


Thanks for looking into this.

Necolatis wrote in Sun May 31, 2015 4:59 pm:- This uses the real Blender texture assignments, not what's shown in the UV editor.
- To see your object textured in blender, make blender render using GLSL. That will also make transparent meshes be rendered transparent.


I tried a textured export and got an untextured mesh. How do I have to set up my Materials now? The 2.4 Script didn't bother about materials, so a lot of Aircraft Designers will have a bunch of models that need to be modified. What is the best Strategy for that? I guess one needs to set up a Material per texture file.

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

my 3D-Art:
https://www.sol2500.net
DFaber
 
Posts: 706
Joined: Fri Dec 01, 2006 7:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Mon Jun 01, 2015 8:51 pm

I will make a little tutorial for doing that. Should be done before tomorrow.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2113
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Tue Jun 02, 2015 4:40 am

Here is how to setup your texture if you use my modified Majic79 script (or the original).

https://www.youtube.com/watch?v=URMjoFSm5pk
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2113
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby TheTom » Tue Jun 02, 2015 10:05 am

Necolatis wrote in Sun May 31, 2015 4:59 pm:I have fixed some bugs and shortcoming of the Majic79 script, I have made a merge request, but until/if it gets accepted you can try out my changes here:


Looking good. Merged. Thanks!
TheTom
 
Posts: 322
Joined: Sun Oct 09, 2011 10:20 am

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest