POV-Ray : Newsgroups : povray.general : img2mesh update Server Time
8 Oct 2026 15:44:31 EDT (-0400)
  img2mesh update (Message 1 to 5 of 5)  
From: Ilya Razmanov
Subject: img2mesh update
Date: 31 Aug 2026 23:20:51
Message: <6a964493$1@news.povray.org>
Greetings,

as some might remember, img2mesh is a pure Python program for converting 
2D image height fields into 3D triangle mesh, building somewhat 
interesting mesh geometry. Others may take a look at:

https://dnyarri.github.io/img2mesh.html

One of the interesting features of img2mesh is using different types of 
triangle splitting for smooth and sharp source areas, named geometry 3 
and 1, correspondingly. Geometry choice is based on local image contrast 
(currently on max abs difference within neighbour pixels window), more 
specifically, on results of applying user-defined threshold criterion to 
local contrast.

Main reason for current img2mesh update is adding a threshold mask 
display to img2mesh GUI, so now user may easily switch between source 
image preview and mask representation, and edit threshold visually (an 
animated GUI screenshot is attached. Yes, I insist - it's animated, no 
matter what your newsreader says! After all, animated PNG recently 
became accepted as a part of PNG specs). I've spent several days trying 
to make a GUI which I myself wouldn't consider disgusting, so, 
hopefully, other people may find it useful as well.

Simplest way to download img2mesh, as always, is visiting release page:

https://github.com/Dnyarri/img2mesh/releases/latest

-- 
Ilyich the Toad
https://dnyarri.github.io/


Post a reply to this message


Attachments:
Download 'gui.png' (16 KB)

Preview of image 'gui.png'
gui.png


 

From: ingo
Subject: Re: img2mesh update
Date: 1 Sep 2026 09:19:51
Message: <6a96d0f7$1@news.povray.org>
On 2026-09-01 05:20, Ilya Razmanov wrote:
> as some might remember

I do. I like it.

Cheers,

ingo


Post a reply to this message

From: William F Pokorny
Subject: Re: img2mesh update
Date: 1 Sep 2026 12:46:11
Message: <6a970153$1@news.povray.org>
On 8/31/26 23:20, Ilya Razmanov wrote:
> different types of triangle splitting for smooth and sharp source areas

Cool :-)

 > Animated png

Cool. What method / tool did you use for the encoding?

Bill P.


Post a reply to this message

From: Ilya Razmanov
Subject: Re: img2mesh update
Date: 1 Sep 2026 15:59:04
Message: <6a972e88$1@news.povray.org>
On 01.09.2026 19:46, William F Pokorny wrote:
> On 8/31/26 23:20, Ilya Razmanov wrote:
>> different types of triangle splitting for smooth and sharp source areas
> 
> Cool. What method / tool did you use for the encoding?
> 

Some APNG Assembler:

https://apngasm.sourceforge.net/

- it's pretty simple, just drag source PNGs in, set frame delays, and 
export;

plus subsequent compression with Oxipng:

https://github.com/oxipng/oxipng

- oxipng is my tool of choice for PNG compression now; it's way faster 
than ECT, does not destroy 16 bpc images, L/RGB in transparent areas etc 
unless I specifically tell it to do so, and, in general, just does what 
I want, not trying to pretend being smarter than me. I use it even for 
my custom icons - it can't handle ICO files, but I made some small 
pythonic thingy which does nothing but stick PNGs in ICO framework (that 
is, again, does not try to pretend being smarter than me), so I can 
build a set of PNGs, feed them to oxipng, then feed them to my reptile 
creature (not surprisingly, it's called "PNG Sanctifier"), and viola, I 
get exactly what I want.

-- 
Ilyich the Toad
https://dnyarri.github.io/


Post a reply to this message

From: Mike Miller
Subject: Re: img2mesh update
Date: 3 Sep 2026 17:50:00
Message: <web.6a99eaeceb2b9a99c60bf43b25e430c2@news.povray.org>
Ilya Razmanov <ily### [at] gmailcom> wrote:
> Greetings,
>
> as some might remember, img2mesh is a pure Python program for converting
> 2D image height fields into 3D triangle mesh, building somewhat
> interesting mesh geometry. Others may take a look at:
>
> https://dnyarri.github.io/img2mesh.html
>
> One of the interesting features of img2mesh is using different types of
> triangle splitting for smooth and sharp source areas, named geometry 3
> and 1, correspondingly. Geometry choice is based on local image contrast
> (currently on max abs difference within neighbour pixels window), more
> specifically, on results of applying user-defined threshold criterion to
> local contrast.
>
> Main reason for current img2mesh update is adding a threshold mask
> display to img2mesh GUI, so now user may easily switch between source
> image preview and mask representation, and edit threshold visually (an
> animated GUI screenshot is attached. Yes, I insist - it's animated, no
> matter what your newsreader says! After all, animated PNG recently
> became accepted as a part of PNG specs). I've spent several days trying
> to make a GUI which I myself wouldn't consider disgusting, so,
> hopefully, other people may find it useful as well.
>
> Simplest way to download img2mesh, as always, is visiting release page:
>
> https://github.com/Dnyarri/img2mesh/releases/latest
>
> --
> Ilyich the Toad
> https://dnyarri.github.io/

NICE! ...thanks for sharing. I'm currently working with a few height field
scenes. Having pre-calculated meshes to morph over time would be very cool to
play with.
Thank you
Miller


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.