POV-Ray : Newsgroups : povray.general : QUESTION: STL to POV (INC)? Server Time
10 Oct 2026 11:42:06 EDT (-0400)
  QUESTION: STL to POV (INC)? (Message 10 to 59 of 59)  
<<< Previous 9 Messages Goto Initial 50 Messages
From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 08:33:04
Message: <5979dd80$1@news.povray.org>
On 7/27/2017 12:52 PM, Bald Eagle wrote:
> Le_Forgeron <jgr### [at] freefr> wrote:
>
>> 2. STL will always be a mesh (collection of triangles), stl that can be
>> drilled is an illusion.
>
> Perhaps if the mesh is viewed with an orthographic camera, with even ambient
> lighting, and an even gradient pigment, then the resulting render can be used as
> a heightfield.
>

The mesh I downloaded, from that site, enclosed a volume with no holes.
But even if it were only a collection of triangles. It is trivial in 
blender to join then into a surface and extrude that into a volume. [Did 
I actually say that something was trivial in Blender? ^ ^ ]


> Just exploring other options.  :)
>
>

It is hard not to. :)

-- 

Regards
     Stephen


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 14:33:39
Message: <597a3203$1@news.povray.org>
On 27.07.2017 02:45, Sven Littkowski wrote:
> Hi, there is the NASA 3D Resources website, offering various vehicles
> and planetary landscapes as 3D models, formats OBJ and STL.
> 
> 1. Is there any OBJ to POV converter?
> 
> 2. I tried to convert the Martian and Lunar landscapes (STLs) to the
> POV-Ray format, using STL2POV:
> command line: "stl2pov -s InputFile.stl >OutputFile.inc".
> It reads STL files, and creates a POV-Ray mesh and saves that file as
> INC. But the result is horrible: instead of a block with a planetary
> surface, I get a block on the one side and a thin surface on the other
> side (90° angle!), and there are many holes in that landscape. Is there
> any better way to convert STLs into POV? I need a massive block with the
> landscape above, as I want to "dig tunnels" into it, too.
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 
Wow! Thank you all - so many new ideas and options!

My problem is, that I am not experienced at all with Poseray and Blender
and MeshLab, I have to find out with them, how to do these tasks. If it
is just importing and exporting, well, that is easy.

Clipka made me getting a first glimpse of many things I could do with
POV-Ray that I did not even knew about at all. Will have to explore,
might need more instructions on all these procedures that he outlined.

Actually, the NASA files seem to be massive blocks just with that
planetary surface, but I am understanding now that they are just hollow
triangle meshes. I wished,

POV-Ray would offer an easier way to replace one of the surfaces of a
box with a heightfield or mesh structure. His way is complicated - at
least for me. never done anything like that before. But then again,
mankind never explored space and other celestial bodies before, and now
we do. So I have to learn Clipka's procedures, too.

Stephen mentions a way to make a mesh solid in Blender. Here, too, I
need further instructions for my very first time trying to do such.

Compliment to everyone: we have a great spirit in this group, and a lot
of expertise! Thank you all!


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 15:07:59
Message: <597a3a0f$1@news.povray.org>
Am 27.07.2017 um 19:33 schrieb Sven Littkowski:

> Actually, the NASA files seem to be massive blocks just with that
> planetary surface, but I am understanding now that they are just hollow
> triangle meshes. I wished,
> 
> POV-Ray would offer an easier way to replace one of the surfaces of a
> box with a heightfield or mesh structure. His way is complicated - at
> least for me. never done anything like that before. But then again,
> mankind never explored space and other celestial bodies before, and now
> we do. So I have to learn Clipka's procedures, too.

With NASA's meshes being genuine boxes, things get a good deal easier:
All you need to do is add `inside_vector WHATEVER` to the mesh, with
WHATEVER being an arbitrary vector.


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 15 Aug 2017 04:35:01
Message: <5992b235$1@news.povray.org>
On 27.07.2017 05:39, clipka wrote:
> The mesh files provided by NASA are certainly just the surface, and
> since it's not the entire planet but just a tile (or so I guess),
> turning it into a solid 3D volume isn't trivial. You'll need to proceed
> as follows:
> 
> (1) Generate the mesh INC file.
> 
> At this point, all you have is a mesh patch object, i.e. a genuinely
> non-solid sheet.
> 
> (2) To the mesh, add an `inside_vector` specifying whatever direction is
> supposed to be "up" with respect to the tile.
> 
> At this point, you have a chimera between a solid and a patch: It now
> has a well-defined inside (namely every point that is "below" the tile,
> i.e. the tile extruded "downwards" toward infinity). The surface
> definition is still patchy though (pun intended), so right now you won't
> see any effect, because POV-Ray can only render surfaces, not volumes.
> 
> Note however that this chimera is already good enough to start "digging"
> using CSG.
> 
> (3) Intersect the mesh with another object, e.g. a box, defining the
> dimensions of the "massive block" you want.
> 
> Make sure that for any point on the box that is supposed to be "below"
> the landscape, if you trace a line in the direction given by the
> `inside_vector`, it should properly intersect the mesh (note that
> grazing it might not be enough).
> 
> This step will add surfaces to the "sides" and the "bottom" of your
> block of landscape, so that they can be seen as well. If that's not a
> thing you need, this third step is entirely optional.
> 
Hi Clipka,

I am trying to follow up now your advise. I opened Blender 2.78, and
imported the STL file (MarsVallesMarineris2). But I never worked with
Blender before. Where can I find the option to add an "inside_vector",
and specify its direction?

Might be, I have to ask you a few more things afterwards. But only 1x,
soon i will be able to do it by myself. Hope you don't mind.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 15 Aug 2017 05:25:10
Message: <5992bdf6$1@news.povray.org>
On 8/15/2017 8:34 AM, Sven Littkowski wrote:
> I am trying to follow up now your advise. I opened Blender 2.78, and
> imported the STL file (MarsVallesMarineris2). But I never worked with
> Blender before. Where can I find the option to add an "inside_vector",
> and specify its direction?
>
> Might be, I have to ask you a few more things afterwards. But only 1x,
> soon i will be able to do it by myself. Hope you don't mind.

I don't know if you can, Sven. But maybe Mr will be able to answer you 
properly.
What you can do is activate the PovRay rendering addon then render the 
scene. This will allow you to open the generated .pov file and extract 
the mesh2 object. You can then edit it manually to add the inside_vector.
In blender the shortcut for making the normals consistent is (in edit 
mode or it will open a new scene file) Ctrl + n or to make them face 
inward is Ctrl + Shift + n

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 15 Aug 2017 08:10:00
Message: <web.5992e379db2ef770c437ac910@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
Where can I find the option to add an "inside_vector",
> and specify its direction?

As Stephen pointed out, I don't think that's an option in Blender, because it's
a mesh modeler, not a mathematical primitive modeler like POV-Ray which uses
"real" 3D shapes.

Check out the foloowinf=g to get an idea:
https://blender.stackexchange.com/questions/5849/how-do-i-create-a-solid-object-cube

A mesh sphere is mathematically a 2D object, because you only need 2 data points
to specify a location on its surface.  It's like a hollow soap bubble with no
soap filling.

Right now, you only have a frozen fragment of the surface of that bubble - so
what you can do is either add more faces to complete/close the shell as shown in
the above link (or create a 'solid' spherical wedge [a cone]),
or,
you [manually] tell POV-Ray which direction is the outward facing side of your
mesh, and which direction is the inside-facing direction (by editing the text
file output by Blender), and then use CSG to have POV-Ray construct a truly 3D
shape.

