Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

import units

edited March 20 in Codea Craft Posts: 496

when reading an obj file, what can you tell me about how codea handles units (size)? i know(?) that .obj are unitless, but of course they have relative (and absolute) sizes.

this info will help me size things for import. thanks!

I've done some experiments using Shapr 3D. If you build a 1 meter cube in Shapr, its .OBJ coordinates will be the corners of the unit square. That cube imports into Codea as the same size as a standard craft.model.cube() with scale = vec3(1,1,1).

So 1.0 in .OBJ = 1.0 in Codea. Nice.

Comments

  • dave1707dave1707 Mod
    Posts: 8,193

    @RonJeffries Have you tried making different sized cubes to see what those sizes are in Codea. I tried using Sketch 3D to see how the size of things from that works, but I couldn’t find any worth while directions on how to use the code or how to get it to Codea.

  • Posts: 496

    yes. i made lots of cubes. in shapr, 1 meter = 1.0 in Codea coords. 1 foot - 0.3048, etc.

  • Posts: 496

    i'll probably try others. p.s. .obj format is just text.

  • edited March 20 Posts: 1,605

    @RonJeffries - must admit I'm a bit naive here - I thought that objects created in 3D packages like Codea were just arbitrary i.e. you just build your World/Scene scaling everything according to your own designs.

    I always thought that the draftsman type packages were the only ones which built models to scale - usually includiing the scale on the images.

    Then again - you can take any object and scale it to your own universe so in some ways real scale is irrelevant (unless your a draftsman).

  • Posts: 496

    you need to know how big to make it in your 3d maker of choice, to be close enough to the right size on import. or at least i need that.

  • Posts: 1,605

    @RonJeffries - is the object you are loading a stand-alone object or part of a scene? If you have any other object that you are using you can scale you new object relative to the existing one. Say you have a cube and you want to add a sphere which is twice as big. Build your object in the design package you are using and load it into Codea then scale accordingly - resave the new object from your Codea project.

    Or, you could load all of your objects into your design package and scale them there - then save/export each component out once you have adjusted sizes.

    Shapr 3D looks expensive at $20 per month, I personally do not like subscription packages - have you tried Blender.

  • Posts: 496

    yes, i hate blender. for real object creation one would probably go that way, or to something like 3DSmax.

    i'm exploring different apps, with an eye to nice ipad ones, as part of learning and exploring. shapr can't do everything one needs to create models, but it's a delight to use. 3DC.IO is almost too simple. uMake would be good but seems flaky. etc ...

    craft cubes are basically 1x1x1, so when you build things to go into that world, they kind of need to relate to that scale.

    i don't know how to save things out of codea, would appreciate a pointer.

Sign In or Register to comment.