Go Back   AC3D Forums > Technical > AC3D Bugs and Problems
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 5th January 2023, 02:11 PM   #1
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Auto Texture Update Not Working on 9.0.22

When I update and save a texture file in my graphics editor, AC3D doesn't always update the object textures. It's fails intermittently, getting worse as time goes on until its 100% and I have to close and reopen AC3D to see the change.

My "texture update check freq" is set to 3000.
I'm using GIMP to update a .png file.
Perry is offline   Reply With Quote
Old 8th January 2023, 04:02 PM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,500
Default Re: Auto Texture Update Not Working on 9.0.22

I just tried it on Windows, changing the image with Photoshop and it worked OK.


Is this on Windows, Mac or Linux?


I wonder if GIMP could be preserving the file modification info?
Andy is offline   Reply With Quote
Old 8th January 2023, 09:26 PM   #3
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Re: Auto Texture Update Not Working on 9.0.22

I'm running Windows 10.

I'll have to do some tests to see if the file modification date/time is updated in a timely manner. I changed update frequency from 3000 to 10000 and that helps. It takes a longer time before it starts failing.
Perry is offline   Reply With Quote
Old 8th January 2023, 09:32 PM   #4
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Re: Auto Texture Update Not Working on 9.0.22

The file modification time is updated corrected (as seen in windows explorer), but AC3D doesn't pickup the changes.

It could be that GIMP or Windows (more likely) has the file locked for an extended time after the modification. It's going to take a while to google that out since I'm not aware of an lsof command for windows.

Last edited by Perry; 8th January 2023 at 09:42 PM.
Perry is offline   Reply With Quote
Old 11th January 2023, 08:05 PM   #5
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Re: Auto Texture Update Not Working on 9.0.22

OpenFileView doesn't show panel.png is being locked by GIMP, AC3D or Windows Explorer. Even when I'm saving the file. OFV's refresh rate is set to 1 second.

Windows explorer preview view shows changes made by GIMP or MS Paint, immediatel and every time.

I did the following in GIMP one at a time.
GIMP: Save background color to OFF
GIMP: Changed Export Compression from 9 to 0
GIMP: Changed Export Save creation time to off
GIMP: Changed Export Save exif data to off
GIMP: Changed Export Save xmpp data to off
GIMP: Changed Export Save thumbnail to off
GIMP: Changed Export Save color profile to off
GIMP: Changed Export Save IPCT data to ON
GIMP: Changed Export Save layer offset to on
GIMP: Reset Export Settings to default

After AC3D stopped auto updated, I loaded file in MS Paint in resaved. AC3D still wouldn't load.
Perry is offline   Reply With Quote
Old 11th January 2023, 08:46 PM   #6
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Re: Auto Texture Update Not Working on 9.0.22

NOTE:
  • After saving in GIMP, within a few seconds, I do see the message "loading texture <filename>" in AC3D, but nothing actually happens
  • This problem also occured in AC3D 8.6.11
  • My drive with the png file is 70% full

Running sysinternal's sync command doesn't work
PowerShell command "Write-VolumeCache C" doesn't work.
Turning off write caching to hard drive doesn't work.
Perry is offline   Reply With Quote
Old 12th January 2023, 08:41 AM   #7
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,500
Default Re: Auto Texture Update Not Working on 9.0.22

Can you try this?


Start AC3D from the command line with "ac3d -debug", create a shape, texture it.

"touch" the texture file to see if the debgging info reports that the texture reloads.


use:


Code:
copy /b test.jpg +,,
where test.jpg is the name of your texture file.


Each time the file is touched, the texture should reload into AC3D and be reported on the debug output.
Andy is offline   Reply With Quote
Old 13th January 2023, 12:07 PM   #8
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Re: Auto Texture Update Not Working on 9.0.22