Another option you might try, just because it's another possibility, is giving
your mesh a y-gradient pigment with white for the high points and black for the
low points, and telling POV-Ray to use that as a heightfield.  Then you can do
CSG on the heightfield.

There are probably more, and more clever, and more complicated methods of
accomplishing the goal, but Keep It Simple, and find a fast and reliable way to
get the task done.


Post a reply to this message

From: Mr
Subject: Re: QUESTION: STL to POV (INC)?
Date: 15 Aug 2017 19:15:00
Message: <web.59937fd4db2ef77061ea16670@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 8/15/2017 8:34 AM, Sven Littkowski wrote:
> > I am trying to follow up now your advise. I opened Blender 2.78, and
> > imported the STL file (MarsVallesMarineris2). But I never worked with
> > Blender before. Where can I find the option to add an "inside_vector",
> > and specify its direction?
> >
> > Might be, I have to ask you a few more things afterwards. But only 1x,
> > soon i will be able to do it by myself. Hope you don't mind.
>
> I don't know if you can, Sven. But maybe Mr will be able to answer you
> properly.
> What you can do is activate the PovRay rendering addon then render the
> scene. This will allow you to open the generated .pov file and extract
> the mesh2 object. You can then edit it manually to add the inside_vector.
> In blender the shortcut for making the normals consistent is (in edit
> mode or it will open a new scene file) Ctrl + n or to make them face
> inward is Ctrl + Shift + n
>
> --
>
> Regards
>      Stephen

Hi, Reading this made me add a few of Lanuhum's properties among which the
"hollow" keyword option to objects properties interface, otherwise objects are
solid or as much as pov does it. The inside_vector wasn't supported yet but
maybe we could add it using the object's origin. that way, if people want a
specific inside vector they can just mov object's origin knowing that its
coordinates will be used for inside vector?


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 15 Aug 2017 22:45:24
Message: <5993b1c4$1@news.povray.org>
On 15.08.2017 03:34, clipka wrote:
> The mesh files provided by NASA are certainly just the surface, and
> since it's not the entire planet but just a tile (or so I guess),
> turning it into a solid 3D volume isn't trivial. You'll need to proceed
> as follows:
>
> (1) Generate the mesh INC file.
>
> At this point, all you have is a mesh patch object, i.e. a genuinely
> non-solid sheet.
>
> (2) To the mesh, add an `inside_vector` specifying whatever direction is
> supposed to be "up" with respect to the tile.
>
> At this point, you have a chimera between a solid and a patch: It now
> has a well-defined inside (namely every point that is "below" the tile,
> i.e. the tile extruded "downwards" toward infinity). The surface
> definition is still patchy though (pun intended), so right now you won't
> see any effect, because POV-Ray can only render surfaces, not volumes.
>
> Note however that this chimera is already good enough to start "digging"
> using CSG.
>
> (3) Intersect the mesh with another object, e.g. a box, defining the
> dimensions of the "massive block" you want.
>
> Make sure that for any point on the box that is supposed to be "below"
> the landscape, if you trace a line in the direction given by the
> `inside_vector`, it should properly intersect the mesh (note that
> grazing it might not be enough).
>
> This step will add surfaces to the "sides" and the "bottom" of your
> block of landscape, so that they can be seen as well. If that's not a
> thing you need, this third step is entirely optional.

Thanks.

When talking about that "inside_Vector", I refer to Clipka's information
he gave me, when I mentioned that I wanted to have solid shapes (and not
hollow meshes) for POV-Ray.

My understanding of Clipka's information was, that I should open the STL
meshes in Blender and that I would find there an option to add that
mysterious "inside_vector".

When you all read Clipka's instructions, what is your understanding? I
still want to assume his information is correct.

Please continue to provide assistance to me in regards to make my NASA
STL meshes solid. Thanks.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 00:25:22
Message: <5993c932$1@news.povray.org>
On 15.08.2017 05:25, Stephen wrote:
> On 8/15/2017 8:34 AM, Sven Littkowski wrote:
>> I am trying to follow up now your advise. I opened Blender 2.78, and
>> imported the STL file (MarsVallesMarineris2). But I never worked with
>> Blender before. Where can I find the option to add an "inside_vector",
>> and specify its direction?
>>
>> Might be, I have to ask you a few more things afterwards. But only 1x,
>> soon i will be able to do it by myself. Hope you don't mind.
> 
> I don't know if you can, Sven. But maybe Mr will be able to answer you
> properly.
> What you can do is activate the PovRay rendering addon then render the
> scene. This will allow you to open the generated .pov file and extract
> the mesh2 object. You can then edit it manually to add the inside_vector.

> In blender the shortcut for making the normals consistent is (in edit
> mode or it will open a new scene file) Ctrl + n or to make them face
> inward is Ctrl + Shift + n
> 
How can I activate the EDIT mode in Blender? I am really a beginner with
Blender.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 01:28:22
Message: <5993d7f6$1@news.povray.org>
On 8/16/2017 4:24 AM, Sven Littkowski wrote:
> On 15.08.2017 05:25, Stephen wrote:

>> What you can do is activate the PovRay rendering addon then render the
>> scene. This will allow you to open the generated .pov file and extract
>> the mesh2 object. You can then edit it manually to add the inside_vector.
>> In blender the shortcut for making the normals consistent is (in edit
>> mode or it will open a new scene file) Ctrl + n or to make them face
>> inward is Ctrl + Shift + n
>>
> How can I activate the EDIT mode in Blender? I am really a beginner with
> Blender.
>

There is a lot of learning and Blender does not use the usual shortcuts.

Keeping your eye on the top status line that will tell you how many 
objects you have selected. (That is the info screen which is normally 
positioned at the top with only the status line showing.)
"a" toggles selecting all or none. Right click your object to select it.
"Tab" toggles between Object and Edit mode. Or you can use the drop down 
on the bottom status line of the 3D view.
Again "a" toggles selecting all or no vertices, lines or faces.
Ctrl Z or Object > Undo history can be useful. ;)

It is good practice to always press Ctrl N when you have finished 
editing. Otherwise you might get strange shadows in your render.

But as Mr has pointed out inside vector is not supported in Blender.

-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 01:45:02
Message: <5993dbde$1@news.povray.org>
On 8/16/2017 2:44 AM, Sven Littkowski wrote:
> On 15.08.2017 03:34, clipka wrote:
>> The mesh files provided by NASA are certainly just the surface, and
>> since it's not the entire planet but just a tile (or so I guess),
>> turning it into a solid 3D volume isn't trivial. You'll need to proceed
>> as follows:
>>
>> (1) Generate the mesh INC file.
>>
>> At this point, all you have is a mesh patch object, i.e. a genuinely
>> non-solid sheet.
>>
>> (2) To the mesh, add an `inside_vector` specifying whatever direction is
>> supposed to be "up" with respect to the tile.
>>
>> At this point, you have a chimera between a solid and a patch: It now
>> has a well-defined inside (namely every point that is "below" the tile,
>> i.e. the tile extruded "downwards" toward infinity). The surface
>> definition is still patchy though (pun intended), so right now you won't
>> see any effect, because POV-Ray can only render surfaces, not volumes.
>>
>> Note however that this chimera is already good enough to start "digging"
>> using CSG.
>>
>> (3) Intersect the mesh with another object, e.g. a box, defining the
>> dimensions of the "massive block" you want.
>>
>> Make sure that for any point on the box that is supposed to be "below"
>> the landscape, if you trace a line in the direction given by the
>> `inside_vector`, it should properly intersect the mesh (note that
>> grazing it might not be enough).
>>
>> This step will add surfaces to the "sides" and the "bottom" of your
>> block of landscape, so that they can be seen as well. If that's not a
>> thing you need, this third step is entirely optional.
>
> Thanks.
>
> When talking about that "inside_Vector", I refer to Clipka's information
> he gave me, when I mentioned that I wanted to have solid shapes (and not
> hollow meshes) for POV-Ray.
>
> My understanding of Clipka's information was, that I should open the STL
> meshes in Blender and that I would find there an option to add that
> mysterious "inside_vector".
>
> When you all read Clipka's instructions, what is your understanding? I
> still want to assume his information is correct.
>

