POV-Ray : Newsgroups : povray.binaries.utilities : Online files converter Server Time
7 Dec 2025 22:02:57 EST (-0500)
  Online files converter (Message 90 to 99 of 106)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: Kenneth
Subject: Re: Online files converter
Date: 10 Oct 2025 06:25:00
Message: <web.68e8de59c9089336e83955656e066e29@news.povray.org>
yesbird wrote:
> On 08/10/2025 18:29, kurtz le pirate wrote:
> > Have you noticed any improvements ?
>
> Yes, I am working hard and updating it daily, fixing the bugs and
> implementing new features.

I *just* noticed something odd about your online STL-to-mesh2 conversion
process. (I should have mentioned it before now, but was too busy working on my
own converter; my apologies.)

It seems that the resulting mesh2 triangles are facing 'inside out'-- the
insides face outside and vice versa. See my attached render of an STL (binary)
file that I uploaded to your page and converted tonight.

In the converted mesh2 file, I first deleted your union{...} and material{...}
at the end, then rendered the mesh2 with my own textures: A regular texture AND
an interior_texture.

However, this is NOT a fault of your conversion process: I noticed the same
behavior while working on my own POV-ray STL-to-mesh converter. The 3 vertices
in each STL triangle are apparently written the opposite way 'around the clock'
-- opposite chirality-- according to how *POV-ray* expects them. I had to fix
this in my own code, simply by swapping the triangles' 3rd point for the 1st.
Like:

an original STL triangle:
triangle{<1,2,3>, <4,5,6>, <7,8,9>}

for correct POV-ray rendering:
triangle{<7,8,9>, <4,5,6>, <1,2,3>}

STL files (and 3D printers) are apparently standardized for a 3-vertex chirality
that is opposite to POV-ray's own triangle-rendering scheme.


Post a reply to this message


Attachments:
Download 'triangles_inside_out_kw_10_10_25.jpg' (20 KB)

Preview of image 'triangles_inside_out_kw_10_10_25.jpg'
triangles_inside_out_kw_10_10_25.jpg


 

From: yesbird
Subject: Re: Online files converter
Date: 10 Oct 2025 06:55:06
Message: <68e8e60a$1@news.povray.org>
On 10/10/2025 13:22, Kenneth wrote:
> I *just* noticed something odd about your online STL-to-mesh2 conversion
> process. (I should have mentioned it before now, but was too busy working on my
> own converter; my apologies.)
> ...

It's interesting, thank you for detailed feedback, I will check it and
post the results here. Testing is highly appreciated at this state of
the project.
-- 
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Online files converter
Date: 10 Oct 2025 07:05:00
Message: <web.68e8e7c5c90893361f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> However, this is NOT a fault of your conversion process: I noticed the same
> behavior while working on my own POV-ray STL-to-mesh converter. The 3 vertices
> in each STL triangle are apparently written the opposite way 'around the clock'
> -- opposite chirality-- according to how *POV-ray* expects them. I had to fix
> this in my own code, simply by swapping the triangles' 3rd point for the 1st.
> Like:
>
> an original STL triangle:
> triangle{<1,2,3>, <4,5,6>, <7,8,9>}
>
> for correct POV-ray rendering:
> triangle{<7,8,9>, <4,5,6>, <1,2,3>}
>
> STL files (and 3D printers) are apparently standardized for a 3-vertex chirality
> that is opposite to POV-ray's own triangle-rendering scheme.

Yes, our left-handed coordinate system can drive people crazy at times.
It's also why things are best coded to be adjustable.

If you put your triangle vertices into an array and referenced them by index,
then it's something that can be adjusted - and even used as data apart from the
mesh2 definition.  Hard-coding the structure makes it inaccessible from SDL,
which has been a long-standing complaint in POV-Ray development.

Loading the data into an array makes it available to the user to post-process
after loading.

<-1, 0, 1> *  1 + 1 = array indices <0, 1, 2>
<-1, 0, 1> * -1 + 1 = array indices <2, 1, 0>
So everything is easily flipped with a simple pre-multiplier

It also allows mesh deformation (similar to what Josh English wanted to do)
because you have direct access to modify the data.
It also allows you to compute the normals differently.

Not saying that Sergei has to do it that way, but it definitely is something to
think about, and perhaps experiment with implementing in your own converter.

- BW


Post a reply to this message

From: Kenneth
Subject: Re: Online files converter
Date: 10 Oct 2025 08:00:00
Message: <web.68e8f41bc9089336e83955656e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> Yes, our left-handed coordinate system can drive people crazy at times.
>

Yeah, *that* topic probably needs a fresh-discussion thread of its own, just as
a 'refresher course.'

But as it impacts STL conversion: All of the STL files I've worked with recently
follow the 'right-hand rule'-- the +x direction faces LEFT rather than to the
right as in POV-ray. (Another 3D-printing standard, apparently.) So STL-to-mesh
conversions have to be mirror-flipped in x to render correctly for us. In my own
code, I simply scaled the final mesh by <-1,1,1>.


