https://github.com/folkertvanheusden/obj2pov
This program converts wavefront .obj files to PovRay scenes and OpenSCAD scripts.
https://github.com/folkertvanheusden/obj2pov
openscad openscad-extension povray wavefront
Last synced: about 2 months ago
JSON representation
This program converts wavefront .obj files to PovRay scenes and OpenSCAD scripts.
- Host: GitHub
- URL: https://github.com/folkertvanheusden/obj2pov
- Owner: folkertvanheusden
- Created: 2023-06-19T11:03:48.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-30T04:53:13.000Z (over 1 year ago)
- Last Synced: 2025-01-18T09:47:27.645Z (over 1 year ago)
- Topics: openscad, openscad-extension, povray, wavefront
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This program convertes wavefront .obj-files to something that can be rendered by PovRay or OpenSCAD.
The first release is still rather limited altough the minecraft obj-files produced by https://github.com/jmc2obj/j-mc-2-obj work quite well.
Usage:
./obj2pov.py -f inputfile.obj > outputfile.pov
For OpenSCAD output:
./obj2pov.py -S -f inputfile.obj > outputfile.scad
Then you can render it with PovRay/OpenSCAD.
For PovRay you may want to tweak the camera location and maybe add some more lights.
Note that for a model from j-mc-2-obj, you want to tick 'Create a seperate object for each block' and untick 'Do not allow duplicate vertexes' in the export window.
Example renders with PovRay:
* https://www.youtube.com/watch?v=lMgW4TiFRhg
* https://youtu.be/b0ljLMfLrgQ
* https://www.youtube.com/watch?v=pa1t5PZWyrA
* https://vanheusden.com/permshare/minecraft-huge.png fragment of the NURDspace (www.nurdspace.nl) Minecraft server, rendered with PovRay
These examples how a minecraft segment converted to OpenSCAD.
* https://vanheusden.com/permshare/minecraft.scad.xz this one is large and takes ages to load
* https://vanheusden.com/permshare/minecraft2.scad.xz smaller segment, renders in a few minutes
* https://vanheusden.com/permshare/minecraft2-scad.png how it looks in OpenSCAD
* https://vanheusden.com/permshare/minecraft3-scad.png larger segment but with occlude enabled in jmc2obj
* https://vanheusden.com/permshare/minecraft3.scad.xz the generated OpenSCAD file
Released under the MIT license by
Folkert van Heusden