How I read the instructions you posted above is:
Open the STL file in Blender and export the mesh as an Obj or 3ds 
object. Convert that using PoseRay to use the mesh in PovRay. (or use 
the PovRay exporter to export it to a pov file directly by rendering it. 
(You will need to deselect the "delete" flag in the Render tab of the 
properties screen, camera icon)

> Please continue to provide assistance to me in regards to make my NASA
> STL meshes solid. Thanks.
>

https://blender.stackexchange.com/questions
Is a good site to ask Blender questions unrelated to PovRay.


> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
>


-- 

Regards
     Stephen


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 04:33:09
Message: <59940345$1@news.povray.org>
On 16.08.2017 01:28, Stephen wrote:
> On 8/16/2017 4:24 AM, Sven Littkowski wrote:
>> On 15.08.2017 05:25, Stephen wrote:
> 
>>> What you can do is activate the PovRay rendering addon then render the
>>> scene. This will allow you to open the generated .pov file and extract
>>> the mesh2 object. You can then edit it manually to add the
>>> inside_vector.
>>> In blender the shortcut for making the normals consistent is (in edit
>>> mode or it will open a new scene file) Ctrl + n or to make them face
>>> inward is Ctrl + Shift + n
>>>
>> How can I activate the EDIT mode in Blender? I am really a beginner with

>> Blender.
>>
> 
> There is a lot of learning and Blender does not use the usual shortcuts.
> 
> Keeping your eye on the top status line that will tell you how many
> objects you have selected. (That is the info screen which is normally
> positioned at the top with only the status line showing.)
> "a" toggles selecting all or none. Right click your object to select it.
> "Tab" toggles between Object and Edit mode. Or you can use the drop down
> on the bottom status line of the 3D view.
> Again "a" toggles selecting all or no vertices, lines or faces.
> Ctrl Z or Object > Undo history can be useful. ;)
> 
> It is good practice to always press Ctrl N when you have finished
> editing. Otherwise you might get strange shadows in your render.
> 
> But as Mr has pointed out inside vector is not supported in Blender. 
> 

Thanks, got the editing mode. :-)

I really have to all this step-by-step. :-(

You wrote: "In blender the shortcut for making the normals consistent is
(in edit mode or it will open a new scene file) Ctrl + n or to make them
face inward is Ctrl + Shift + n".

What is the meaning of "making normals consistent", and of "make normals
face inwards"? I need to understand this. And ... sorry for all my
questions. :-)

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 05:20:33
Message: <59940e61@news.povray.org>
On 8/16/2017 9:33 AM, Sven Littkowski wrote:
> Thanks, got the editing mode.:-)
>

Good :-)

> I really have to all this step-by-step.:-(
>

The best way until you don't need to think about it.

> You wrote: "In blender the shortcut for making the normals consistent is
> (in edit mode or it will open a new scene file) Ctrl + n or to make them
> face inward is Ctrl + Shift + n".
>
> What is the meaning of "making normals consistent", and of "make normals
> face inwards"? I need to understand this. And ... sorry for all my

I am still learning too. You need a different way of thinking using a 
mesh modeller than to using Pov. But the Blender community is very 
helpful so for blender issues GIYF. ;-)
Maybe this link will help.

https://docs.blender.org/manual/ja/dev/modeling/meshes/editing/normals.html


This has nothing to do with your original post, btw.


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 08:00:00
Message: <web.5994334adb2ef770c437ac910@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 8/16/2017 9:33 AM, Sven Littkowski wrote:

> > What is the meaning of "making normals consistent", and of "make normals
> > face inwards"? I need to understand this. And ... sorry for all my

> https://docs.blender.org/manual/ja/dev/modeling/meshes/editing/normals.html

Blender probably has some very nice code to make sure that all of your triangles
in your mesh have all the sides "pointing the right way" - rather than having
some of them (using a coin analogy) tail side up rather than head side up.

See what that might look like below:

http://news.povray.org/povray.binaries.images/thread/%3Cweb.57b4f3192c2caea5e7df57c0@news.povray.org%3E/?ttop=413577&to
ff=50

you can probably test for this in your scene by defining both a texture{} AND a
contrasting interior_texture{}.


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 10:01:44
Message: <59945048$1@news.povray.org>
On 8/16/2017 12:58 PM, Bald Eagle wrote:
> Stephen <mca### [at] aolcom> wrote:
>> On 8/16/2017 9:33 AM, Sven Littkowski wrote:
>
>>> What is the meaning of "making normals consistent", and of "make normals
>>> face inwards"? I need to understand this. And ... sorry for all my
>
>> https://docs.blender.org/manual/ja/dev/modeling/meshes/editing/normals.html
>
> Blender probably has some very nice code to make sure that all of your triangles
> in your mesh have all the sides "pointing the right way" - rather than having
> some of them (using a coin analogy) tail side up rather than head side up.
>
> See what that might look like below:
>
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.57b4f3192c2caea5e7df57c0@news.povray.org%3E/?ttop=413577&to
> ff=50
>
> you can probably test for this in your scene by defining both a texture{} AND a
> contrasting interior_texture{}.
>
>
As far as Blender goes. I am only an egg. I have not gotten round to 
needing that yet. But I know what you mean.
Because Blender displays the scene using OpenGL it is obvious if a face 
is A for Elbow when using a material or texture viewport.

Oh! I see you were replying to Sven but I'm not going to waste my typing. :)


-- 

Regards
     Stephen


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 16 Aug 2017 23:50:01
Message: <web.5995119fdb2ef770883fb31c0@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
>
> You wrote: "In blender the shortcut for making the normals consistent is
> (in edit mode or it will open a new scene file) Ctrl + n or to make them
> face inward is Ctrl + Shift + n".
>
> What is the meaning of "making normals consistent", and of "make normals
> face inwards"? I need to understand this.

I have never used Blender, but the analogy in POV-Ray would be this:

A mesh object-- like a simple sphere, for example-- should have ALL of the
triangles' normals facing OUTWARD into the surrounding space, for the sphere to
render correctly. Those would be "consistent normals." Any mesh-creation tool
should do that automatically-- if it's working correctly ;-) But if a triangle
happens to be made 'incorrectly' (that is, the three vector-location-points of a
particular triangle are simply written in the 'reverse order' to what they
should be, looking face-on at the triangle), its normal will actually face in
the opposite direction(!), and will not render correctly. (Or rather, it will
show the INSIDE texture, if the object has one.) BTW, this is a typical mistake
when trying to write triangle vectors *manually*; it's hard to keep track of the
necessary and consistent 'orientation' from triangle to triangle.