Post a reply to this message

From: yesbird
Subject: Re: Online files converter
Date: 10 Oct 2025 12:15:44
Message: <68e93130@news.povray.org>
On 10/10/2025 14:02, Bald Eagle wrote:
> Yes, our left-handed coordinate system can drive people crazy at times.
> It's also why things are best coded to be adjustable.
> ...

Thanks, Bill, using arrays is a very good idea, I will think about
details of implementation to make this feature useful and flexible,
then include in next release.

I can also imagine a set of switchable options to control desired
format, including orientation of coordinate system - any proposals are
are welcome.

Besides controlling the mesh itself, arrays will allow decoration by
additional elements, positioned at the vertices, achieving different
interesting effects, like on attached image.
--
YB


Post a reply to this message


Attachments:
Download 'beads.png' (160 KB)

Preview of image 'beads.png'
beads.png


 

From: yesbird
Subject: Re: Online files converter
Date: 10 Oct 2025 14:02:04
Message: <68e94a1c@news.povray.org>
On 09/10/2025 13:54, Mr wrote:
> I sent you an email.

Replied to you yesterday.
Everything is ready for integration with Blender.
--
YB


Post a reply to this message

From: yesbird
Subject: Re: Online files converter
Date: 12 Oct 2025 16:26:23
Message: <68ec0eef$1@news.povray.org>
On 10/10/2025 14:02, Bald Eagle wrote:
> If you put your triangle vertices into an array and referenced them by index,
> then it's something that can be adjusted - and even used as data apart from the
> mesh2 definition.  Hard-coding the structure makes it inaccessible from SDL,
> which has been a long-standing complaint in POV-Ray development.

It's done: just select 'Export arrays' checkbox at low-left corner:
https://povlab.yesbird.online/studio/

Hope it will be useful.
--
YB


Post a reply to this message

From: yesbird
Subject: Re: Online files converter
Date: 12 Oct 2025 17:19:27
Message: <68ec1b5f@news.povray.org>
On 10/10/2025 13:22, Kenneth wrote:
> It seems that the resulting mesh2 triangles are facing 'inside out'-- the
> insides face outside and vice versa. See my attached render of an STL (binary)
> file that I uploaded to your page and converted tonight.
> ...

Thanks you for this bug report, I have just tried to reproduce this
behavior and didn't found any difference between images with forward and
backward faces order. Could you please send me a simple example,
illustrating this issue ? For simplicity, please find a 'cube.fbx'
in attachment - you can use it with my converter.
--
YB


Post a reply to this message


Attachments:
Download 'cube.fbx.dat' (18 KB)

From: Kenneth
Subject: Re: Online files converter
Date: 13 Oct 2025 07:05:00
Message: <web.68ecda58c9089336e83955656e066e29@news.povray.org>
yesbird wrote:
> On 10/10/2025 13:22, Kenneth wrote:
> > It seems that the resulting mesh2 triangles are facing 'inside out'...
> > ...
>
> Thanks you for this bug report, I have just tried to reproduce this
> behavior and didn't found any difference between images with forward and
> backward faces order. Could you please send me a simple example,
> illustrating this issue ? For simplicity, please find a 'cube.fbx'
> in attachment - you can use it with my converter.
> --

I just tried uploading 'cube.fbx' to your converter, but it does not load there.
This *might* be because it showed up as 'cube.fbx.dat' for me when I initially
downloaded it here. (This is typical behavior of the Pov-ray newsgroup website
that I use, regarding downloads; a .dat container is appended to all files.
Unfortunately, I cannot strip that addition from the file, for re-uploading to
your converter.) But I don't know if this is the actual cause of the problem; it
is just my guess.

I have attached one of my recent STL-to-mesh2 conversions from your site
as an .inc file-- a model originally from Thingiverse-- to illustrate the
inside-out triangle result. When rendered in POV-ray, it needs both a texture
and an interior_texture, so that the latter will show the problem. (When using
just a typical texture alone, the triangles' insides and outsides look the
SAME...which gives a false impression of the situation.)


Post a reply to this message


Attachments:
Download 'test_model_stl_to_mesh2_conversion.inc.txt' (701 KB)

From: yesbird
Subject: Re: Online files converter
Date: 13 Oct 2025 07:32:31
Message: <68ece34f$1@news.povray.org>
On 13/10/2025 14:03, Kenneth wrote:
> I just tried uploading 'cube.fbx' to your converter, but it does not load there.
> ...

Thanks for testing, could you please take file from here
and try again ?

https://drive.google.com/file/d/19i3tetZYJzlKQcOPR_rUEI1n-m2LCwtS/view?usp=drive_link

> 
> I have attached one of my recent STL-to-mesh2 conversions from your site
> ...

Sorry, but without complete scene with textures I can't reproduce it -
still confused. But now you can export model with arrays and make
desired perturbations as Bill suggested - just select 'Export arrays'
at low-left corner.
-- 
YB


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

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