POV-Ray : Newsgroups : povray.general : QUESTION: STL to POV (INC)? Server Time
31 Oct 2024 19:02:50 EDT (-0400)
  QUESTION: STL to POV (INC)? (Message 11 to 20 of 59)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
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

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

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