Making all the normals "face inwards" would be the opposite of the above. I'm
not clear as to why that would be necessary, but I guess it can be done. (I
don't know if POV-Ray's 'inverse' keyword-- when applied to an object to change
its 'outside' to its 'inside') switches the normals as well; I never thought to
test it.)


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 00:21:00
Message: <599519ac$1@news.povray.org>
On 8/17/2017 4:46 AM, Kenneth wrote:
> I have never used Blender, but the analogy in POV-Ray would be this:
>
> A mesh object-- like a simple sphere, for example-- should have ALL of the
> triangles' normals facing OUTWARD into the surrounding space, for the sphere to
> render correctly. Those would be "consistent normals." Any mesh-creation tool
> should do that automatically-- if it's working correctly;-)But if a triangle
> happens to be made 'incorrectly' (that is, the three vector-location-points of a
> particular triangle are simply written in the 'reverse order' to what they
> should be, looking face-on at the triangle), its normal will actually face in
> the opposite direction(!), and will not render correctly.

Yes, this fits in with my experience.
When you manually edit a mesh you can do it in a way that is ambiguous 
to the modeller. Hence the need to make the normals consistent.


> (Or rather, it will
> show the INSIDE texture, if the object has one.) BTW, this is a typical mistake
> when trying to write triangle vectors*manually*; it's hard to keep track of the
> necessary and consistent 'orientation' from triangle to triangle.
>
> Making all the normals "face inwards" would be the opposite of the above. I'm
> not clear as to why that would be necessary, but I guess it can be done.

If you wanted to make a solid looking pipe. You could create a cylinder, 
copy the outside faces and scale them down to create the inside of the 
pipe. Those normals will still be pointing outwards. To get the inside 
of the pipe to render properly you reverse them to point inwards. For 
example.

> (I don't know if POV-Ray's 'inverse' keyword-- when applied to an object to change
> its 'outside' to its 'inside') switches the normals as well; I never thought to
> test it.)


-- 

Regards
     Stephen


Post a reply to this message

From: Mr
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 04:50:01
Message: <web.59955824db2ef77016086ed00@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 8/16/2017 4:24 AM, Sven Littkowski wrote:
> > On 15.08.2017 05:25, Stephen wrote:
>
> >> What you can do is activate the PovRay rendering addon then render the
> >> scene. This will allow you to open the generated .pov file and extract
> >> the mesh2 object. You can then edit it manually to add the inside_vector.
> >> In blender the shortcut for making the normals consistent is (in edit
> >> mode or it will open a new scene file) Ctrl + n or to make them face
> >> inward is Ctrl + Shift + n
> >>
> > How can I activate the EDIT mode in Blender? I am really a beginner with
> > Blender.
> >
>
> There is a lot of learning and Blender does not use the usual shortcuts.
>
> Keeping your eye on the top status line that will tell you how many
> objects you have selected. (That is the info screen which is normally
> positioned at the top with only the status line showing.)
> "a" toggles selecting all or none. Right click your object to select it.
> "Tab" toggles between Object and Edit mode. Or you can use the drop down
> on the bottom status line of the 3D view.
> Again "a" toggles selecting all or no vertices, lines or faces.
> Ctrl Z or Object > Undo history can be useful. ;)
>
> It is good practice to always press Ctrl N when you have finished
> editing. Otherwise you might get strange shadows in your render.
>
> But as Mr has pointed out inside vector is not supported in Blender.
>
> --
>
> Regards
>      Stephen

Indeed I added it while reading this discussion but it's currently commented out
as it's related only to CSG that's not implemented yet, best for now is to add
it by hand in the exported file, but next release might have it if I manage.


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 07:31:53
Message: <59957ea9$1@news.povray.org>
On 16.08.2017 04:33, Sven Littkowski wrote:
> On 16.08.2017 01:28, Stephen wrote:
>> On 8/16/2017 4:24 AM, Sven Littkowski wrote:
>>> On 15.08.2017 05:25, Stephen wrote:
>>
>>>> What you can do is activate the PovRay rendering addon then render the
>>>> scene. This will allow you to open the generated .pov file and extract
>>>> the mesh2 object. You can then edit it manually to add the
>>>> inside_vector.
>>>> In blender the shortcut for making the normals consistent is (in edit
>>>> mode or it will open a new scene file) Ctrl + n or to make them face
>>>> inward is Ctrl + Shift + n
>>>>
>>> How can I activate the EDIT mode in Blender? I am really a beginner with
>>> Blender.
>>>
>>
>> There is a lot of learning and Blender does not use the usual shortcuts.
>>
>> Keeping your eye on the top status line that will tell you how many
>> objects you have selected. (That is the info screen which is normally
>> positioned at the top with only the status line showing.)
>> "a" toggles selecting all or none. Right click your object to select it.
>> "Tab" toggles between Object and Edit mode. Or you can use the drop down
>> on the bottom status line of the 3D view.
>> Again "a" toggles selecting all or no vertices, lines or faces.
>> Ctrl Z or Object > Undo history can be useful. ;)
>>
>> It is good practice to always press Ctrl N when you have finished
>> editing. Otherwise you might get strange shadows in your render.
>>
>> But as Mr has pointed out inside vector is not supported in Blender. 
>>
> 
> Thanks, got the editing mode. :-)
> 
> I really have to all this step-by-step. :-(
> 
> You wrote: "In blender the shortcut for making the normals consistent is
> (in edit mode or it will open a new scene file) Ctrl + n or to make them
> face inward is Ctrl + Shift + n".
> 
> What is the meaning of "making normals consistent", and of "make normals
> face inwards"? I need to understand this. And ... sorry for all my
> questions. :-)
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 
Thanks everyone. But I admit, I am feeling more and more frustrated with
this project - no progress or any success up to now.

Blender is a book with seven seals for me, cannot use it properly. And
the explanations I received, so far, are irritating me as I am not
English. I switched on the POV-Ray plugin, but don't know yet how to
create a POV-Ray scene file with Blender (mesh2).

What I want is this: being able to "dig" tunnels into these Martian
landscapes in my render scenes. I believe, these square-shaped landscape
meshes from NASA should be solid for that, am I right?


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 08:05:01
Message: <web.59958566db2ef770c437ac910@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> Hi, there is the NASA 3D Resources website, offering various vehicles
> and planetary landscapes as 3D models, formats OBJ and STL.
>
> 1. Is there any OBJ to POV converter?

STL to pov, yes.
https://www.google.com/search?q=stl2pov

OBJ to POV - Poseray
http://www.povray.org/resources/links/3D_Programs/Conversion_Utilities/


I'd probably take the time to do a VERY tiny test scene to get all the comands
and syntaxes worked out, so that you're making it as easy as possible for
yourself.

After that, you can just swap out one mesh for the other.

I find it easiest to use mesh files by treating them as include files.

The triangles in a mesh have a "handedness" - an axial chirality.
Give a "thumbs up" with your left hand, and if you order your triangle vertices
in the order that your fingers curl, then the normal points up like your thumb.

Order them in the reverse direction, and then the normal points in the opposite
direction - "thumbs down"

I'd stop trying to use Blender if you want to render your scene in POV-Ray ----
just convert your OBJ or STL to a mesh, and then do all the fine-tuning in
POV-ray.

