POV-Ray : Newsgroups : povray.binaries.utilities : Online files converter Server Time
12 Oct 2025 00:49:28 EDT (-0400)
  Online files converter (Message 91 to 95 of 95)  
<<< Previous 10 Messages Goto Initial 10 Messages
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

<<< Previous 10 Messages Goto Initial 10 Messages

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