Coffee mug with artwork painted on it (Snibgo's POV-Ray + IM)
Posted: 2018-01-31T12:25:09-07:00
Hello,
Following this tutorial: http://im.snibgo.com/coffmug.htm the final mug image ithat I'm getting is incorrect - upper part of "painted" artwork is distorted. All of the intermediate image files seems to be correct, if compared to one in the article. I've only changed chequer pattern to white floor in cm_scene.pov. I'm using ImageMagick-7.0.7-22.
cm_scene.pov output:
Mug mask:
Image mask:
Displacement map:
cm_i_disp.png
Extended displacement map:
cm_i_extdisp.png:
Notice single color bar on top. Is this correct?
Script output:
Used artwork file (cm_3.png): http://r1me.pl/development/mug/cm_3.png (1200x400)
Original snibgo logo/text gets distorted too, I've used different artwork file to make distortion more visible.
Notice distortion and missing mug itself (second one is not an issue since it can be easily merged later)
I'm quite sure the article was written with older version of IM.
IM requires now input and output file for convert operation, but article instructs creation of displacement map image like this:
I actually had to call it like this:
where cm_i_disp_w.png is an empty 1199x399 image.
Are my displacement map files correct? What's causing artwork distortion ?
Following this tutorial: http://im.snibgo.com/coffmug.htm the final mug image ithat I'm getting is incorrect - upper part of "painted" artwork is distorted. All of the intermediate image files seems to be correct, if compared to one in the article. I've only changed chequer pattern to white floor in cm_scene.pov. I'm using ImageMagick-7.0.7-22.
cm_scene.pov output:
Mug mask:
Image mask:
Displacement map:
cm_i_disp.png
Extended displacement map:
cm_i_extdisp.png:
Notice single color bar on top. Is this correct?
Script output:
Used artwork file (cm_3.png): http://r1me.pl/development/mug/cm_3.png (1200x400)
Original snibgo logo/text gets distorted too, I've used different artwork file to make distortion more visible.
Code: Select all
call wrapImage ^
cm_3.png ^
cm_white_mug.png ^
cm_extdisp_map.png ^
cm_image_mask.png ^
2 ^
cm_snibgo_mug_im.png
I'm quite sure the article was written with older version of IM.
IM requires now input and output file for convert operation, but article instructs creation of displacement map image like this:
Code: Select all
%IM%convert ^
-sparse-color Bilinear ^
0,0,#008,^
%%[fx:w-1],0,#f08,^
0,%%[fx:h-1],#0f8,^
%%[fx:w-1],%%[fx:h-1],#ff8 ^
-colorspace RGB ^
cm_i_disp.png
Code: Select all
%IM% convert cm_i_disp_w.png ^
-sparse-color Bilinear ^
0,0,#008,^
1199,0,#f08,^
0,399,#0f8,^
1199,399,#ff8 ^
-colorspace RGB ^
cm_i_disp.png
Are my displacement map files correct? What's causing artwork distortion ?