AND, as you know, you can post a (small) mesh and your scene file, and then
someone can edit it to get it to work.


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 08:28:37
Message: <59958bf5$1@news.povray.org>
On 17.08.2017 08:00, Bald Eagle wrote:
> Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
>> Hi, there is the NASA 3D Resources website, offering various vehicles
>> and planetary landscapes as 3D models, formats OBJ and STL.
>>
>> 1. Is there any OBJ to POV converter?
> 
> STL to pov, yes.
> https://www.google.com/search?q=stl2pov
> 
> OBJ to POV - Poseray
> http://www.povray.org/resources/links/3D_Programs/Conversion_Utilities/
> 
> 
> I'd probably take the time to do a VERY tiny test scene to get all the comands
> and syntaxes worked out, so that you're making it as easy as possible for
> yourself.
> 
> After that, you can just swap out one mesh for the other.
> 
> I find it easiest to use mesh files by treating them as include files.
> 
> The triangles in a mesh have a "handedness" - an axial chirality.
> Give a "thumbs up" with your left hand, and if you order your triangle vertices
> in the order that your fingers curl, then the normal points up like your thumb.
> 
> Order them in the reverse direction, and then the normal points in the opposite
> direction - "thumbs down"
> 
> I'd stop trying to use Blender if you want to render your scene in POV-Ray ----
> just convert your OBJ or STL to a mesh, and then do all the fine-tuning in
> POV-ray.
> 
> AND, as you know, you can post a (small) mesh and your scene file, and then
> someone can edit it to get it to work.
> 
> 
Thanks. Actually, I did that search some weeks ago, and downloaded the
DOS command-line tool STL2POV. But upon encountering problems with doing
it that way, I started to post here inside the POV newsgroup. Don't even
remember at the moment, what sort of problems I encountered.

Basically, out of these NASA-provided square-shaped Martian terrain
meshes, I want to create solid bodies. Because I want to "dig"
(difference) tunnels into the Martian terrain, in my scenes later on.

I remember now: the resulting meshes in POV-Ray were full of
distortions, insane spikes. STL2POV is not a good solution.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 08:29:38
Message: <59958c32$1@news.povray.org>
On 8/17/2017 1:00 PM, Bald Eagle wrote:
> I'd stop trying to use Blender if you want to render your scene in POV-Ray ----
> just convert your OBJ or STL to a mesh, and then do all the fine-tuning in
> POV-ray.
>

I think that is probably the best idea.
STL > OBJ > Mesh 2

Blender is an all things to all people program and there is so much to 
learn.

> AND, as you know, you can post a (small) mesh and your scene file, and then
> someone can edit it to get it to work.

Actually I might download one of the Martian landscapes (Sven, which one 
are you using?) and see what I can do. But first I am trying to unlock a 
HDD from an old PVR and having problems with it and the utility I am 
using hdat2.exe
So it might take a while.

-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 08:39:11
Message: <59958e6f@news.povray.org>
Am 16.08.2017 um 01:12 schrieb Mr:

> Hi, Reading this made me add a few of Lanuhum's properties among which the
> "hollow" keyword option to objects properties interface, otherwise objects are
> solid or as much as pov does it.

Does that option directly correspond to POV-Ray's `hollow on` object
modifier, or does it do something different?

> The inside_vector wasn't supported yet but
> maybe we could add it using the object's origin. that way, if people want a
> specific inside vector they can just mov object's origin knowing that its
> coordinates will be used for inside vector?

The `inside_vector` parameter is /not/ a location, but a direction,
serving a rather technical purpose.

The background is that in order to test whether a point P is inside a
mesh or not, POV-Ray shoots a ray in the direction specified by
`inside_vector`, and counts the number of intersections with the mesh.
If it finds an odd number of intersections in that direction, P is
considered inside, otherwise it is considered outside.


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 08:48:16
Message: <59959090$1@news.povray.org>
Am 16.08.2017 um 03:44 schrieb Sven Littkowski:

> When talking about that "inside_Vector", I refer to Clipka's information
> he gave me, when I mentioned that I wanted to have solid shapes (and not
> hollow meshes) for POV-Ray.
> 
> My understanding of Clipka's information was, that I should open the STL
> meshes in Blender and that I would find there an option to add that
> mysterious "inside_vector".

Actually no; the workflow I tried to suggest was to export the mesh to
POV-Ray format as usual, then edit the generated POV-Ray file manually,
adding `inside_vector y` (or whatever direction corresponds to "up") to
the mesh.


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 12:25:01
Message: <web.5995c262db2ef770c437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> The background is that in order to test whether a point P is inside a
> mesh or not, POV-Ray shoots a ray in the direction specified by
> `inside_vector`, and counts the number of intersections with the mesh.
> If it finds an odd number of intersections in that direction, P is
> considered inside, otherwise it is considered outside.

I'd be interested in seeing a diagram of this - and I thought about coding one
up myself - potentially for use in the docs (since this comes up a lot)

But the information that I need to do that is:
POV-ray shoots a ray in the direction specified by `inside_vector` _FROM_ ---
where?


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 15:05:00
Message: <web.5995dcd0db2ef770883fb31c0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

>
> But the information that I need to do that is:
> POV-ray shoots a ray in the direction specified by `inside_vector` _FROM_ ---
> where?

That's something I've wondered about as well.

From newsgroup comments years ago, my own understanding about inside_vector is
currently this (and I could be wrong):

1) it isn't used until the mesh is CSG'd with some other object.

2) Perhaps the 'shoot-from point' (or from *multiple* points) is actually the
surface of the other intersecting object. That would *seem* to make sense--
because a successful vector direction should naturally point toward the inside
of the now-partial 'hull' (of the mesh object), *as seen from* the other
object's surface.  And if the mesh isn't a completely CLOSED one-- if there's a
'hole' in the mesh somewhere-- then the chosen inside_vector direction (if not a
'good' one) could conceivably point at that hole, with NO surface triangle being
detected there... resulting in that particular part of the CSG construct not
being rendered at all. (Possibly an example of the 'odd/even' rule that Clipka
mentioned?-- a hole returning 'ZERO intersections', which is 'even'.)

It's also my understanding that each and every triangle of the 'partial CSG'd
hull' is tested with the inside_vector. In other words, it isn't just a one-time
affair.

That's about as far as I've gotten ;-)


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 15:20:00
Message: <web.5995ebe8db2ef770c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> 2) Perhaps the 'shoot-from point' (or from *multiple* points)

I would think it would HAVE to be multiple points - because
(a) if it were just a single point, then
     (1) it wouldn't make any sense, as there would only ever be one ray
     (2) and/or you'd get a solid wedge of sorts
(b) if you only "scan" along that single vector - let's say, starting from any
point along the other object's bounding box - then how do you handle the case(s)
where the triangle being tested is perfectly parallel to the ray?
How many intersection would it be calculated as?

This suggests that a similar mechanism might be used in reverse to take a
non-mesh object and construct a point cloud where the ray-[object]surface
intersection points are.  Then "just" triangulate the point cloud.


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 16:24:15
Message: <5995fb6f$1@news.povray.org>
On 17.08.2017 08:48, clipka wrote:
> Am 16.08.2017 um 03:44 schrieb Sven Littkowski:
> 
>> When talking about that "inside_Vector", I refer to Clipka's information

>> he gave me, when I mentioned that I wanted to have solid shapes (and not

>> hollow meshes) for POV-Ray.
>>
>> My understanding of Clipka's information was, that I should open the STL

