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 Richard » Sun Oct 11, 2015 8:29 pm

Add it to the readme and make the change so that the AC3D exporter is compatible with previous behaviour; i.e. so that the mirror isn't emissive.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Mon Dec 21, 2015 11:22 am

The script at https://github.com/NikolaiVChr/Blender-AC3D has been updated to version 2.2.

Changelog:
----------------
Introduced an export option to control if should merge materials. It is disabled per default.
Texreps will now be exported as 1,1 to match the blenders way of doing UV.
Export/import mirror color as emissive is now off per default, due to latest blender versions use white as default.
Exporter will now remove any extra " chars in the material names.
Bumped to version 2.2

Any testing will be appreciated.
"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 » Sat Dec 26, 2015 2:11 pm

The script at https://github.com/NikolaiVChr/Blender-AC3D has been updated to version 2.3.

It did not reliable import models such as the ASK-13 that has different materials set on individual faces in the same object. Is fixed now.

Changelog:
----------------
Fixed that importer would have trouble when individual faces in same object would have different materials.
When importing the char " is now removed from material names.
When importing the texture blend type is now set to multiply instead of mix.
When exporting the coordinates are now rounded to 5 decimal places, due to blenders internal use of 32bit floats that is not reliable at 7 dec. places.
Bumped to version 2.3
"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 arb65912 » Sun Jan 03, 2016 9:04 pm

Excuse my ignorance but I would like to make sure I am using the proper exporter.

I understand that the original exporter by majic79 was taken over by Necolatis ( and others I assume) and the latest version is here https://github.com/NikolaiVChr/Blender-AC3D

Thank you.

Cheers, AJ
arb65912
 
Posts: 6
Joined: Fri Dec 12, 2014 1:39 am

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Jan 03, 2016 9:19 pm

Yes, the newest version is there. The majic79 version is 9 changes behind. I will request a merge once, I am 100% sure nothing was broken, in the latest version.

I recommend using the latest version from my github, and if you get any problems, just post them in this thread.
"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 arb65912 » Sun Jan 03, 2016 9:44 pm

Thank you very much Necolatis . I am happy to hear the confirmation. Great job! Cheers, AJ
arb65912
 
Posts: 6
Joined: Fri Dec 12, 2014 1:39 am

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sat May 14, 2016 7:09 am

The version of the script is now 2.6. It can as usual be gotten here: https://github.com/NikolaiVChr/Blender-AC3D

Changelog:
- Support of exporting packed textures.

Notice though, that if you repack them after exporting, Blender will delete the newly exported texture image file, so be sure to save it somewhere else, before you do that.
"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 » Sat May 14, 2016 1:46 pm

Some users have complained that the script will fail with a cryptic "AttributeError: 'NoneType' object has no attribute 'filepath'" exception if export was done, and some textures had no data.

Therefore in the latest version 2.8, the script will no longer fail, but issue warnings if that the case. If you move the mouse the warnings will go away, just pull down the top bar to see them, they are orange lines. Same kind of warnings will be given when importing and textures are not found (exporting such a model without fixing the textures will result in the aforementioned exporter warnings about missing data).

Full 2.8 changelog
Importer: Can now better handle different line types and also points (lines consisting of single vertex).
Exporter: Will now write the plugin version into the .ac file as world name.
Importer: Warning messages is now given when textures could not be found on disk.
Exporter: Warnings will now be given if textures has no data when attempting to save them, instead of halting the export with an exception.
Exporter: If a texture was modified inside Blender but not saved, for example with "Texture Paint", the modified texture is now being saved alongside the exported AC3D file, instead of the original unmodified texture.
"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 wlbragg » Sun May 22, 2016 6:47 pm

Thank you, thank you. thank you, for all the work on this script. It is greatly appreciated!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun May 22, 2016 7:42 pm

You are very welcome.

By the way here is the changelog for the last 2 version since 2.8:

2.9
Importer: Made sure the importer does not choke on object URLs. The url is not used in Blender though.
Importer: Added an option to restrict viewport visibility of objects if they are hidden in AC3D. (new feature in the AC3D format v7.5)

2.10
Exporter: Can now output standalone edges, bezier curves and other lines if enabled.
Exporter: Warning will now be given if texture status is "Can't be loaded". Typically this is when image is not present or not in the location Blender expects it to be.


Important notice: The last commit in the above list, might warn you, but sometimes, if you just go into the texture tab in Blender and view the missing texture, and that texture is located in the same folder as the Blender file you might have loaded it with, that sometimes is enough for Blender to locate it automatically. So as an example; if the Blender file has the texture path as //textures/red_orb.png but the image can be found at ./red_orb.png, Blender will sometimes automatically change it to //red_orb.png, doesn't work always though.
"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 kuifje09 » Wed Jun 29, 2016 1:41 pm

There was much to read about, but I still don't get how to do it.

I was used to do a UV-Mapping of one texture for several parts of an object. Not one texture per one object.

Is there a singel answer / page to how I map parts of a texture to the several sub-parts of an object. Like I did in blender 2.49...

Since the newer versions of blender ( 2.69 for me ) I never could make a good ac3d export from a textured object. And then I don't mean one object with 1 total texture.

The ac file has no jpg or png lines in it, while I perfectly mapped the parts of a texture.... No matter which exporter I use....
And I did already some exports to flightgear database as TNCB as example. I feel very sad I am stuck now for a very long time...
kuifje09
 
Posts: 596
Joined: Tue May 17, 2011 9:51 pm

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Wed Jun 29, 2016 5:50 pm

There is a limitation in AC3D: Maximum 1 texture per object. So if you are trying to put one texture on some faces and another on other faces in the same object, it wont ever work.

If you are trying the opposite, to let several objects share a texture, thats fairly straightforward, and all exporters support that.

If you are using the exporter I have been working on, then make sure the textures is attached to the materials, not only the UV editor. See here for how to do that: https://www.youtube.com/watch?v=URMjoFSm5pk , Its been a while since I made that video, but its principle should still apply.
"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 kuifje09 » Thu Jun 30, 2016 1:59 pm

Well I viewed once more and I think I do it right, for the new exporter, But it does not work.
I get some error while exporting, "Mesh object has no attribute faces", maybe all faces need some texture ?

Although I have some solution I used before. Exporting to some format and impoting it to the old blender 2.49.
Using the Wavefront format seems perfect for this, even the textures are in place.
Only one thing, maby because of Wine, I had to edit the import script. ( problem with the os var )
kuifje09
 
Posts: 596
Joined: Tue May 17, 2011 9:51 pm

Re: Blender 2.6 AC3D Importer & Exporter

Postby Necolatis » Sun Jul 03, 2016 1:14 am

Firstly, what did you have to edit in the script to get it to work on Wine?

Secondly, could you make a simple blender file and apply some textures to it, so that it will fail to export. And then send that file to me, and I will have a look at your problem.
"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 swampthing » Mon Jul 11, 2016 12:40 am

Thank you for sharing this tool.
www.opredflag.com
I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man. -Thomas Jefferson-
swampthing
 
Posts: 591
Joined: Wed Oct 28, 2015 5:10 am
Location: Missouri
Callsign: swamp
Version: 2018.2
OS: multiple

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 5 guests