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 Necolatis » Tue Jul 14, 2015 5:23 pm

The script can now handle empty lines.
The UV mapping problems was due to the AC files using 'texoff' token which seems to be an undocumented feature of AC3D. The script can now handle that as well.

The updated script can be gotten here, as these changes are not yet merged into Majic79: https://github.com/NikolaiVChr/Blender-AC3D

I will wait 1 or more weeks to request a merge till, I am sure nothing has been broken. Haven't tested it with lots of use cases yet.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby japreja » Thu Jul 16, 2015 10:31 am

I will give it a try in a few days, I have been testing a few things by just importing any .ac file I see in FG's fgdata and Aircraft that have an animation. I am mainly looking for proper pivot/orientation points being set but this is also puting your scripts and updates into a good workout :)

I would like to make a .blend for each .ac file found in FG and make a new development version of fgdata for updating meshes of all .ac files. I started doing it with the current version but might have to start over with 3.6 so I put that on hold for a few weeks :/ I had a majority of Models/Airports/* done so I hope not much there has changed.
japreja
 
Posts: 334
Joined: Fri May 08, 2015 12:05 am
Location: MT, USA
OS: Windows 10 Pro 64bit

Re: Blender 2.6 AC3D Importer & Exporter

Postby abassign » Sun Sep 27, 2015 10:15 am

I have the Blender 2.76 program working on Linux Mint 17.2.
Everything worked fine, but today, I think after an upgrade of Blender, I no longer see the converter Blender-AC3D :(
I looked in the folder: "/ usr / lib / blender / scripts / addons", but could not find the folder "io_scene_ac3d". I tried reinstalling the folder and reactivate the procedures using the import / export option from Blender, but the program does not find anything.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Blender 2.6 AC3D Importer & Exporter

Postby pommesschranke » Sun Sep 27, 2015 12:57 pm

find the place where you did download the addon and then follow the instructions:

https://www.youtube.com/watch?v=NzuO4-O1RtQ

http://blender.stackexchange.com/questi ... g-an-addon
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Blender 2.6 AC3D Importer & Exporter

Postby japreja » Sun Sep 27, 2015 1:26 pm

After a recent pull of Blender-AC3D I am getting a bug in the texture output. I am seeing

Code: Select all
MATERIAL "DefaultWhite" rgb 1.0000 1.0000 1.0000  amb 0.2000 0.2000 0.2000  emis 0.0000 0.0000 0.0000  spec 0.5000 0.5000 0.5000  shi 10 trans 0.0000


as the first material in the exported .ac file which is making the exported model all white, as shown in the center of the following image

Image

In the exported .ac file I have to remove the "DefaultWhite" material line and set all "mat #" lines to be -1 of their current value in order to fix it. This is in Blender 2.75 and 2.76-rc1 with the current Blender-AC3D plugin and default settings of Blender. I should also note that this happens when Blenders default "Cube" is removed from the scene which had used the default white texture.

I've also tried to delete the default cube, save startup file, exit, and finaly restart blender but that does not seem to fix the problem either.

Any ideas why this is happening or how to get rid of this "DefaultWhite" material?
japreja
 
Posts: 334
Joined: Fri May 08, 2015 12:05 am
Location: MT, USA
OS: Windows 10 Pro 64bit

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Sep 27, 2015 3:36 pm

I have not tested 2.75 yet. Allow me some time to fix this.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Sep 27, 2015 4:09 pm

Okay, just did a simple test in 2.76RC2, it works fine for me. To fix this I am going to need a .blend file that fails, could you upload one for me? Prefer a simple one.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby japreja » Sun Sep 27, 2015 5:00 pm

OK, I will send a link to it through PM in a moment.
japreja
 
Posts: 334
Joined: Fri May 08, 2015 12:05 am
Location: MT, USA
OS: Windows 10 Pro 64bit

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Sep 27, 2015 5:41 pm

Okay, tested your blend file, and it works fine for me also in 2.76rc2.

Lets try to debug this. Firstly in the exported AC, do you have any lines saying "mat 0"? That's what it would say if it actually was referencing to the DefaultWhite material..

remove the "DefaultWhite" material line and set all "mat #" lines to be -1 of their current value


Doing that is the same as doing nothing. So will make no difference either way, unless your FG importer is bugged.
Also when looking at your picture it would look different if the problem was DefaultWhite, It would not be entirely white, it would be shades of grey.

Okay, I found the problem. It seems in this version of Blender the script will always export this in materials:

emis 1.0000 1.0000 1.0000

Which of course will make it glow white as in your picture. I will look into it, might take a couple of days. Until then, just edit the materials in your exported AC file, and set "emis 0.0 0.0 0.0".
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby japreja » Sun Sep 27, 2015 6:02 pm

I think I will install Blender-2.76-RC2. I've noticed some bugs in Blender 2.75 regarding the startup file and materials. It seems to be fixed in 2.76-rc2/rc1 so I may have to create the .blend over again from the original mesh in the 2.76 version.

Lets try to debug this. Firstly in the exported AC, do you have any lines saying "mat 0"? That's what it would say if it actually was referencing to the DefaultWhite material.


No they all are asking for the correct texture which unedited would start at "mat 1". Also, the "emis" sections of the "MATERIAL" lines I did have to change since all materials were exporting as 1.000. I think this may actually be a part of the bug I noted in blender-2.75 so I'll need a day or two to check this with a fresh install of 2.76-rc2 and recreating the mesh.

Okay, I found the problem. It seems in this version of Blender the script will always export this in materials:

emis 1.0000 1.0000 1.0000


This is what I thought to be a bug in your code but may not be, but rather the 2.75 version bugs in blender. I've noticed this in all Odd version numbers of Blender since 2.64. Even numbered releases seem to be without the bug.

EDIT: The issue seems to be blender and not the script, It is working fine in Blender 2.76rc2. Sorry for the confusion :oops: but it might be important that anyone using an odd version number of blender may have the same errors popup.
japreja
 
Posts: 334
Joined: Fri May 08, 2015 12:05 am
Location: MT, USA
OS: Windows 10 Pro 64bit

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Sep 27, 2015 9:41 pm

Okay I dug deeper into the problem and found the culprit.

In 2.74 the mirror colour is black per default. And since the default behavior of the script is to export mirror colour as emissive it wont emit.

Later versions of Blender have default white mirror colour, and that menas that it gets exported to full emissive.

I am not sure if I should fix this as it still works as advertized. You just have to make the mirror colour black, or uncheck "export mirror to emissive" when exporting. :)
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby abassign » Sun Sep 27, 2015 10:18 pm

I try with Blender 2.76rc2 to install io_scene_ac3d but where I put the folder in LInux Ubuntu ? I had already installed before the same folder and everything was ok, but the last update of Blender do not see the converter.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Sep 27, 2015 11:18 pm

I would think to put it somewhere like:

/home/$user/.blender/2.76/scripts/addons/
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Blender 2.6 AC3D Importer & Exporter

Postby abassign » Mon Sep 28, 2015 4:25 pm

Resolved :)

When I finally was described the path I tried to insert a folder ".blender", but nothing worked ... :( ... I discovered that in the current version of Blender, the 2.76 seems not to recognize automatically the traditional .blender, but you have to make it explicit in "Blender User Preferences" "File" by writing the exact path in the line "Scripts". For me this was not working. Inserted this line everything has returned ok.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sat Oct 10, 2015 1:00 pm

So do you guys think I should make "export mirror to emissive" unchecked per default since now in latest Blender the mirror is white which will make the AC fully emissive?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 10 guests