POV-Ray : Newsgroups : povray.binaries.utilities : mesh to obj converter Server Time: 17 Jun 2019 12:44:07 GMT
  mesh to obj converter (Message 1 to 2 of 2)  
From: ingo
Subject: mesh to obj converter
Date: 25 May 2004 23:01:44
Message: <Xns94F5A773245Aseed7@news.povray.org>
Attached you'll find mesh22obj.py  A python script to convert POV-Ray's 
mesh2 to *.obj files.

Consider it software in alpha state. A lot of things can be improved.

Currently it just looks at vertex_vectors, norma_vectors, uv_vectors and 
face_indices. The rest of the mesh2 object is ignored.

It is assumed that the "triangles" in the mesh2 object are written 
counter clockwise. If they are not, normals may get inverted (this 
actually happens with the output of my mesh_macros, something to fix)

USE:
  mesh22obj.py [options] filename(s)
OPTIONS:
  -h, --help : shows this message and quits mesh22obj.py
  -n         : ignores all normals
  -u         : ignores all uv_data

Goodluck,

Ingo


Post a reply to this message


Attachments:
Download 'mesh22obj.py.txt' (9 KB)

From: Mick Hazelgrove
Subject: Re: mesh to obj converter
Date: 26 May 2004 17:24:37
Message: <40b4d2d5@news.povray.org>
Thanks Ingo

Looks very useful

Mick

"ingo" <ing### [at] tagpovrayorg> wrote in message
news:Xns94F5A773245Aseed7@news.povray.org...
> Attached you'll find mesh22obj.py  A python script to convert POV-Ray's
> mesh2 to *.obj files.
>
> Consider it software in alpha state. A lot of things can be improved.
>
> Currently it just looks at vertex_vectors, norma_vectors, uv_vectors and
> face_indices. The rest of the mesh2 object is ignored.
>
> It is assumed that the "triangles" in the mesh2 object are written
> counter clockwise. If they are not, normals may get inverted (this
> actually happens with the output of my mesh_macros, something to fix)
>
> USE:
>   mesh22obj.py [options] filename(s)
> OPTIONS:
>   -h, --help : shows this message and quits mesh22obj.py
>   -n         : ignores all normals
>   -u         : ignores all uv_data
>
> Goodluck,
>
> Ingo
>
>


Post a reply to this message

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