We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

FAIL! : Clipping Planes codepen fork attempt

Home Forums Programming FAIL! : Clipping Planes codepen fork attempt

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33227
    GLiFTeK
    Customer

    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 fork

    the 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/YzyQXqR

    my fork-
    https://codepen.io/GlifTek/pen/RwavrWB

    Thanks guys! :good:

    #33296
    GLiFTeK
    Customer

    Success! 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 link :good:

    Next 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
    .

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.