Here's the debug output after resaving the file. 4th line down says "failed to load image" but doesn't say why. Is there a higher debug level?
================================================== ===========
COMMAND: 'add_new_texture' 'C:/X-Plane 11/Aircraft/Custom/2 Military/Fighter/P-51H Mustang/Cockpit_3d/-PANELS-/Panel.png' 'C:/X-Plane 11/Aircraft/Custom/2 Military/Fighter/P-51H Mustang/Cockpit_3d/-PANELS-/Panel.png'
reloading texturereloading texture C:/X-Plane 11/Aircraft/Custom/2 Military/Fighter/P-51H Mustang/Cockpit_3d/-PANELS-/Panel.png
sending to TCL: 'display_message "loading texture C:/X-Plane 11/Aircraft/Custom/2 Military/Fighter/P-51H Mustang/Cockpit_3d/-PANELS-/Panel.png"'
failed to load image
RESULT: "(null)"
COMMAND: 'selection_changed' 'texture reloaded'
SELECTION CHANGED (texture reloaded)
one object selected - finding it
texturebuild image=bb8de2e0
binding texture with index 1
sending to TCL: 'catch {set uvedit_infolabel "Editing 164 surfaces of object: 'Panel, Main', Surfaces selected in TCE: 164"}'
sending to TCL: 'catch {set uvedit_infolabel2 "Texture: C:/X-Plane 11/Aircraft/Custom/2 Military/Fighter/P-51H Mustang/Cockpit_3d/-PANELS-/Panel.png (4096 x 4096)"}'
sending to TCL: 'uv_do_sensitivity'
COMMAND: 'uv_get_selected_vertices'
RESULT: "0"
COMMAND: 'uv_get_selected_surfaces'
RESULT: "164"
sending to TCL: 'catch {set uvedit_infolabel "Editing 164 surfaces of object: 'Panel, Main', Surfaces selected in TCE: 164"}'
sending to TCL: 'catch {set uvedit_infolabel2 "Texture: C:/X-Plane 11/Aircraft/Custom/2 Military/Fighter/P-51H Mustang/Cockpit_3d/-PANELS-/Panel.png (4096 x 4096)"}'
sending to TCL: 'uv_do_sensitivity'
COMMAND: 'uv_get_selected_vertices'
RESULT: "0"
COMMAND: 'uv_get_selected_surfaces'
RESULT: "164"
RESULT: "164"
COMMAND: 'redraw_all'
RESULT: "(null)"
Perry is offline   Reply With Quote
Old 13th January 2023, 01:17 PM   #9
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,500
Default Re: Auto Texture Update Not Working on 9.0.22

I wonder if it's the spaces, or some other characters, in the filename causing problem?
Andy is offline   Reply With Quote
Old 13th January 2023, 05:11 PM   #10
Perry
Junior Member
Junior member
 
Join Date: Apr 2020
Posts: 9
Default Re: Auto Texture Update Not Working on 9.0.22

I copied the files I was working with to new directory and filenames with no spaces. The problem still occurs. See below.

================================================== =========
COMMAND: 'add_new_texture' 'C:/TEST/TEST_Panel.png' 'C:/TEST/TEST_Panel.png'
reloading texturereloading texture C:/TEST/TEST_Panel.png
sending to TCL: 'display_message "loading texture C:/TEST/TEST_Panel.png"'
failed to load image
RESULT: "(null)"
COMMAND: 'selection_changed' 'texture reloaded'
SELECTION CHANGED (texture reloaded)
one object selected - finding it
texturebuild image=b3e2500
binding texture with index 2
sending to TCL: 'catch {set uvedit_infolabel "Editing 164 surfaces of object: 'Panel, Main', Surfaces selected in TCE: 164"}'
sending to TCL: 'catch {set uvedit_infolabel2 "Texture: C:/TEST/TEST_Panel.png (4096 x 4096)"}'
sending to TCL: 'uv_do_sensitivity'
COMMAND: 'uv_get_selected_vertices'
RESULT: "0"
COMMAND: 'uv_get_selected_surfaces'
RESULT: "164"
sending to TCL: 'catch {set uvedit_infolabel "Editing 164 surfaces of object: 'Panel, Main', Surfaces selected in TCE: 164"}'
sending to TCL: 'catch {set uvedit_infolabel2 "Texture: C:/TEST/TEST_Panel.png (4096 x 4096)"}'
sending to TCL: 'uv_do_sensitivity'
COMMAND: 'uv_get_selected_vertices'
RESULT: "0"
COMMAND: 'uv_get_selected_surfaces'
RESULT: "164"
RESULT: "164"
COMMAND: 'redraw_all'
RESULT: "(null)"
Perry is offline   Reply With Quote
Reply

Tags
auto update, texture mapping

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 06:23 AM.


AC3D Forum
(C) Inivis Limited 2020