POV-Ray : Newsgroups : povray.binaries.utilities : mesh to obj converter Server Time
29 Mar 2024 03:29:03 EDT (-0400)
  mesh to obj converter (Message 1 to 2 of 2)  
From: ingo
Subject: mesh to obj converter
Date: 25 May 2004 19: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 13: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-2023 Persistence of Vision Raytracer Pty. Ltd.