Menu

#7 Morph -mt will not work

open
nobody
None
5
2021-05-27
2007-01-27
G. Mason
No

Hi,

I have been using xmorph and gtkmorph with no problem, however morph has very strange behaviour:

For most values of the -mt arguement, morph does not perform a morph. However, on other values it produces a black output image (e.g. on value 0.7), and on some it creates a highly distorted image (on value 0.6). Morph dissolves the images perfectly, but does not perform the warp properly.

I have not been able to get morph to work as expected. I've tried with numerous meshes and images, which work in both xmorph and gtkmorph, but don't work with morph.

I have tried morph on two Debian machines, with the same results. I have also tried compiling older versions of morph from source, and had the same results.

I would be very grateful if you could help me. I really like xmorph and gtkmorph, and I would love to be able to use morph also.

*******

I tried to attach these files, but their sizes were above SourceForge's limit. I have uploaded them to: http://www.fragmental.pwp.blueyonder.co.uk/morph_files.zip (File size 1.43 mb)

Images used: blair2.tga, bush2.tga
Meshes used: blair-3.mesh, bush-3.mesh

GTKMorph output: gtkmorph-bushblair.png
xmorph output: xmorph-bushblair.tga
morph output: morph-bushblair.tga (As you can see, only the dissolve has worked)

Distorted output: morph-distorted.tga (Using -mt 0.6 and -dt 0)

Thank you for your time,

Discussion

  • Scott Pakin

    Scott Pakin - 2019-11-08

    I have been using xmorph and gtkmorph with no problem, however morph has very strange behaviour:

    For most values of the -mt arguement, morph does not perform a morph. However, on other values it produces a black output image (e.g. on value 0.7), and on some it creates a highly distorted image (on value 0.6). Morph dissolves the images perfectly, but does not perform the warp properly.

    I just encountered what I believe is the same—or at least a very similar—isssue. From a bit of detective work, the problem appears to be with the build process. Every other subdirectory builds with the C preprocessor flags described as "Do not change" in Makefile.conf: -DREAL=double and -DRGBA_MESH_WARP; the morph/ subdirectory builds without those. There's a simple fix that works for me. Add $(CFLAGS_CONF) to the definition of morph_CFLAGS in morph/Makefile.am:

    morph_CFLAGS = $(CFLAGS) $(CFLAGS_CONF) -DNDEBUG_LIBMORPH_REF_COUNT
    

    If you don't want to regenerate all the Autotools files, a quick alternative is simply to compile with make CPPFLAGS="-DREAL=double -DRGBA_MESH_WARP".

    If an xmorph maintainer is reading this, could you please apply the attached patch? It would be great to have the morph CLI working as expected.

     
  • Michael J. Gourlay

    Oh, hi! Scott, thanks for the patch. I have basically not looked at this code since I wrote it back in the 1990's. I didn't realize people still use it. How nice!

    I will try to see about applying it and uploading another version. Meanwhile, thanks for the patch!

     
  • Michael J. Gourlay

    Hi again! One snag; I only worked on Xmorph and the CL tool, not tkmorph. I make a cursory pass looking at the other package there that Andrea Mennucci added, but I never used the workflow and don't know what it is. I could probably update the source .tar.gz. Meanwhile I might be able to just add your patch and a README.

     
  • Michael J. Gourlay

    Heheheh -- Looks like Andrea added "mija" as a user on this project, probably decades ago, and maybe he gave me the account info, but the account I know about and use for myself is "mijagourlay". So I can't modify the files in this project anyway :) Maybe Andrea will check in and see these messages. Fingers crossed!

     
  • Scott Pakin

    Scott Pakin - 2021-01-13

    Michael: It's a bummer that you don't have access yourself. Thanks for giving it a try, and thanks for writing and releasing the code all those years ago. xmorph is definitely an "oldie but goodie".

     
  • A Mennucc

    A Mennucc - 2021-05-27

    Hi, I added Michael J. Gourlay (mijagourlay) to the project. Sorry for the glitch.

    Unfortunately GTKMorph uses GTK2, so it is quite out of date. Porting to GTK3 is not too difficult.
    Unfortunately I have no time to update it, sorry.

    a.

     

Log in to post a comment.