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.

Yaroslav

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Material for Galvanized (Zinc) Steel? #1756
    Yaroslav
    Participant

    Hey Yuri, do you have certain release date for materials pack in mind?

    Im a week or so from releasing a beta of the project we discussed last year, and really looking forward to boost it with photorealistic materials, as basic three.js materials are pathetic :)

    in reply to: v3d.ConvexGeometry #1722
    Yaroslav
    Participant

    Thanks, made that thing to work.

    in reply to: Snapping object to certain point on a geometry #1659
    Yaroslav
    Participant

    Will, thanks for your time on this issue.

    one solution would be to make the snap-to function work on object that get their location changed by scaling of the parent object

    I tried this myself as well and it seems more of a bug – theoretically, snap shouldn’t stop working if a geometry was modified. Fixing this would actually solve my whole case, as it would allow to move any object in accordance with the other object without making it a child of the latest.

    For now, i was able to work around this for my specific isolated case with the following solution. For anyone reading this who doesn’t have experience with JS – please note this solution is not universal and works only for my specific case where the object we are snapping to:

    – is not being dynamically rotated
    – aligned to be resized on Z-axis

    So what i did was making a simple function which gets a bounding box of my ring and finds the position of its surface after resize:

       v3dApp.ExternalInterface.snapObjectToBound = function(obj_name, obj_pos_name)
        {
    
          var Obj = v3dApp.scene.getObjectByName(obj_name);
          var ObjPosition = v3dApp.scene.getObjectByName(obj_pos_name);
    
          var BoundBox = new v3d.Box3().setFromObject(ObjPosition);
          var BoundDepth = BoundBox.getSize().z;
    
          var Pos = ObjPosition.position;
    
          Obj.position.z = BoundDepth/2;
        }

    Then, when a resize callback happens, all i have to do is to call snapObjectToBound with my gem as an object to get bounded and ring as a bounding target to make it fit:

    My resume for this case is: while being able to solving it with JS, snapping objects to pre-defined vertexes of another object (defined with either an Empty or with a Vertex Group, whatever works for developers best) is a vital function which should not be broken after modifying an object (at least with built-in Puzzle modifiers). All in all, fixing the behavior Will mentioned in his previous post seems important.

    in reply to: Snapping object to certain point on a geometry #1649
    Yaroslav
    Participant

    Will, thank you for a detailed explanation and examples. Your case of navigating around a pre-defined geometry makes perfect use of empties as locations, which, i believe, is the currently recommended solution.

    My case is slightly different, as i have a dynamically resized geometry in my scene. User has an ability to resize a ring, which is done with the following Puzzle:

    Resize function

    As the ring is resized, my target point would have to move around with the edge of the ring to allow proper snapping – so, in this case, i would have to add around 20 empties per ring model to snap the gemstone to a correct location for each possible size. In this particular scene, there are 8 ring types available to user, each having slightly different properties and surface geometries, and there are two ring objects – one for men and one for women. This setup gives us 20 x 8 x 2 = 320 empties to keep in the scene. While theoretically it shouldn’t be much of a problem, imagine spawning these in Blender file for each of 500+ ring models i have in my final product.

    Theoretically i can add a Blender python script to do the heavy lifting for me, but with complex geometries, where the final vertex position might be moved by user in any direction, even this would not suffice, and i’ll have to embed some custom JS function to locate vertexes.

    That’s why i thought it would be extremely convenient to be able to define a group of vertices in Blender and use it as a snapping point.

    Yuri, V3D team – do you think there is a smooth way to address this?

Viewing 4 posts - 1 through 4 (of 4 total)