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 Feb 20th '12, 20:02

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/3D-static_101/marathon3Dstatic.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

jessenator
The Evergreen State

Post Feb 20th '12, 21:30

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

treellama
Pittsburgh, PA

Post Feb 20th '12, 22:04

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

jessenator
The Evergreen State

Post Feb 20th '12, 22:15

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

treellama
Pittsburgh, PA

Post Feb 22nd '12, 03:01

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

jessenator
The Evergreen State

Post Feb 22nd '12, 05:36

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

Shadowbreaker
Melbourne, Victoria

Post Feb 22nd '12, 20:51

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.0.2         Plugins:  Marathon Classic HUD  ·  System Se7en  ·  more
User avatar

Hopper

Post Feb 23rd '12, 02:46

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

jessenator
The Evergreen State

Post Feb 23rd '12, 07:51

As a fellow Maya user, that's good to know. [MUp]
User avatar

Crater Creator

Post Feb 23rd '12, 15:57

could it be 1000cm = 1WU?
User avatar

JohannesG

Post Feb 23rd '12, 16:36

Jóhannes G. wrote:could it be 1000cm = 1WU?

Sure, just set your scale to 1.024
User avatar

treellama
Pittsburgh, PA

Post Feb 24th '12, 03:15

Strange, I never had these problems with Blender. I'm tempted to mess around with 3d stuff again...
User avatar

Not Invented Here

Post Feb 24th '12, 03:44

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

jessenator
The Evergreen State

Post Feb 24th '12, 15:48

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

Not Invented Here

Post Feb 24th '12, 16:32

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.0.2         Plugins:  Marathon Classic HUD  ·  System Se7en  ·  more
User avatar

Hopper

Post Feb 25th '12, 01:05

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
User avatar

jessenator
The Evergreen State


Return to Aleph One Discussion



Who is online

Users browsing this forum: No registered users

cron