POV-Ray : Newsgroups : povray.general : QUESTION: STL to POV (INC)? Server Time
22 Dec 2024 18:15:08 EST (-0500)
  QUESTION: STL to POV (INC)? (Message 1 to 10 of 59)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Sven Littkowski
Subject: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 03:46:09
Message: <59799a41$1@news.povray.org>
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


Post a reply to this message

From: Thomas de Groot
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 04:09:29
Message: <59799fb9$1@news.povray.org>
On 27-7-2017 8: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
> 

For obj to pov, use Poseray: https://sites.google.com/view/poseray

Which is - by far - the best converter.

-- 
Thomas


Post a reply to this message

From: omniverse
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 05:00:01
Message: <web.5979ab4ddb2ef7709c5d6c810@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 27-7-2017 8: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.
>
> For obj to pov, use Poseray: https://sites.google.com/view/poseray
>
> Which is - by far - the best converter.
>
> --
> Thomas

And MeshLab  http://www.meshlab.net/  seems to be okay for the STL to OBJ
conversion.

I don't use mesh files much at all but I checked Tharsis mountains from the NASA
3D models site and could use the resulting mesh (after PoseRay POV/INC export)
in CSG difference okay from what I was able to see.

Bob


Post a reply to this message

From: clipka
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 05:39:42
Message: <5979b4de$1@news.povray.org>
Am 27.07.2017 um 08:45 schrieb Sven Littkowski:
> 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.

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.


Post a reply to this message

From: Le Forgeron
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 06:01:10
Message: <5979b9e6@news.povray.org>
Le 27/07/2017 à 08:45, Sven Littkowski a écrit :
> 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.
> 

1. My search engine is not your search engine, so please provide
accurate links for accurate help.

2. STL will always be a mesh (collection of triangles), stl that can be
drilled is an illusion.

And how are you going to dig your tunnels ?

There is no default orientation of stl model. And no scale either.

I found  moon_near_side.stl & moon_far_side.stl, they are funny: they
use negative part of two axes (i.e. the origin is in the middle of the
square, at the bottom of the landscape), so be careful when sending to a
printer.

they use the traditional right handed for landscape (z is up).

They seems to be closed, meshlab does not show any obvious holes. Which
means you might be able to make tunnel via CSG difference/intersection,
if your tunnel are solid shapes.

They are optimized: the bottom is made of large triangles (5x6 squares),

I can use them directly in hg-povray via stl_load, but that's another story.


Post a reply to this message


Attachments:
Download 'a.png' (470 KB)

Preview of image 'a.png'
a.png


 

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 06:01:58
Message: <5979ba16$1@news.povray.org>
On 7/27/2017 9:58 AM, omniverse wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> On 27-7-2017 8: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.
>>
>> For obj to pov, use Poseray: https://sites.google.com/view/poseray
>>
>> Which is - by far - the best converter.
>>

It is too. IME
>> --
>> Thomas
>
> And MeshLab  http://www.meshlab.net/  seems to be okay for the STL to OBJ
> conversion.
>

Blender does the conversion as well.

Thinking about it. If you use the PovRay exporter it must convert it to 
Mesh2 internally.


-- 

Regards
     Stephen


Post a reply to this message

From: Jim Holsenback
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 06:56:22
Message: <5979c6d6$2@news.povray.org>
On 7/27/2017 6:01 AM, Stephen wrote:
> Blender does the conversion as well.

i use blender as well then export as obj ... poseray to mesh2


Post a reply to this message

From: Stephen
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 06:56:56
Message: <5979c6f8@news.povray.org>
On 7/27/2017 11:01 AM, Stephen wrote:
> Blender does the conversion as well.
>
> Thinking about it. If you use the PovRay exporter it must convert it to
> Mesh2 internally.


I just checked and Blender exports a Mesh2 section in its Pov file.

BTW the STL was imported as a solid section with no holes.


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: QUESTION: STL to POV (INC)?
Date: 27 Jul 2017 07:55:00
Message: <web.5979d3f7db2ef770c437ac910@news.povray.org>
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.

Just exploring other options.  :)


Post a reply to this message

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

Goto Latest 10 Messages Next 10 Messages >>>

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