I have a cube.obj that was saved with vertices at 512x512x512. When i place two of these onscreen i offset them by 512 in the x direction so that they should be next to each other exactly. But onscreen I notice that the second cube is VERY far away from the first.
When I load a mesh how is it mapped to world coordinates (in size)?
I guess in general I am wondering how i set up my world so that my objects are imported at the right scale (every object is 512x512x512 or some multiple of that size) - the player character will be slightly bigger than 128 high - and my objects will be placed on a 512 grid so they "snap" together.
Relative sizes and positions of nodes?
It depends on where the model is in relation to it's center.
Irrlicht puts X + Z center in the center and the Y's zero at zero.
In my milkshape models, I put the model in the center of the X and Z and put the bottom of the feet at Y = 0. One milkshape unit = One Irrlicht Unit at a 1/1/1 scale, I don't know about any other model package.
So, if you cube is at exact center, placing the block the width of the block across is correct.
Irrlicht puts X + Z center in the center and the Y's zero at zero.
In my milkshape models, I put the model in the center of the X and Z and put the bottom of the feet at Y = 0. One milkshape unit = One Irrlicht Unit at a 1/1/1 scale, I don't know about any other model package.
So, if you cube is at exact center, placing the block the width of the block across is correct.
Crud, how do I do this again?
that's what i thought - i have a maya obj converted from a .cob file - the vertex numbers look right - but when i place two cubes they are extremely far apart - when they should only be 512 apart (next to each other) - hmmm, i wonder if the obj importer normalizes all the vertex numbers down to 1,1,1 irrlicht units??? - could i send you my cube.obj for you to check (just for my own sanity)?
my email addy is popomatix at yahoo dot com
my email addy is popomatix at yahoo dot com
I use obj files and they work for me (not normalized or anything), however it took some doing to get this to work through Maya. When I finished my model I had to place it at actual 0,0,0 in Maya (not 0,0,0 according to the object, which is sometimes off, especially after doing boolean operations), then use the freeze transformations option to get the scaling back to normal. If you know of an easier way, let me know, but Maya (at least Maya 5) seems to have issues with keeping consistent measurements.
any chance of a 4.3 sub release so i can get my little hands on the .x importer?! i would like to standardize my objects on that format
seems like an odd effect to be an obj exporter problem - even if the origin is way off i still would not expect the cube to be so far away when set at 512 in the x - only if the scaling was way off - and it does not seem to have a scaling problem
i'll try some other converters to see if i can fix it
seems like an odd effect to be an obj exporter problem - even if the origin is way off i still would not expect the cube to be so far away when set at 512 in the x - only if the scaling was way off - and it does not seem to have a scaling problem
i'll try some other converters to see if i can fix it
aha! - so it was the converter after all - the conversion multiplied all the vertices by 0.100 so the cube was a lot smaller than 512 - i corrected that and have then joining nicely - i guess i couldnt tell because the first cube was so close to the player cam that it looked huge - and the intermediate file (a .cob) had the right vertice numbers - and maya obj is in hex which is ... hard to read
thanks for all the help! i hope to have something good to show soon!
thanks for all the help! i hope to have something good to show soon!