Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

POV-Ray export feature #70

Closed
wadewadewadewadewadewade opened this issue Mar 19, 2019 · 7 comments
Closed

POV-Ray export feature #70

wadewadewadewadewadewade opened this issue Mar 19, 2019 · 7 comments

Comments

@wadewadewadewadewadewade

For those users wanting a print-worthy export, you could add an export function for Persistence of Vision Ray Tracer. I've used it back in the 90s to generate 300DPI images for giant prints that can be printed on photo paper by a a Lightjet 430, and they turned out great! And POVray uses constructive solid geometry as well as polygon and polynomial forms with a simple text-based file input format. http://www.povray.org/

Just a suggestion for fellow digital artists...

@doug-moen
Copy link
Member

It's an interesting idea. I don't have any experience with povray, and I am not sure if it is possible to export Curv shapes to Povray in the general case.

Looking at the documentation, I see that Povray has isosurface objects, which use the same representation as Curv shapes. In theory, we could compile a Curv shape's distance function into a Povray function, then put the resulting distance function into a Povray isosurface object. But is povray powerful enough? Do Povray functions support conditional expressions and recursion? Because it's not clear that this is supported.

@wadewadewadewadewadewade
Copy link
Author

To be honest, I've never used an isosurface object before. But to answer your question about recursion, povray is more like xml markup than a scripting language. So you'd have to dump out a file with everything built already and then povray could run it's raytracing on that static file. Does that make sense?

@doug-moen
Copy link
Member

So you'd have to dump out a file with everything built already and then povray could run it's raytracing on that static file. Does that make sense?

Sorry, I'm not sure how to do that. Curv supports a lot of interesting shape operations, not just boolean CSG operations, but also non-affine transformations like bend and twist. You can construct procedurally generated textures, you can build or transform shapes using fractal noise, you can make traditional 3D fractals like the MandelBulb using IFS (iterated function systems). And these operations can all be composed together. This flexibility is obtained by representing all shapes using signed distance fields. A lot of this expressive power seems to be missing from povray, unless you write code inside of an isosurface object.

Curv compiles every scene into a single signed distance function before rendering it, either displaying it on the screen, or converting it to a mesh file for 3D printing. A lot of the power of Curv comes from the ability to write iterative code inside a signed distance function. If povray doesn't support recursive functions, then you can't iterate inside a povray isosurface object, and that would mean many of the shapes in the examples directory cannot be translated into povray.

@doug-moen
Copy link
Member

I think we do want to leverage existing open source software to allow Curv shapes to be raytraced. But I'm not sure if povray is the best solution.

@doug-moen
Copy link
Member

One possibility is to create a fork of PovRay that lets you embed Curv code in a PovRay source file.

There's lots of buzz about real time raytracing on a GPU right now. Maybe there is an open source raytracer that runs on a GPU, that can be integrated with Curv.

@wadewadewadewadewadewade
Copy link
Author

@doug-moen doug-moen changed the title An idea for users wanting a high-rez exports POV-Ray export feature Sep 4, 2019
@doug-moen
Copy link
Member

I don't think that POV-Ray export is going to work. And I don't see there is another POV-Ray like ray tracing tool that supports the full range of SDF based geometry and geometric transformations that Curv has. So I think this feature request is a dead end.

Other users have asked for more sophisticated rendering inside of Curv itself. See issue #73.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants