2

Is it possible in Three.js to interpolate two meshes like this? At the area where they intersect should have a nice smooth transition.

I think I've seen it somewhere, but I can't find it.

enter image description here

EDIT

The metaball/cube concept is much closer to what I'd like to achieve: https://www.youtube.com/watch?v=f42zr__yW_Q http://threejs.org/examples/webgl_marchingcubes.html

Community
  • 1
  • 1
Tibor Szasz
  • 2,430
  • 2
  • 16
  • 22
  • I have never seen fillet joins or patch and stitch in three.js. There is some sort of fillet type work that happens in the extrudegeometry class (see setBevelVec) and the subdivision surfaces example: http://threejs.org/examples/webgl_modifier_subdivision.html But those are edge smoothing. It may be a starting point, but nothing so close to fillet and the subsequent patches that often need human intervention. – Radio May 18 '16 at 23:31
  • I'm looking for general way to do this: http://threejs.org/examples/webgl_marchingcubes.html probably much more complex than I'd imagine :) – Tibor Szasz May 19 '16 at 08:58
  • @pailhead how does it help to achieve my goal? – Tibor Szasz May 19 '16 at 12:06
  • It doesn't not sure if this is achievable. If you want to write something like Catia, Pro-engineer etc. it's going to be a lot of work. – pailhead May 19 '16 at 16:57
  • The linked examples are a shader solution, not mesh based. Fillet is different. Nurbs are the way to go. Three.js has nurbs and weighted curve polylines. The problem however is that fillet usually involves patching. The above case is simplistic. How does one project the starting vector points on each shape? what's the angle, how many steps in the fillet? what are the tolerances before it distorts? These are generally settled by the user in a 3d program such as Rhino using a multistep process. It is unclear what the real problem space is here. A bounty might help, but I doubt it. – Radio May 19 '16 at 20:57
  • I'd be happy with a shader solution. Maybe the illustration and title is misleading, it's from a google image search. I just want a nice blending between meshes, like in the marching cubes demo, but instead of balls, I want custom shapes. I played with the demo code and it seems it uses some sort of distance field approach, but I'm not sure. – Tibor Szasz May 19 '16 at 22:58

1 Answers1

0

I found the way to do it. It's called raymarching distance fields.

Here's an example: https://www.shadertoy.com/view/4dsGRl

Also a presentation: http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf

Tibor Szasz
  • 2,430
  • 2
  • 16
  • 22