Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to get ImageMagick to read output from Arnold

How to get ImageMagick to read output from Arnold

Anonymous
Not applicable
2,227 Views
15 Replies
Message 1 of 16

How to get ImageMagick to read output from Arnold

Anonymous
Not applicable

I am using Maya to render frames out of Arnold via MEL commandline. This works.

However, the next step in my code is to get ImageMagick to process the output frames. I have run into a problem where it appears that none of the image formats rendered by Arnold seem to conform to their standard as I get errors when reading the files.

For example:

  • If I use PNG, I get: ImproperImageHeader 'path/to/file' @ error/png.c/ReadPNGImage/4255
  • If I use TIF, I get: Not a TIFF file, bad magic number 20294 (0x4f46). 'path/to/file' @ error/tiff.c/TIFFErrors/652.
  • If I use EXR, I get: UnableToOpenBlob 'Cannot read image file "path/to/file". File is not an image file.': No error @ error/exr.c/ReadEXRImage/206.
  • If I use JPG, I get: Not a JPEG file: starts with 0x46 0x4f 'path/to/file' @ error/jpeg.c/JPEGErrorHandler/332.

None of the above formats have problems with ImageMagick if I use the Maya software renderer. They are only unreadable by ImageMagick if I render them with Arnold. Another tell that they don't conform is that Windows is not able to make thumbnails for the jpeg's or the png's, nor am I able to open the png/tif/jpg with Photoshop. (XnView is able to open them, interestingly.)

Unfortunately, the remaining formats that Arnold can output are not formats that I would expect ImageMagick to be able to read, so I am stuck!

I have also tried using different bit depths and compression to no avail.

Am I doing something wrong?

Side note: I am using ImageMagick's montage.exe to do the processing.

0 Likes
Accepted solutions (1)
2,228 Views
15 Replies
Replies (15)
Message 2 of 16

Stephen.Blair
Community Manager
Community Manager

works for me

magick convert D:\maya\projects\default\images\tmp\denoise\merged.png -resize 50% test.png


// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 3 of 16

Anonymous
Not applicable

Would you try running a similar command line using montage?
For example:

montage.exe -mode Concatenate image1.png image2.png

If it works, it likely points to a problem in my own setup... thank you so much for your reply and help.

0 Likes
Message 4 of 16

Anonymous
Not applicable

I get the same errors even if I try your exact commandline...
That means there is either a difference in the way our files are generated, or a difference in our ImageMagicks.

0 Likes
Message 5 of 16

Stephen.Blair
Community Manager
Community Manager

the montage command works

Windows 7, Maya 2018 Update 3, MtoA 3.0.1

latest image magick (I just installed it for this)



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 6 of 16

Anonymous
Not applicable

I'm still getting the same errors with different types of ImageMagicks... which one exactly did you install?
Also, would it be a lot to ask if you screen capped your render settings? (I am also using MtoA 3.0.1)
Thank you so much!

0 Likes
Message 7 of 16

Anonymous
Not applicable

If you could email me the file you rendered with Arnold, that would help to isolate the issue as well: dez at lookingglassfactory
All your help is super appreciated!

0 Likes
Message 8 of 16

Stephen.Blair
Community Manager
Community Manager

ImageMagick-7.0.8-0-Q16-x64-dll.exe

untitled0004.png



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 9 of 16

Anonymous
Not applicable

This image is a normal png. Did you save it using the render view > save as... ? If so, I think that just uses Maya's native image saving algo's.
Would you try again using MEL? use:
render -x 300 -y 200
If it renders a normal png again for you, that means that something must be wrong with my arnold...

0 Likes
Message 10 of 16

Stephen.Blair
Community Manager
Community Manager

render -x 300 -y 200 does not render with Arnold

For the rendered file, oiiotool gives me this:

oiiotool.exe -v --info D:\maya\projects\default\images\tmp\untitled.0044.png <br>Reading D:\maya\projects\default\images\tmp\untitled.0044.png
D:\maya\projects\default\images\tmp\untitled.0044.png :  300 x  200, 4 channel, uint8 iff <br>   channel list: R, G, B, A <br>   tile size: 64 x 64 <br>   compression: "rle" <br>   Artist: "blairs on REMFDXQFB2"
    DateTime: "Fri Jun 15 15:36:37 2018"


// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 11 of 16

Stephen.Blair
Community Manager
Community Manager
arnoldRender -cam "perspShape" -w 960 -h 540

will render with Arnold



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 12 of 16

Anonymous
Not applicable

The command line solved the issue! Thanks a lot!

I am not sure what Maya was trying to do with the other command line then, I guess it was still using the native renderer.. but in a broken way?

0 Likes
Message 13 of 16

Anonymous
Not applicable

If you post your last comment again as an answer I will accept it.

0 Likes
Message 14 of 16

Stephen.Blair
Community Manager
Community Manager
Accepted solution

arnoldRender -cam "perspShape" -w 960 -h 540

will render with Arnold, and those png files work with magick

render seems to be the Maya Software Render



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 15 of 16

Stephen.Blair
Community Manager
Community Manager

done ,thanks



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 16 of 16

Anonymous
Not applicable

Thank you so much for your patience and help!

0 Likes