akella / ExplodingObjects

A set of WebGL demos that show an exploding 3D object animation inspired by "Kubrick Life Website: 3D Motion".
https://tympanus.net/codrops/?p=39110
207 stars 53 forks source link

Recreating with custom models #4

Open martinjuhasz opened 4 years ago

martinjuhasz commented 4 years ago

Hey,

so i played a little around with your repo, thanks for sharing these effects! I tried implementing my own object and split it up with the voronoi fracture in cinema 4d. When loading that object (f.e. using your codebase in icosahedron.js) all children of my main Object3D seem to be meshes. In your model, there is a mix of meshes and groups with meshes. You seem to ignore the top level meshes and only paint the grouped ones.

Could you elaborate on that? How am i supposed to render my custom object using that techique? What are that groups of two meshes and how did you create your object like that?

DmitrySpace commented 3 years ago

Same question

akella commented 3 years ago

The groups are needed because i separate "insides" of object from its surface, thats why i assigned different materials in Cinema, to treat them differently in THREE.JS. The separation happened on Cinema level, i think some modifiers or something like that in voronoi options were used. Sorry to be that late for this question, guys =(.

But overall, sometimes Cinema just exported something different than i expected, so after the export there were still some little manual work to change JS. You gotta understand the principle of the animation, and than you'd be able to fix js according to what current Cinema version(or Blender or anything) exported for you. My JS expects array of groups, each group with surface mesh, and inside mesh.

DmitrySpace commented 3 years ago

Thanks a lot for your answer! The meaning is clear. The main thing for me is that for the implementation of this effect, the structure of objects is not important, if I understood correctly :) and the JS can be just corrected for needed object. I am a beginner in THREE.js and I am very interested in learning it with such cool examples. Thank you for that!

akella commented 3 years ago

That is correct, you can process any structure to create that effect! Glad you liked that, would be happy to see your result!