>> meshes in Blender and that I would find there an option to add that
>> mysterious "inside_vector".
> 
> Actually no; the workflow I tried to suggest was to export the mesh to
> POV-Ray format as usual, then edit the generated POV-Ray file manually,
> adding `inside_vector y` (or whatever direction corresponds to "up") to
> the mesh.
> 
Ohhhh, okay. That is now one of the clarifications I needed. Thanks. :-)

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Alain
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 16:33:29
Message: <5995fd99@news.povray.org>
Le 17-08-17 à 15:18, Bald Eagle a écrit :
> "Kenneth" <kdw### [at] gmailcom> wrote:
> 
>> 2) Perhaps the 'shoot-from point' (or from *multiple* points)
> 
> I would think it would HAVE to be multiple points - because
> (a) if it were just a single point, then
>       (1) it wouldn't make any sense, as there would only ever be one ray
>       (2) and/or you'd get a solid wedge of sorts
> (b) if you only "scan" along that single vector - let's say, starting from any
> point along the other object's bounding box - then how do you handle the case(s)
> where the triangle being tested is perfectly parallel to the ray?
> How many intersection would it be calculated as?

The answer for this one is NAN (Not A Number)

> 
> This suggests that a similar mechanism might be used in reverse to take a
> non-mesh object and construct a point cloud where the ray-[object]surface
> intersection points are.  Then "just" triangulate the point cloud.
> 
> 
> 

The test ray is shot from amy point that need to be tested to see wether 
or not it's inside the mesh.

The case of a triangle been perfectly parallel to the vector do exist 
and lead to artefacts. In that case, you need to slightly alter the 
direction of the vector. Adding something like +0.000001 to one of the 
components should be enough in most cases, but there are situations 
where it can cause another triangle to become parallel to the vector.


Post a reply to this message

From: Alain
Subject: Re: QUESTION: STL to POV (INC)?
Date: 17 Aug 2017 16:37:35
Message: <5995fe8f@news.povray.org>
Le 17-08-17 à 15:23, Sven Littkowski a écrit :
> On 17.08.2017 08:48, clipka wrote:
>> Am 16.08.2017 um 03:44 schrieb Sven Littkowski:
>>
>>> When talking about that "inside_Vector", I refer to Clipka's information
>>> he gave me, when I mentioned that I wanted to have solid shapes (and not
>>> hollow meshes) for POV-Ray.
>>>
>>> My understanding of Clipka's information was, that I should open the STL
>>> meshes in Blender and that I would find there an option to add that
>>> mysterious "inside_vector".
>>
>> Actually no; the workflow I tried to suggest was to export the mesh to
>> POV-Ray format as usual, then edit the generated POV-Ray file manually,
>> adding `inside_vector y` (or whatever direction corresponds to "up") to
>> the mesh.
>>
> Ohhhh, okay. That is now one of the clarifications I needed. Thanks. :-)
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 

One last thing : You need to add the inside_vector at the end ot the 
mesh's definition. Normally, it's just before it's last closing brace "}".


Post a reply to this message

From: Thomas de Groot
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 02:48:30
Message: <59968dbe$1@news.povray.org>
On 17-8-2017 13:28, Sven Littkowski wrote:

> I remember now: the resulting meshes in POV-Ray were full of
> distortions, insane spikes. STL2POV is not a good solution.
> 
Hmmm... either that or (1) the stl files are corrupt or (2) normals are 
/not/ consistently outward oriented. I recognise those spikes when 
working on a badly modelled object in Silo.

Thomas


Post a reply to this message

From: Mr
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 05:20:00
Message: <web.5996b056db2ef77016086ed00@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 16.08.2017 um 01:12 schrieb Mr:
>
> > Hi, Reading this made me add a few of Lanuhum's properties among which the
> > "hollow" keyword option to objects properties interface, otherwise objects are
> > solid or as much as pov does it.
>
> Does that option directly correspond to POV-Ray's `hollow on` object
> modifier, or does it do something different?
>
The same yes

> > The inside_vector wasn't supported yet but
> > maybe we could add it using the object's origin. that way, if people want a
> > specific inside vector they can just mov object's origin knowing that its
> > coordinates will be used for inside vector?
>
> The `inside_vector` parameter is /not/ a location, but a direction,
> serving a rather technical purpose.
>
> The background is that in order to test whether a point P is inside a
> mesh or not, POV-Ray shoots a ray in the direction specified by
> `inside_vector`, and counts the number of intersections with the mesh.
> If it finds an odd number of intersections in that direction, P is
> considered inside, otherwise it is considered outside.

Indeed I realised this and first thought about using the object center's
orientation, but this could have led to too many problems when animating...
therefore I chose another solution: a simple interface xyz field where to fill
in numbers of the vector this will appear only when a boolean modifier is on,
which I intend to use as interface to CSG

To Sven, do not get scared in believing you need to "learn Blender", actually
three steps after opening the software are enough to create a pov file with it,
They are explained here:
https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/POV-Ray#Quick_Start

In your case, you need to add the extra steps below:
*4 right click default cube to select it hit SUPPR and Enter to delete it
*5 going to the menu File > Import > STL, pick your original data.
*6 uncheck the car icon to deactivate automatic initial options and temporary
file naming, also uncheck the "Delete files" option and check "POV Editor" if
you installed Povwin
*7 fill in a file name and folder

Then just hit F12. and after the first render, Povwin will stay open, you can
just use it to navigate to the pov file of your chosen location.
modify/save/rerender it,

*8 come back here, report any problems


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 06:29:40
Message: <5996c194@news.povray.org>
On 18.08.2017 05:16, Mr wrote:
> uncheck the car icon 

8: where is that car icon? I searched the GUI, and also the top menus.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 06:39:12
Message: <5996c3d0$1@news.povray.org>
On 17.08.2017 08:29, Stephen wrote:
> Actually I might download one of the Martian landscapes (Sven, which one
> are you using?) and see what I can do. 

https://nasa3d.arc.nasa.gov/models

Contents of folder "C:\Documents\My 3D\STL\Space":
AsteroidVestaWhole.stl
MarsGaleCrater-209kmAcross.stl
MarsGaleCrater-3xV.stl
MarsPahrumpHills1.obj
MarsPahrumpHills2.obj
MarsTharsisRegion6xv.stl
MarsVallesMarineris1.stl
MarsVallesMarineris2.stl
MarsVallesMarineris3.stl
MoonAristarchusRegion3xV.stl
MoonCopernicusCrater3xV.stl
MoonFarSide.stl
MoonGassendiCrater3xV.stl
MoonNearSide.stl

Yes, I encourage you to download those files. And if you like, I invite
you and everyone else here to join me and to sit seriously together to
make concepts for different types of Moon and Mars bases: which parts
can be underground, and which parts have to remain on the surface, what
materials to be used, what areas the bases would consist of, energy
sources, food sources, and all that. Even texture development.



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Thomas de Groot
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 07:16:47
Message: <5996cc9f$1@news.povray.org>
OK. I think I got an easy and safe method for you to follow:

1) If you do not have it already, download Meshlab 
(http://www.meshlab.net/) and install it.

2) open Meshlab and load the stl mesh.

3) Open 'Export Mesh As...' and export the mesh as an obj file.

4) Open Poseray and load the obj mesh.

5) Go to the 'Groups' folder and press 'Recalculate normals'.

6) Go to the 'POV-Ray Output' folder and export the mesh to POV-Ray 
(results in a mesh2 include file).

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 08:05:00
Message: <web.5996d747db2ef770c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:

> > But the information that I need to do that is:
> > POV-ray shoots a ray in the direction specified by `inside_vector` _FROM_ ---
> > where?
>
> That's something I've wondered about as well.

I did a wee bit more digging, and I found this from the megapov docs:

