POV-Ray : Newsgroups : povray.general : Example of .obj import please Server Time
15 Apr 2024 01:36:26 EDT (-0400)
  Example of .obj import please (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: Cousin Ricky
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 17:29:38
Message: <61562c42$1@news.povray.org>
On 2021-09-30 5:01 PM (-4), The Traveler wrote:
>
> Would some kind soul please post a short, simple code example for importing an
> ...obj file into 3.7.1?

Are you aware that 3.7.1 has been retracted?  Approved versions are
3.7.0.* and 3.8.0-beta.2.


Post a reply to this message

From: The Traveler
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 17:40:00
Message: <web.61562e42cc8d58d2dd31149be3dfee7c@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2021-09-30 5:01 PM (-4), The Traveler wrote:
> >
> > Would some kind soul please post a short, simple code example for importing an
> > ...obj file into 3.7.1?
>
> Are you aware that 3.7.1 has been retracted?  Approved versions are
> 3.7.0.* and 3.8.0-beta.2.

I wasn't. My bad though. I've been experimenting with 3.8.0-b2 but it's giving
me some .ini file parsing problems so I actually have 3.7.0 installed.


Post a reply to this message

From: The Traveler
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 17:45:00
Message: <web.61562f02cc8d58d2dd31149be3dfee7c@news.povray.org>
"Version 3.7.1 extended the mesh object by adding a New feature that supports
importing Wavefront (OBJ) files."

So it appears I'll need to use 3.8.0-b2 as .obj import isn't in 3.7.0 ...


Post a reply to this message

From: The Traveler
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 18:00:00
Message: <web.6156331acc8d58d2dd31149be3dfee7c@news.povray.org>
"The Traveler" <jho### [at] northrimnet> wrote:
> "Version 3.7.1 extended the mesh object by adding a New feature that supports
> importing Wavefront (OBJ) files."
>
> So it appears I'll need to use 3.8.0-b2 as .obj import isn't in 3.7.0 ...

3.8.0-b2 gives the same error.


Post a reply to this message

From: Bald Eagle
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 18:15:00
Message: <web.61563627cc8d58d21f9dae3025979125@news.povray.org>
"The Traveler" <jho### [at] northrimnet> wrote:
> "The Traveler" <jho### [at] northrimnet> wrote:
> > "Version 3.7.1 extended the mesh object by adding a New feature that supports
> > importing Wavefront (OBJ) files."
> >
> > So it appears I'll need to use 3.8.0-b2 as .obj import isn't in 3.7.0 ...
>
> 3.8.0-b2 gives the same error.

IIRC, Cousin Ricky and I both resort to using spreadsheets to convert STL files
to proper POV-Ray mesh {} syntax.

Roland Smith also has a python script on GitHub:

https://github.com/rsmith-nl/stltools


But probably the easiest and most used way to do it is to use PoseRay.
https://sites.google.com/site/poseray/


Post a reply to this message

From: The Traveler
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 18:50:00
Message: <web.61563dcbcc8d58d2dd31149be3dfee7c@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "The Traveler" <jho### [at] northrimnet> wrote:
> > "The Traveler" <jho### [at] northrimnet> wrote:
> > > "Version 3.7.1 extended the mesh object by adding a New feature that supports
> > > importing Wavefront (OBJ) files."
> > >
> > > So it appears I'll need to use 3.8.0-b2 as .obj import isn't in 3.7.0 ...
> >
> > 3.8.0-b2 gives the same error.
>
> IIRC, Cousin Ricky and I both resort to using spreadsheets to convert STL files
> to proper POV-Ray mesh {} syntax.
>
> Roland Smith also has a python script on GitHub:
>
> https://github.com/rsmith-nl/stltools
>
>
> But probably the easiest and most used way to do it is to use PoseRay.
> https://sites.google.com/site/poseray/

Thanks guys. Poseray is not an option as I'm on Linux and would prefer not to
load WINE to run it. I've been eyeballing the .stl format which is the native
output 3d format for the program I'm using (Mandelbulber) so I may end up coding
a stl2mesh2 converter in C with the Qt toolkit eventually.

MeshLab runs under Linux and converts .stl very nicely to .obj and I was hoping
it worked in 3.8.0-b2 but apparently no dice ...

Thanks for the heads up on the the Roland Smith script. I'll may give it a go. I
know Python so if I hit a snag I can probably fix it or port it to pyQt for
a nice GUI interface.

Cheers.


Post a reply to this message

From: The Traveler
Subject: Re: Example of .obj import please
Date: 30 Sep 2021 20:00:00
Message: <web.61564edbcc8d58d2dd31149be3dfee7c@news.povray.org>
One note, the Roland Smith script does work fairly well so there's a solution
for the time being. The files are fairly large and parsing the .inc file that
the script produces takes some time.

I may have to resort to Blender as it has no issues with importing the original
..stl file and has provision to use Povray for it's renderer.

Ah, light at the end of the tunnel perhaps. Listen, is that a train ... ?

Cheers.


Post a reply to this message

From: Alain Martel
Subject: Re: Example of .obj import please
Date: 1 Oct 2021 11:13:08
Message: <61572584$1@news.povray.org>

> Howdy folks,
> Would some kind soul please post a short, simple code example for importing an
> ...obj file into 3.7.1? I'm consistently getting this error: Parse Error: No
> triangles in triangle mesh. I don't understand why as the .obj file is properly
> formed and is imported without problems by a number of 3D modeling programs. I'm
> using the "boilerplate" code example from the wiki with the parameters changed
> for my testing:
> 

.OBJ often don't contain triangles but polys. Most are composed of a 
collection of quadrangles.
That mean that they need to be loaded as unions of bicubic patches.


Post a reply to this message

From: The Traveler
Subject: Re: Example of .obj import please
Date: 1 Oct 2021 16:25:00
Message: <web.61576dc0cc8d58d2dd31149be3dfee7c@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
>
> > Howdy folks,
> > Would some kind soul please post a short, simple code example for importing an
> > ...obj file into 3.7.1? I'm consistently getting this error: Parse Error: No
> > triangles in triangle mesh. I don't understand why as the .obj file is properly
> > formed and is imported without problems by a number of 3D modeling programs. I'm
> > using the "boilerplate" code example from the wiki with the parameters changed
> > for my testing:
> >
>
> .OBJ often don't contain triangles but polys. Most are composed of a
> collection of quadrangles.
> That mean that they need to be loaded as unions of bicubic patches.

Generally I tessellate the mesh beforehand and insure its well formed. No
surprises that way ... Cheers.


Post a reply to this message

From: Le Forgeron
Subject: Re: Example of .obj import please
Date: 3 Oct 2021 05:00:54
Message: <61597146$1@news.povray.org>
Le 01/10/2021 à 01:57, The Traveler a écrit :
> One note, the Roland Smith script does work fairly well so there's a solution
> for the time being. The files are fairly large and parsing the .inc file that
> the script produces takes some time.
> 
> I may have to resort to Blender as it has no issues with importing the original
> ..stl file and has provision to use Povray for it's renderer.
> 
> Ah, light at the end of the tunnel perhaps. Listen, is that a train ... ?
> 
> Cheers.
> 
> 
> 

If you have a STL to load, it can be done directly in hgpovray38 (but it
drops colour info) as long as it's a binary STL.

https://wiki.povray.org/content/User:Le_Forgeron/mesh


Post a reply to this message

<<< Previous 1 Messages Goto Initial 10 Messages

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