Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: Patryk Kizny on June 13, 2015, 06:07:54 PM




Title: Orthogonal projection + slicing
Post by: Patryk Kizny on June 13, 2015, 06:07:54 PM
Hey,

Trying to recreate mandelbulb-like voxel rendering in fragmentarium.
I added simple fractal slicing and tweaking a bit with coloring allows for more less BW export.

I wonder how to get orthogonal projection in the DE-raytracer.
I guess it is orthogonal at FOV = 0 (out of the box), but that won't work.

Can anybody post a tweak to get simple ortho projection with the latest DE-raytracer?
i guess thaat should be a piece of cake for the authors of the tracer.

Much appreciated.

Second thing - can you guys elaborate on simple tweaks to get rid of fractal 'interior' meat when rendering slices (I'm just clipping output with a thin box volume).

Thanks!

 


Title: Re: Orthogonal projection + slicing
Post by: 3dickulus on June 13, 2015, 07:02:20 PM
look in Examples/

try the 2D camera

or use an "ortho" function as in IBL-Pathtracer.frag...
Code:
vec3 ortho(vec3 d) {
if (abs(d.x)>0.00001 || abs(d.y)>0.00001) {
return vec3(d.y,-d.x,0.0);
} else  {
return vec3(0.0,d.z,-d.y);
}
}


Title: Re: Orthogonal projection + slicing
Post by: 3dickulus on June 14, 2015, 12:33:59 AM
are you looking for single pixel slices for building a point cloud from a series of images? there might already be such thing, maybe re:3Dprinting

p.s... the ortho function above (probably not what you want) would need to be tailored to your needs of course.


Title: Re: Orthogonal projection + slicing
Post by: Patryk Kizny on June 14, 2015, 01:06:20 PM
Yes Dick, the ultimate goal is to implement pointcloud export.
As far as I understand doing it the proper way from scratch would be demanding as requires different approach than the one used for rendering.
But since we already have a good workflow for automated merging of BW slice images into pointlclouds in Krakatoa I was thinking about a simple workaround and using existing DE-raytracer with a few changes to render out a sequence.

If you have any better ideas - let me know.
This morning I also had a thought - there are many folks interested in printing stuff and the workflow usually assumed rendering voxels, recreating object mesh and then STLing to print. Full of artifacts. But actually I don't see anything against one writing a program to directly print using the DE-estimation method. Or I missed something and it looks like daydreaming?


Title: Re: Orthogonal projection + slicing
Post by: 3dickulus on June 14, 2015, 01:27:48 PM
using the "search" box (top right) type in point cloud and click the search button, you will see a lot of posts, some may have code or give you an idea of how to do it. I haven't looked into it specifically for Fragmentarium.


Title: Re: Orthogonal projection + slicing
Post by: Syntopia on June 14, 2015, 10:44:31 PM
The 'ortho' function is for creating an arbitrary orthogonal vector. It is not related to orthographic perspective. But I don't think you should use any projection if you want to render slices. Instead render the fractal in 2D. Look at 'examples/theory/mandelbulb-slicer.frag'. There are four panels when it runs: the lower left is a 2D slice.

This morning I also had a thought - there are many folks interested in printing stuff and the workflow usually assumed rendering voxels, recreating object mesh and then STLing to print. Full of artifacts. But actually I don't see anything against one writing a program to directly print using the DE-estimation method. Or I missed something and it looks like daydreaming?

I did some time ago, while playing around with OpenGL in Java. I did a gpu accelerated DE -> OBJ exporter (using marching cubes which is the standard method). I created a few 3D prints using this technique: http://www.shapeways.com/product/GQMXP6ZMX/mandelbulb-iii

The code is online (at https://github.com/Syntopia/Meshia/tree/master/meshia/src/net/hvidtfeldts) but it is to much of a mess to be really usable - but the marching cube implementation may serve as inspiration.


Title: Re: Orthogonal projection + slicing
Post by: Patryk Kizny on June 15, 2015, 10:48:07 AM
Nice one, thanks!