Bb3 Hint For 3d Newbies(which Includes Me)

Discussion in 'Buildbox 3.0' started by LBPToo, Aug 17, 2018.

  1. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Make sure that you have your origin set to 0,0,0 when exporting obj's from your 3D app that you plan to import into BB3. BB3 does not read and adjust origins on import. You might just get some strange, and unexpected behavior(as I discovered), if you don't do this.

    BTW, I'm guessing this is only really important if you have an object moving on an axis, such as a rolling ball, etc.
     
    Last edited: Aug 18, 2018
    AppNasty and Jackazoid like this.
  2. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Update. With the development of my custom node "Oscillate" (available in another thread) the behavior noted in this thread has become very useful. As an example, I made a flapping wing with the "Oscillate" node by setting the origin in Blender to the center of the end of the "wing"(a flat rectangle for testing), then when I applied the node rotating the wing, it rotated around the end instead of the center of the rectangle and could simulate a flapping motion. Obviously this could be applied in many other ways.
     
    AppNasty likes this.
  3. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    AppNasty likes this.
  4. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    @LBPToo Can you able fix the issue of removing entire 3D Vehicle on defeat from SpaceBuggy Template? Currently, It is removing only Body not wheels.
     

    Attached Files:

  5. jmiller8031

    jmiller8031 Avid Boxer

    Joined:
    Feb 23, 2018
    Messages:
    218
    Likes Received:
    82
    You should reset all transforms on 3D objects when you’re done modeling. That includes position, scale and rotation. Everything should be zeroed out along with making sure it’s at the 0, 0, 0 origin.
     
  6. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    I would agree, unless having the origin at a specific place serves a specific purpose since you cannot change the origin once in BB3.
     
  7. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    I'm sorry @particles I don't have any idea. It sounds like you have the defeat acting on the Actor so I would expect that to also delete all associated parts.
     
  8. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Yes, When I double click the Actor, I can see the only body in structure so it is deleting. I think we can somehow detect associated parts in the scene and remove. But don't know how.
     
  9. jmiller8031

    jmiller8031 Avid Boxer

    Joined:
    Feb 23, 2018
    Messages:
    218
    Likes Received:
    82
    Your origin point should always be at zero. You can however offset the model from the origin point. It doesn't have to be directly inside or even near the model or anything. Keeping everything at zero makes placement in a game engine a lot easier because you don't have to do any math to figure out where things need to go.It will give you more consistent placement and let you build levels faster.
     
  10. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Hi jmiller8031, thanks for the detailed explanation. It turns out I was doing exactly what you explained with my "wing", with everything at zero and offsetting the object so the origin is where I wanted the rotation point. I just was explaining it incorrectly. Thanks for clarifying. I found with some older models where I had not done that so I'm going back and fixing my ignorant ways.
     
  11. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    I'm with you @particles, if you destroy the object that is designated as the Actor, all hierarchical objects under the Actor should be destroyed automatically....with that said, it would be great to have different death animations attached to each object(maybe possible now...haven't tried it), that if present would override the Actor's death animation.
     
  12. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    @LBPToo somehow managed to find children. But not sure how to remove, it's crashing. So I scaled down to make it invisible.
    var _enabled = false;
    function init(){
    }

    function update(dt){
    }
    function signal(name, value){
    if(_enabled){
    return;
    }
    let obj = this.entity();
    let children = obj.children();

    for(let i=0;i<children.length;i++){
    let child = children;
    child.setScale(0,0,0);
    //child.remove(); // Crashing App
    }
    obj.setScale(0,0,0);
    }


     
  13. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Good job @particles. That's exactly what I did in BB2 to get objects to disappear.
     
    particles likes this.

Share This Page