I had the idea about such scene for about two years. But I couldn’t start it as I had not enough knowledge of Three.js and had no idea where to start from at all. Years passed, I’ve opened this forum with cool people, whose posts and replies here helped me to get more experience and knowledge. Special thanks to @pailhead, because his posts gave me at least the direction where I should move to. (Cheers! )
So, I’ve spent about a day, as usual with trials end errors, reading all the stuff I could find about how to change default materials.
This scene shows how to re-create a default material (Lambert in my case) with THREE.ShaderMaterial() and add some custom functionality (for example, kind of a clipping sphere) to it. I can’t say that the approach I used here is right or correct, but, at least, it gave the result I’ve expected
Have joy and relax with this scene
PS In Firefox music starts automatically. In Chrome, click the round button at the top-left corner and hit “play”.
Cool! Nice job with the clipping sphere, I had no idea it would be so simple. Also interesting material generator, I always like seeing people picking apart three.js in different ways. Thanks for sharing!
@bitsofcode
Thanks :
I like to share what I’ve learned and to do it with interesting and easily readable examples. I think of them as of tutorials Thus, people will spend less time for solving the same question/problem which I’ve bumped into
Thanks for your help! I must admit im a total newb when it comes to shader and not sure how to apply this example you shared.
This is what i have so far from the orb example - how can I add params.map in this example to get the texture. Again thanks for your help and sharing the example!