Export/Import OBJ

jmucchiellojmucchiello Posts: 2,808

I've used the export/import trick to change the rotation point of an object in the past. Put the object at origin with the new center point. export/import. center moves.

But now it doesn't work. Did something change? Did I flip a setting I shouldn't have?

Currently I have a sphere and the origin point of the sphere is at the bottom of the y axis of the sphere. I want to move it to the center of the sphere. So, for a 1 m sphere, I should be able to set y-translate to -50, export/import, and the imported sphere would have it's center of rotation in the center of the sphere. Did I hallucinate this working?

Any guidance appreciated.

Post edited by jmucchiello on

Comments

  • felisfelis Posts: 6,665

    The easiest way, is to activate the Joint Editor tool, and with the sphere selected, move the arrows to the desired location, i.e. the green in center and I would place the red at top.

  • jmucchiellojmucchiello Posts: 2,808

    felis said:

    The easiest way, is to activate the Joint Editor tool, and with the sphere selected, move the arrows to the desired location, i.e. the green in center and I would place the red at top.

    But I know I've done this before and I also know I've never used the Joint Editor before. I can't make heads or tails of that thing. Someday.

  • felisfelis Posts: 6,665

    I think DS when importing an object, plces the origin at world center.

    So if you in a modeller move your sphere half down and reimport, origin should be placed in center.

    I just consider it easier to do with Joint Editor.

  • jmucchiellojmucchiello Posts: 2,808

    felis said:

    I think DS when importing an object, plces the origin at world center.

    So if you in a modeller move your sphere half down and reimport, origin should be placed in center.

    This is exactly what I'm doing that isn't working. But I know it used to work. I have a 1m sphere at -50 Y so the center of the sphere is at origin. And the root point of the sphere is at (0,-50,0). Export. Import. The root is still at (0, -50, 0). I'm expecting it to be (0,0,0) but it isn't working.

  • jmucchiellojmucchiello Posts: 2,808
    edited October 29

    felis said:

    The easiest way, is to activate the Joint Editor tool, and with the sphere selected, move the arrows to the desired location, i.e. the green in center and I would place the red at top.

    How is there a single bone joint?

    Like this? This is a 10 cm sphere. so 5 cm Y should be the center. Even that didn't work.

     

    Untitled4.png
    1491 x 864 - 150K
    Post edited by jmucchiello on
  • felisfelis Posts: 6,665

    After you adjusted the origin, you must save it, either in a scene/subset or as a new prop.

    You can't change the created primitives.

  • jmucchiellojmucchiello Posts: 2,808
    edited October 29

    And why would I have known this? Do I also have to load it again? What will have changed internally, saving the scene, that will make the export different before vs after?

    • Save as sub scene...
    • Export
    • Import
    • No change, loaded OBJ has old origin, not new one

    AND

    • Save as sub scene
    • Merge sub scene
    • Export sphere (2)
    • Import
    • No change, loaded OBJ has old origin, not newone.
    Post edited by jmucchiello on
  • felisfelis Posts: 6,665
    edited October 29

    An imported obj does not have information of origin and DS places it at world center.

    Here I created a sphere, moved origin to center, and saved it. And it loads with origin in center.

    Sphere_center.PNG
    1047 x 490 - 87K
    Post edited by felis on
  • felisfelis Posts: 6,665

    I was wrong.

    DS places imported objects at the botton of the object (the bounding box).

     

  • jmucchiellojmucchiello Posts: 2,808
    edited October 29

    So how do make it the middle so that when I use x-rotate, the sphere spins about its center and doesn't spin about its base? This has to be possible.

    I can child it to a NULL and rotate the NULL. But that's not an object I can setup as a freebie download.

    Post edited by jmucchiello on
  • algovincianalgovincian Posts: 2,715
    edited October 29

    jmucchiello said:

    So how do make it the middle so that when I use x-rotate, the sphere spins about its center and doesn't spin about its base? This has to be possible.

    I can child it to a NULL and rotate the NULL. But that's not an object I can setup as a freebie download.

    Use the joint editor and save as in a native format as opposed to an obj (imported).

    - Greg 

    ETA: Also, one other thing that may add to confusion is that if you have 2 saved files named 1.duf and 1.obj, DS will load 1.duf when you specify loading 1.obj

    Post edited by algovincian on
  • jmucchiellojmucchiello Posts: 2,808
    edited October 29

    algovincian said:

    jmucchiello said:

    So how do make it the middle so that when I use x-rotate, the sphere spins about its center and doesn't spin about its base? This has to be possible.

    I can child it to a NULL and rotate the NULL. But that's not an object I can setup as a freebie download.

    Use the joint editor and save as in a native format as opposed to an obj (imported).

    - Greg 

    ETA: Also, one other thing that may add to confusion is that if you have 2 saved files named 1.duf and 1.obj, DS will load 1.duf when you specify loading 1.obj

    They all have seperate names.

    I eventually want to save as an OBJ to combine several primitives into a single mesh. (I tried adding an object inside the sphere. It didn't help.)

    Some day I will bite the bullet and do this the right way using Blender. It's just there's no learning curve on DS primitives.

    EDIT: Oh, I can confirm, the native DUF of the sphere post-joint editor did retain the center point. But I still need this to survive the OBJ step when there's more than a sphere.

    Post edited by jmucchiello on
  • algovincianalgovincian Posts: 2,715

    OBJ will never save the pivot point - it's not part of the format spec. Importers set the pivot point, so DS may set the pivot point different than Blender when importing the same OBJ file.

    I'm not sure what you mean by "the right way using Blender". If you want to distribute as an OBJ, it will never contain pivot information no matter whether you export it from DS or Blender:

    https://en.wikipedia.org/wiki/Wavefront_.obj_file

    - Greg

  • jmucchiellojmucchiello Posts: 2,808
    edited October 29

    richardandtracy said:

    Changing the origin is here: https://www.daz3d.com/forums/discussion/535331/how-to-change-origin-of-a-prop-without-moving-it-solved

    I don't understand that at all. So, starting DS and muddling through.....

    I don't have two objects. I have one object: A sphere. I want the center of the sphere to be the center of rotation on all three axes.

    After moving the origin node to -50 Y and the end node  to +50 Y, if I switch to the geometry editor, I can't click on the center point because the surfaces are in the way. I don't want any surface to be the center. How can I add a rigid follower node to a non-surface point? Am I missing something?

    In any case making the origin and the end the same spot in the center of the sphere doesn't survive export/import. 

    I tried the asset figure thing. It moved the end point 1m away from the center. So it kind of worked.

    Post edited by jmucchiello on
  • Richard HaseltineRichard Haseltine Posts: 112,126

    A Rigid Follow Node is geometry, though any child can of course be offset. The idea of an RFN is to have a way for a child to follow changes in the mesh, which would imply updating the centre point if you wanted it to behave in the same way - which DS can't do as such.

Sign In or Register to comment.