Home › Forums › Programming › FAIL! : Clipping Planes codepen fork attempt
- This topic has 1 reply, 1 voice, and was last updated 4 years, 3 months ago by GLiFTeK.
-
AuthorPosts
-
2020-09-24 at 6:50 am #33227GLiFTeKCustomer
Hi,
So I tried changing the v3d code example of clipping planes to work with a gltf loader then an obj loader, didn’t work, so I found this codepen a guy made himself using a separate loaded object.
Should be easy to replace the object and have it work for my own I thought…Nope.
Problems at every step of this slow journey just to get live interactive custom cut away renders…
So here’s a paste of a post I made:
(The code is using the original code, THREE.JS but I’ll be attempting to replace all the “three’s with v3d’s so that I can eventually make it work seamlessly with my puzzles.)If anyone can look through this and find what’s wrong, I’d be very appreciative!
Main issue I believe is in the material assigned to the loaded object.
Just search in the code for “Lee”
(Name of original object)My Pasted post:
“i’m working on my first fork on codepen of someone’s three.js pen they made.
i’m trying to use MY OWN CUSTOM .GLB object in my forkthe goal here is to be able to have my object be clipped by the planes, but no dice.
Can anyone help me figure out what’s wrong? I think it has something to do with the material.
thanks!
original-
https://codepen.io/mitsuya_bauhaus/pen/YzyQXqRmy fork-
https://codepen.io/GlifTek/pen/RwavrWBThanks guys!
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-09-24 at 7:57 pm #33296GLiFTeKCustomerSuccess! Ivan helped me out with what was wrong.
Seemed I had everything right.
Almost!
It was the glb file, which I hadn’t done
getObjectByName() to the object in the scene to be clipped.
Ivan’s fork of it linkIvan’s fork of it linkNext step…does anyone know if clipping planes can be user-rotated or is it just positional?
got them rotating with the GUI, got the object animated being sliced like a cake. :+1:
A top down pie-chart / Pac man style.. Just how I needed.Edit…
Need to research radians and degrees now because the rotation either slows then quickly flips as it passes “0”… Or is very slow and limited
.Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature! -
AuthorPosts
- You must be logged in to reply to this topic.