3dMax .3ds exporting

Blitz3D Forums/Blitz3D Beginners Area/3dMax .3ds exporting

CodeOrc(Posted 2007) [#1]
Hi Everyone,

I use 3D Max for my modeling and exporting and all is well but I have a question.

It may be that the solution is in B3D, not Max.

Here goes, I have a box at 30,30,30 in Max. I export it as a .3ds file.

I load the box on B3D and it places it appropriately at 30,30,30.

Now I create a sphere in b3d code, and tell it to position itself at the boxes EntityX(box),EntityY(box),EntityZ(box).

But it puts my code created sphere at 0,0,0, not at 30,30,30 where the box is.

So it seems Max gave my box a world coord 0,0,0 but offset the box to 30,30,30 as it was in Max.

So how do I reset the coord to the middle of my box so my code created sphere will go to the box itself, not 0,0,0?

Any help would be greatly appreciated.

thx


b32(Posted 2007) [#2]
With PositionMesh you can change the centerpoint of the box.
Use ie. PositionMesh box, -15, -15, -15
Else, you could use FitMesh box, -15, -15, -15, 30, 30, 30, 1
And again, if nothing else works, use PositionEntity or use a pivot.


CodeOrc(Posted 2007) [#3]
ty, I'll give it a go


GfK(Posted 2007) [#4]
Now I create a sphere in b3d code, and tell it to position itself at the boxes EntityX(box),EntityY(box),EntityZ(box).
This is down to the way you've exported from 3DS Max.

When you export from 3DS Max to .3DS format, ensure that world coordinates 0,0,0 in Max, are where you want the axis of your object to be. If you have a cube at 30,30,30 in Max, that's where the vertices will be in Blitz, but its origin will still be at 0,0,0. Try rotating your cube in Blitz to see what I mean - it will rotate around 0,0,0, and not around the center of the cube as I'm guessing you'd expect.


CodeOrc(Posted 2007) [#5]
So if I understand what your saying, when I export my .3ds box from max, then load into b3d, then move the box even just a little via code- my new world coords for the box will be removed from 0,0,0 and put to 30,30,30 where the box is?


chwaga(Posted 2007) [#6]
shouldn't position 0,0,0 on max be where you have placed your entity, and the vert coordinates are relative to point 0,0,0 on max, so if your mesh on max is placed at 300,0,0, then if you placed the exported .3ds in blitz at 0,0,0 ; the actual mesh would be at 300,0,0?


CodeOrc(Posted 2007) [#7]
chwaga<> true, but if I want to point an entity to it and have it travel to that location, it just goes to 0,0,0- I want it to travel toward the mesh.

So the question was, how do I reset the x,y,z to the "Actual" location, not the 0,0,0 from Max?


Lagrange(Posted 2007) [#8]
I always do it like Gfk said. move your object in max, so that its origin is at 0,0,0 (in max) and if you export it then as a .b3d-file it will have the correct origin also in blitzbasic