Game Development Community

Model Origin

by Wex · in Artist Corner · 08/21/2006 (7:47 am) · 6 replies

Origins of DTS models that are loaded into the engine always seem to be set at the center of the bounding box. Is there any way of setting the origin elsewhere (like at the base of the model). I'm wanting to do this for scaling, so that if I scale it resizes from the base up, not the center-out. Repositioning the model afterwards isn't ideal for what I'm doing.

#1
08/21/2006 (8:15 am)
A Bounds Box is setup by anyone who is creating an object.

So for example, if you read on how to export a simple shape/Character from Chapter 8.0
it will explain how to setup a bounds box.

A bounds box is always set up centered with enough space to include whatever motion
an object/character might do within a cycle.Its also setup so the bottom of the box
represents the bottom of the object/charcter.

From what I know, you would have to edit the model yourself, and reposition the bounds box in the original file.
#2
08/21/2006 (8:28 am)
Heh, cheers. But I'm not using models under 'normal' circumstances. I guess it needs more explianation.

The system I'm putting together is for making pipes. The model is (want's to be) a simple cylinder with one of it's ends at 0,0,0, of length 1, diameter 1, and running along (up) the x-axis.

Then, When I load the model into the engine I scale it by certain amounts depending on how long and how wide I want the pipe. If I want it 40 units long and a diameter of 5, then I simply scale by '40 5 5'.

The position of the pipe (the data I have) is that of one-end of the pipe. For the scaling and positioning to work accuretely; I need the origin to be at one end of the pipe, and not in the middle of the model.

As a current work-around I reposition the pipe by half it's length in the direction it's running, but that's not really a final-solution.

So, all I need to do is specify where I want the origin instead of the export tools (from 3DMax) picking it for me. Is that possible?
#3
08/23/2006 (1:03 pm)
You can edit the pivot location of the bounds object in Maya, so I guess it should be the same in Max
#4
08/23/2006 (1:24 pm)
Wow, o.k!

You and I just happen to be doing the same thing. But Im useing a PIPE system
for my actual game play, and the player is passing through it like tunnels.

Im building a pipe system useing GLB3.0 and 3dsmax 8.0.
Ive constructed 360 various pieces, straight, corner, curved, half curved, half height, full height, open sided,etc
If I need something to be longer than the longest size Ive created I just use two of it or more.

I see where your going with your scaling, but I think the scaling would make your textures look like they are stretching? However you may have everything just colored, i dont know.

The comment the Craig Harden above writes is correct, you could reposition the PIVOT gizmo so it was oriented
that 0,0,0 was the actual end of your pipe and not the centre. I do this in MAX all the time when I model my player
so his origin is at his feet instead of Centred.

Again Chapter 8.0. Its old, but a wealth of knowledge.

-Surge
#5
08/25/2006 (4:16 am)
Okay, cheers for the confirmation. I'll be trying that out soon as I get the time.

Have you done anything regarding dynamic generation of corners? My pipes need to be joinable at any angle. Plus, I'm not sure about texturing just yet. As it stands they are just solid color, we'll be keeping it like that for the time being.

I'm thinking about doing a simple pipe-class addition to the engine core in order to implement all the functionality that I'm going to be needing.
#6
08/25/2006 (4:46 am)
Ive done no work on dynamic generation what so ever.

Mine are all placed by hand in the world editor. I think up the shape and height
and complexity and keep building. Whats amazing to me is that so far I havnt
been able to slow the engine down at all with my interiors, no matter how many
pieces I link together.

Good luck with your pipe class, I think its a good idea.