POV-Ray : Newsgroups : povray.binaries.utilities : ObjToPov.java - Wavefront .OBJ to povray3.5 mesh2 converter Server Time
28 Apr 2024 23:32:47 EDT (-0400)
  ObjToPov.java - Wavefront .OBJ to povray3.5 mesh2 converter (Message 1 to 1 of 1)  
From: Chris Jeppesen
Subject: ObjToPov.java - Wavefront .OBJ to povray3.5 mesh2 converter
Date: 24 Oct 2001 14:40:55
Message: <3bd70b37@news.povray.org>
New and Improved! Conversion of Wavefront Objects to POV Mesh2's! Limited
texture support!

It is in java, and requires the java3d library
http://java.sun.com/products/java-media/3D/

Wavefront meshes can have faces with any number of sides, but pov is limited
to triangles, so this program chops up polys with >3 sides into triangles.

It returns one .inc file for each .obj file passed to it. Each .inc can have
multiple mesh2's in it, one for each usemtl line in the original .obj. Each
mesh is assigned a texture thusly:

usemtl some_material_name

translates into

mesh2 {
  ...
  texture {some_material_name}
}

so you have to #declare some_material_name=texture{...} before the #include.

Tested on the very large and detailed Cassini Spacecraft model available at
http://samadhi.jpl.nasa.gov/models/

Chris Jeppesen
chr### [at] digiquillcom


Post a reply to this message


Attachments:
Download 'ObjToPov.java.txt' (8 KB)

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