3D object Scaling

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.
Post Reply
User avatar
jessenator
Cyborg
Posts: 91
Joined: Oct 22nd '08, 00:35
Location: The Evergreen State
Contact:

As far as adding 3D object functionality (I've downloaded the demo from Simplic7y) is there a correlation between native world units and the units we model with in our respective 3D programs?

e.g. are 10cm in Maya equal to 1 world unit in marathon or something similar?

I looked here and here:http://jemmet.home.xs4all.nl/spnkrghol/ ... tatic.html but I didn't get anything definite in terms of scale to build on. Any protip would be nice.

Thanks
â?¢musicâ?¢sfxâ?¢texturesâ?¢bullsh*t
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

I don't know about Maya units, but according to the MML guide, Aleph One's 3D model loader uses internal units, i.e. 1/1024 WUs. You can adjust this by changing the scale attribute in the model MML.
Last edited by treellama on Feb 20th '12, 21:30, edited 1 time in total.
User avatar
jessenator
Cyborg
Posts: 91
Joined: Oct 22nd '08, 00:35
Location: The Evergreen State
Contact:

Treellama wrote:I don't know about Maya units, but according to the MML guide, Aleph One's 3D model loader uses internal units, i.e. 1/1024 WUs. You can adjust this by changing the scale attribute in the model MML.
Maya can model in mm, cm, meter, inches, feet, yardsâ?¦ but I guess what matters is the OBJ-to-AO relationshipâ?¦ which I don't know.

I could make a scale guide for myself and others who'd like it, I guess. Just a trial and error, plug some various-sized polys in game and see what happensâ?¦
Last edited by jessenator on Feb 20th '12, 22:06, edited 1 time in total.
â?¢musicâ?¢sfxâ?¢texturesâ?¢bullsh*t
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

jessenator wrote:Maya can model in mm, cm, meter, inches, feet, yardsâ?¦ but I guess what matters is the OBJ-to-AO relationshipâ?¦ which I don't know.
Aleph One probably ignores the units. So pick whatever.
User avatar
jessenator
Cyborg
Posts: 91
Joined: Oct 22nd '08, 00:35
Location: The Evergreen State
Contact:

Treellama wrote:Aleph One probably ignores the units. So pick whatever.
You are right, sir, units must just be for Maya's mayajunk. 1024 of anything (cm) makes 1 world unit. Now if only my UVs worked.
â?¢musicâ?¢sfxâ?¢texturesâ?¢bullsh*t
User avatar
Shadowbreaker
Vidmaster
Posts: 3436
Joined: Jan 22nd '06, 18:56
Contact:

jessenator wrote:Now if only my UVs worked.
I actually tried out some 3d objects I made recently in A1. I had to flip my texture file vertically after I had created it for some reason... I initally thought it was some weirdness of my 3d program, but it might be what's wrong with yours.
User avatar
Hopper
Mjolnir Mark IV
Posts: 585
Joined: May 10th '09, 17:02
Contact:

Shadowbreaker wrote:I actually tried out some 3d objects I made recently in A1. I had to flip my texture file vertically after I had created it for some reason...
Make sure you're using the MML model type of "obj", not "wave", for Wavefront models. The old loader needed texture flipping and other awkwardness, so gjditchfield and I added "obj" to support a saner workflow.
Last edited by Hopper on Feb 22nd '12, 20:53, edited 1 time in total.
Aleph One:  Download 1.2.1         Plugins:  Vasara  ·  more
User avatar
jessenator
Cyborg
Posts: 91
Joined: Oct 22nd '08, 00:35
Location: The Evergreen State
Contact:

Hopper wrote:Make sure you're using the MML model type of "obj", not "wave", for Wavefront models. The old loader needed texture flipping and other awkwardness, so gjditchfield and I added "obj" to support a saner workflow.
I think this was my problem- I flipped the texture map and it worked great. I'll try the "obj" type and check it out.
EDIT: checked it out- works just dandy. Thanks for the update, Hopper & gjditchfield!

At first I was afraid that the OBJ did not export my UVs at all (which Maya at one point didn't) but it was the map flipping.

OH PS- it's not just any random unit that exports correctly from Maya ( I don't know if other packages will work this way too, but be sure to check) 1024cm (working units in CM only) will yield 1 WU. I just tried 1024mm and no dice.


1024cm=1WU

Final Answerâ?¦
Last edited by jessenator on Feb 24th '12, 03:29, edited 1 time in total.
â?¢musicâ?¢sfxâ?¢texturesâ?¢bullsh*t
User avatar
Crater Creator
Vidmaster
Posts: 943
Joined: Feb 29th '08, 03:54
Contact:

As a fellow Maya user, that's good to know. [MUp]
User avatar
JohannesG
Mjolnir Mark IV
Posts: 607
Joined: Jan 22nd '06, 23:52
Contact:

could it be 1000cm = 1WU?
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Jóhannes G. wrote:could it be 1000cm = 1WU?
Sure, just set your scale to 1.024
User avatar
Not Invented Here
Born on Board
Posts: 45
Joined: Jul 19th '11, 22:19
Contact:

Strange, I never had these problems with Blender. I'm tempted to mess around with 3d stuff again...
User avatar
jessenator
Cyborg
Posts: 91
Joined: Oct 22nd '08, 00:35
Location: The Evergreen State
Contact:

Ok,

So upon further testing I've discovered that the perspective, at that range, affects the 3d OBJ files differently (albeit slightly) than the steps. Moving about right next to the steps made it clear- the top of the cylinder was skewed looking up from ground level, but the top of the cylinder meets the steps at 1WU looking from the top step- Problem solved.

1024CM=1U


Here's what I'm on about:

[attachment=5511:magica.mov]
Attachments

[The extension mov has been deactivated and can no longer be displayed.]

Last edited by jessenator on Feb 24th '12, 03:46, edited 1 time in total.
â?¢musicâ?¢sfxâ?¢texturesâ?¢bullsh*t
User avatar
Not Invented Here
Born on Board
Posts: 45
Joined: Jul 19th '11, 22:19
Contact:

You always want a slight margin where an object may come into contact with a surface like that. In general, it's better to just avoid situations where 3d objects intersect with walls and poly sides, since it can cause problems with rendering.
Last edited by Not Invented Here on Feb 24th '12, 15:49, edited 1 time in total.
User avatar
Hopper
Mjolnir Mark IV
Posts: 585
Joined: May 10th '09, 17:02
Contact:

jessenator wrote:So upon further testing I've discovered that the perspective, at that range, affects the 3d OBJ files differently (albeit slightly) than the steps.
If your computer can handle it, running in Shader mode will remove the perspective mismatch. Classic is and will continue to be the default renderer, so you'd want to design keeping in mind how things look there, but Shader is more accurate for this sort of testing.
Aleph One:  Download 1.2.1         Plugins:  Vasara  ·  more
User avatar
jessenator
Cyborg
Posts: 91
Joined: Oct 22nd '08, 00:35
Location: The Evergreen State
Contact:

Not Invented Here wrote:You always want a slight margin where an object may come into contact with a surface like that. In general, it's better to just avoid situations where 3d objects intersect with walls and poly sides, since it can cause problems with rendering.
Naturally. I was just getting pissed at, what I thought was, a mismatch of dimensions, marathon world units to real-world units, etc.- wanting to build accurate models- and just set up a purposeful intersection to winkle out the truth.
If your computer can handle it, running in Shader mode will remove the perspective mismatch. Classic is and will continue to be the default renderer, so you'd want to design keeping in mind how things look there, but Shader is more accurate for this sort of testing.
WOW. I would never have thought to mess with that, but the 3-point perspective is great! Cheers again to the developers like you and treellama.
â?¢musicâ?¢sfxâ?¢texturesâ?¢bullsh*t
Post Reply