"To determine if a point is inside a triangle mesh, POV-Ray shoots a ray from
the point in some arbitrary direction (the default is <1, 0, 0>). If this vector
intersects an odd number of triangles, the point is inside the mesh. If it
intersects an even number of triangles, the point is outside of the mesh. You
can specify the direction of this vector. For example, to use +z as the
direction, you would add the following line to the triangle mesh description
(following all other mesh data, but before the object modifiers)."

So it's taking a point that it needs to know whether it's inside or outside the
mesh, and shooting a ray from that point in the direction of the vector you
supply.  So there ARE multiple points - all of the points being tested.

My guess is that the vector can be supplied as a 'tweak' to override the default
value in case there are any weird artefacts showing up due to the cases I
mentioned before.  Skootch the vector a little one way or the other, or give it
a good 30-6-90 degree twist, and you may get a vastly better rendering.


Post a reply to this message

From: Mr
Subject: Re: QUESTION: STL to POV (INC)?
Date: 18 Aug 2017 09:30:01
Message: <web.5996ebacdb2ef77016086ed00@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> On 18.08.2017 05:16, Mr wrote:
> > uncheck the car icon
>
> 8: where is that car icon? I searched the GUI, and also the top menus.
>
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com

Unchecking OS Tempfiles in export settings of older versions, was similar to
unchecking the car icon, in most recent downloads of the script :

https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/POV-Ray#Download


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 19 Aug 2017 03:01:59
Message: <5997e267$1@news.povray.org>
On 18.08.2017 07:16, Thomas de Groot wrote:
> OK. I think I got an easy and safe method for you to follow:
> 1) If you do not have it already, download Meshlab
> (http://www.meshlab.net/) and install it.
> 2) open Meshlab and load the stl mesh.
> 3) Open 'Export Mesh As...' and export the mesh as an obj file.
> 4) Open Poseray and load the obj mesh.
> 5) Go to the 'Groups' folder and press 'Recalculate normals'.
> 6) Go to the 'POV-Ray Output' folder and export the mesh to POV-Ray
> (results in a mesh2 include file).
> 
YES! Finally I got these objects into the POV-Ray scene language!
This was the first challenge.

For the 2nd challenge, seeing all these many posting here in this
thread, I would prefer to open a new thread here in this group:
"Solidifying a Mesh Object".
There we can look for solutions, how to transfer what is now a mesh,
into a solid object. I believe they need to be solid, in order to create
caves and tunnels through Difference into that body.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 19 Aug 2017 05:02:01
Message: <5997fe89$1@news.povray.org>
Am 17.08.2017 um 21:01 schrieb Kenneth:

>> But the information that I need to do that is:
>> POV-ray shoots a ray in the direction specified by `inside_vector` _FROM_ ---
>> where?
> 
> That's something I've wondered about as well.
> 
> From newsgroup comments years ago, my own understanding about inside_vector is
> currently this (and I could be wrong):
> 
> 1) it isn't used until the mesh is CSG'd with some other object.

More precisely, it is only used in non-`union` CSGs.

> 2) Perhaps the 'shoot-from point' (or from *multiple* points) is actually the
> surface of the other intersecting object.

Exactly that.

As a raytracer, POV-Ray's main schtick to render any objects in the
scene is to compute intersection points between rays (usually
originating at the camera location) and object surfaces.

For geometric primitives, ray-surface intersections are computed via
more or less complicated mathematical formulae.

For `union` CSGs, ray-surface intersections are computed simply by
computing the ray-surface intersections with all child objects.

For all other CSGs, the ray-surface intersection points of all the child
objects are filtered according to whether they are /inside/ sibling objects.


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 19 Aug 2017 05:24:48
Message: <599803e0$1@news.povray.org>
Am 17.08.2017 um 21:18 schrieb Bald Eagle:

> (b) if you only "scan" along that single vector - let's say, starting from any
> point along the other object's bounding box - then how do you handle the case(s)
> where the triangle being tested is perfectly parallel to the ray?
> How many intersection would it be calculated as?

In practice, this should only be a problem when all of the following
conditions come together:

1) The mesh must be in a non-union CSG.
2) The `inside_vector` must be parallel to one of the mesh triangles.
3) That triangle must lie in the same plane as one of the sibling object
surfaces.

If conditions 1) and 2) aren't met, this whole thing is a non-issue for
presumably obvious reasons. If condition 3) isn't met, the set of points
for which the test would become problematic is collapsed into
infinitesimally thin lines where the problematic triangles are projected
onto the sibling object surfaces, and the risk of any ray ever hitting
such a region is rather low.

That said, the described scenario may be one of the motivations (if not
the primary one) for making the `inside_vector` a parameter in the first
place, rather than just using a constant direction and toggling the
mechanism on and off with a boolean parameter.


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 19 Aug 2017 18:55:01
Message: <web.5998c0f5db2ef770883fb31c0@news.povray.org>
Sven wrote:
> Blender is a book with seven seals for me...

Ha! That's a good biblical analogy (to someone like me, who hasn't tried
learning even the basics of Blender yet.) I got a good laugh out of that.

Bald Eagle wrote:
> The triangles in a mesh have a "handedness" - an axial chirality.
> Give a "thumbs up" with your left hand, and if you order your triangle
> vertices in the order that your fingers curl, then the normal points up
> like your thumb.

Well-said; much better than my rather clumsy explanation. And "chiraity" is the
word I was trying to think of (in a different newsgroup post.)

Bald Eagle wrote:
> I did a wee bit more digging, and I found this from the megapov docs:

> "To determine if a point is inside a triangle mesh, POV-Ray shoots a ray
> from the point in some arbitrary direction (the default is <1, 0, 0>)...

I actually didn't know (or remember?) that there was a *default* inside_vector.
I should have re-read the docs; it has been awhile re: this topic.

> My guess is that the vector can be supplied as a 'tweak' to override
> the default value in case there are any weird artefacts showing up...

Yes, that makes sense now.


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 19 Aug 2017 19:10:01
Message: <web.5998c48cdb2ef770883fb31c0@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

>
> Well-said; much better than my rather clumsy explanation. And "chiraity" is the
> word I was trying to think of (in a different newsgroup post.)
>

CHIRALITY. Sorry, I'm tired...


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 19 Aug 2017 19:30:01
Message: <web.5998c8c4db2ef770883fb31c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
>
> As a raytracer, POV-Ray's main schtick to render any objects in the
> scene is to compute intersection points between rays (usually
> originating at the camera location) and object surfaces.
>

Ah yes, I had neglected to think about the CAMERA ray. That's the 'missing piece
of the puzzle' in my own understanding of inside_vector, its 'shoot-from'
points, etc. Now, I need to digest all these details...


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 20 Aug 2017 17:04:57
Message: <5999f979$1@news.povray.org>
Am 20.08.2017 um 00:51 schrieb Kenneth:
...
> Bald Eagle wrote:
>> I did a wee bit more digging, and I found this from the megapov docs:
> 
>> "To determine if a point is inside a triangle mesh, POV-Ray shoots a ray
>> from the point in some arbitrary direction (the default is <1, 0, 0>)...
> 
> I actually didn't know (or remember?) that there was a *default* inside_vector.
> I should have re-read the docs; it has been awhile re: this topic.

Not sure where that quote is from, but if it ever was true, it has been
outdated for a long time.

Fact is, in current versions of POV-Ray the default value for the
`inside_vector` parameter is the null vector (`<0,0,0>`), which is used
as a special value to turn off that feature.


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 21 Aug 2017 01:40:00
Message: <web.599a6fdcdb2ef770883fb31c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 20.08.2017 um 00:51 schrieb Kenneth:

