Board index FlightGear Development Aircraft

Error trying to export .ac model in blender

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Error trying to export .ac model in blender

Postby dutchguy » Sat Jan 16, 2016 9:37 pm

Hello all,

As some may know I'm adding interior shadows to the 777, and to do this I have to remove the offsets of submodels in order for the effect to work. This obviously requires me to manipulate the .ac models, which I'm doing in blender, with the plugin available through this forum. This works fine for most .ac files, but for some (2 so far), I get the following error message when trying to export the modified model:
Image
Does anyone know how to fix this?

Thanks in advance!
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby dg-505 » Sat Jan 16, 2016 9:40 pm

A mile of road will take you a mile, but a mile of runway will take you everywhere.

DHC-6 Twin Otter development
User avatar
dg-505
 
Posts: 677
Joined: Mon Jun 02, 2014 3:36 pm
Location: Bonn, Germany
Callsign: dg-505
Version: next
OS: Ubuntu 20.04.4 LTS

Re: Error trying to export .ac model in blender

Postby dutchguy » Sat Jan 16, 2016 9:58 pm

Thanks for the quick reply. I just tried your suggestion, but it doesn't work. I get the same error.
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby ludomotico » Sat Jan 16, 2016 10:09 pm

You have not defined the path to the texture image in the texture tab.

You have probably loaded an image in the UV editor. This is not enough: the .ac exporter looks for the texture image in the texture tab, not the UV editor. These are the options you must set:

Image
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Error trying to export .ac model in blender

Postby dutchguy » Sat Jan 16, 2016 10:31 pm

You have probably loaded an image in the UV editor.

The only thing I did is import the model, move it around in accordance with the offsets specified in an xml file, and export it again. It does have a texture specified in the xml file, but not declaring it has never been a problem before. I'll try putting the texture in tomorrow though just to be sure.
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby Necolatis » Sat Jan 16, 2016 10:49 pm

Maybe this is your issue: Exporting packed .blend images will make the exporter fail

If that's the case just fix it by removing the packed textures and put them back in without being packed.

Otherwise I would like to take a look at your .blend file, to find the bug. Could you upload it somewhere?
"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: Error trying to export .ac model in blender

Postby dutchguy » Sat Jan 16, 2016 11:14 pm

I apparently solved the problem, but I have no idea how. I didn't save a .blend file before since I don't need it anymore after exporting as .ac. Now I did want to make a .blend, to upload to here, and just to try what would happen, after this I tried exporting as .ac again, without any problems, so I can only guess that saving as .blend somehow fixes the problem, but as I said before, I have no idea how.

Thanks for the suggestions!

EDIT: I discovered now that it didn't solve the problem, it only made the error message go away, but no .ac file was created. I've uploaded the .blend file here: https://www.dropbox.com/s/leja2hn3j3g3m1m/OHpanelmodified.blend?dl=0
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby Necolatis » Sun Jan 17, 2016 1:32 am

That's a big file, will take me some time to debug, just so you know.
"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: Error trying to export .ac model in blender

Postby Necolatis » Sun Jan 17, 2016 2:55 am

I fails for me because the textures are not at the location they were when they where added to the Blender model.
Maybe you moved a texture after loading the .blend.

I can make it not produce an error and just skip that problematic texture, but I don't think that would be productive, then an AC3D would be missing a reference to that/those textures.

I can only really test if you give me the textures also.
"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: Error trying to export .ac model in blender

Postby dutchguy » Sun Jan 17, 2016 11:19 am

Are the locations of textures inside an ac3d file given relative to the ac3d file, or relative to /? Because the last thing would mean that downloading an aircraft to a random location and editing an ac3d file in blender would generally not work?
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby Necolatis » Sun Jan 17, 2016 11:48 am

Inside the AC3D file, the texture path is relative to the location of the AC3D file. But if you give full path from root like "c:\users\me\documents\blue.png" or "/blue.png" I think it become absolute.
"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: Error trying to export .ac model in blender

Postby dutchguy » Sun Jan 17, 2016 12:22 pm

Then I think I understand part of the problem. I've now saved it to exactly the same location where I loaded the .ac file, so that the relative paths will be okay, and that worked. Only thing now is that there was another file that failed, and I remember that I saved it to the same location there as well, but I suppose I'll have made a mistake there. I don't have time to check it now, but the good news is that if I get that file working, then there are only 2 submodels to go and then the shadows are all done!
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby dutchguy » Mon Jan 18, 2016 5:18 pm

It appears that only worked for that one file. I just tried the other file that failed, using the exact same procedure, i.e. saving it in exactly the spot where the original file was from, but it gives the same error message. I've opened the original .ac file in gedit to check that all references to textures are correct, and all files referenced there seem to be there, so I don't see how that's going wrong. I've uploaded the entire 777 folder with all its subfolders and therefore also textures here. The file I tried to change is Models/Instruments/tcas-ctl.ac. All I did was rotate and translate it, so I didn't touch any of the textures.

If anybody can help finding out what's going wrong here I'd greatly appreciate this; If this issue gets fixed I'll probably be able to finish with all the shadows within a week (or perhaps two if I'm very busy with real life things), and then I can upload it for all to enjoy.
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Re: Error trying to export .ac model in blender

Postby Necolatis » Mon Jan 18, 2016 8:57 pm

I just tested that instrument, I imported it, and exported it. Works fine.

Are you using the latest script from here: https://github.com/NikolaiVChr/Blender-AC3D ?

Also remember that textures with a path, will have no path when exported.

So "..\Textures\Cockpit\Control_Stand.png" will become "Control_Stand.png", if you want to change that you can edit the ac file after 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: Error trying to export .ac model in blender

Postby dutchguy » Mon Jan 18, 2016 11:30 pm

I thought I already had the latest script, but I installed the one from the link just to be sure, and it still doesn't work for me. Also, after your comment that textures with a path have no path when exported, I noticed that the required textures are somehow always included in the directories of the .ac files. Does blender copy them automatically to make sure the new .ac file works?
dutchguy
 
Posts: 108
Joined: Mon Mar 31, 2014 5:16 pm

Next

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 13 guests