> > I actually didn't know (or remember?) that there was a *default*
> > inside_vector.
> > I should have re-read the docs; it has been awhile re: this topic.
>
> Not sure where that quote is from, but if it ever was true, it has been
> outdated for a long time.
>
> Fact is, in current versions of POV-Ray the default value for the
> `inside_vector` parameter is the null vector (`<0,0,0>`), which is used
> as a special value to turn off that feature.

Yes, IIRC that agrees with my own v3.6xx experience using meshes (i.e., there's
no *useful* default inside_vector.) I haven't actually used a mesh in awhile,
though.

BTW, this opens up a small 'can of worms' regarding SHAPES.INC: The various
mesh-generation macros there do not add an inside_vector, which precludes those
meshes being used in (other than union) CSG, as they are not generally #written
to a file but used 'internally' by POV-Ray, so to speak.  However, the
HFCREATE() macro near the end of that file CAN be used to #write a mesh to a
text file for later use-- but it lacks an inside_vector as well. I modified my
own SHAPES.INC file years ago, to add that feature to HFCREATE-- but I currently
can't find it :-( I don't know for sure if an *arbitrary* vector can be added
there, although my own experience was that it worked OK (as I never created an
'open' mesh with Shapes.inc...although a few of the macros may allow open meshes
as an option. I think the 'cylinder mesh' macro may be one. In which case an
arbitrary vector would be hit-or-miss. <0,1,0> would probably work most of the
time, I'm guessing.)

Just wanted to mention this for future thought. And I apologize for getting way
off-topic...


Post a reply to this message

From: Sven Littkowski
Subject: Re: QUESTION: STL to POV (INC)?
Date: 21 Aug 2017 03:45:55
Message: <599a8fb3$1@news.povray.org>
On 21.08.2017 01:36, Kenneth wrote:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 20.08.2017 um 00:51 schrieb Kenneth:
> 
>>> I actually didn't know (or remember?) that there was a *default*
>>> inside_vector.
>>> I should have re-read the docs; it has been awhile re: this topic.
>>
>> Not sure where that quote is from, but if it ever was true, it has been
>> outdated for a long time.
>>
>> Fact is, in current versions of POV-Ray the default value for the
>> `inside_vector` parameter is the null vector (`<0,0,0>`), which is used
>> as a special value to turn off that feature.
> 
> Yes, IIRC that agrees with my own v3.6xx experience using meshes (i.e., t
here's
> no *useful* default inside_vector.) I haven't actually used a mesh in awh
ile,
> though.
> 
> BTW, this opens up a small 'can of worms' regarding SHAPES.INC: The vario
us
> mesh-generation macros there do not add an inside_vector, which precludes
 those
> meshes being used in (other than union) CSG, as they are not generally #w
ritten
> to a file but used 'internally' by POV-Ray, so to speak.  However, the
> HFCREATE() macro near the end of that file CAN be used to #write a mesh t
o a
> text file for later use-- but it lacks an inside_vector as well. I modifi
ed my
> own SHAPES.INC file years ago, to add that feature to HFCREATE-- but I cu
rrently
> can't find it :-( I don't know for sure if an *arbitrary* vector can be a
dded
> there, although my own experience was that it worked OK (as I never creat
ed an
> 'open' mesh with Shapes.inc...although a few of the macros may allow open
 meshes
> as an option. I think the 'cylinder mesh' macro may be one. In which case
 an
> arbitrary vector would be hit-or-miss. <0,1,0> would probably work most o
f the
> time, I'm guessing.)
> 
> Just wanted to mention this for future thought. And I apologize for getti
ng way
> off-topic...
> 
> 
> 
> 
> 
No problem, it is a good off-topic that I follow with great interest. It
makes this discussion richer.

Besides, this thread has been closed already by me, a few days ago, with
a final statement. There is a new thread, and I invite you all to join
there:
"Solidifying a Mesh Object".

But I am going to open yet another thread, inside the IMAGE group. I
will call it
"The POV-Ray Base on Mars",
and invite you all even more to join this project if you like (yes,
project, it is not just a threat).

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Kenneth
Subject: Re: QUESTION: STL to POV (INC)?
Date: 21 Aug 2017 12:55:00
Message: <web.599b0e41db2ef770883fb31c0@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:

>
> Besides, this thread has been closed already by me, a few days ago, with
> a final statement.

No, no, a POV-Ray newsgroup thread should never be consider 'closed'. ;-)  Three
years from now, someone else might read your post and come up with an
important new comment or idea to add, concerning your particular original
question. If the user posts it there, it will then show up in the newsgroups'
'most recent messages' list, for others to see.

My own opinion is that keeping related comments together in one place is
generally a good approach (if they're not off-topic), as it makes it easier to
'search' for a particular specialized topic in the future.

I do newsgroup searches all the time, looking at old posts for 'past wisdom' on
a particular topic (and to try and avoid asking the 'same old question' again.)
The newsgroup archive is a HUGE treasure-trove of interesting and useful topics.


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 21 Aug 2017 13:10:01
Message: <web.599b1380db2ef770c437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> Not sure where that quote is from, but if it ever was true, it has been
> outdated for a long time.

Yes, MegaPOV version 0.6

https://www.google.com/search?rlz=1C1CHFX_enUS633US634&q=megapov+%22To+determine+if+a+point+is+inside+a+triangle+mesh%2
2&oq=megapov+%22To+determine+if+a+point+is+inside+a+triangle+mesh%22


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 21 Aug 2017 13:29:19
Message: <599b186f$1@news.povray.org>
On 21/08/2017 17:52, Kenneth wrote:
> Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> 
>>
>> Besides, this thread has been closed already by me, a few days ago, with
>> a final statement.
> 
> No, no, a POV-Ray newsgroup thread should never be consider 'closed'. ;-)  Three
> years from now, someone else might read your post and come up with an
> important new comment or idea to add, concerning your particular original
> question. If the user posts it there, it will then show up in the newsgroups'
> 'most recent messages' list, for others to see.
> 
> My own opinion is that keeping related comments together in one place is
> generally a good approach (if they're not off-topic), as it makes it easier to
> 'search' for a particular specialized topic in the future.
> 
> I do newsgroup searches all the time, looking at old posts for 'past wisdom' on
> a particular topic (and to try and avoid asking the 'same old question' again.)
> The newsgroup archive is a HUGE treasure-trove of interesting and useful topics.
> 
> 

True. true.

-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 21 Aug 2017 14:26:05
Message: <599b25bd$1@news.povray.org>
Am 21.08.2017 um 19:08 schrieb Bald Eagle:
> clipka <ano### [at] anonymousorg> wrote:
> 
>> Not sure where that quote is from, but if it ever was true, it has been
>> outdated for a long time.
> 
> Yes, MegaPOV version 0.6
> 
>
https://www.google.com/search?rlz=1C1CHFX_enUS633US634&q=megapov+%22To+determine+if+a+point+is+inside+a+triangle+mesh%2
> 2&oq=megapov+%22To+determine+if+a+point+is+inside+a+triangle+mesh%22

Makes sense: Apparently the feature had originally been introduced in
MegaPOV 0.6(?) with a default value of `<1,0,0>`; when the feature was
later integrated into official POV-Ray, the default seems to have been
deliberately changed to "off", presumably in order to maintain backward
compatibility with previous official versions.


Post a reply to this message

<<< Previous 9 Messages Goto Initial 50 Messages

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