Page 5 of 5

Re: Presenting UruDistro

PostPosted: Sat Nov 26, 2011 9:13 am
by Chacal
Sirius wrote:About moving objects: IIRC you don't need any modification for objects that have a Coordinate Interface, as both their physics and drawable are calculated from the objects origin/rotation. Physics might be a bit more complicated as they can use or not the coordinate interface (I had some issues with these lately).


That's good news, but where do you make changes to the object's origin/rotation?

Sirius wrote:Wouldn't it be easier to change the objects rotation and position directly in the PRP ? Blender would be used only to make sure the location you want to apply to the object is correct.


That is what we're doing -- we're making an object file (.uof) that will change the objects rotation and position directly in the PRP (the player's prp). I guess we could do it all by directly editing a .prc file, but it seems easier to me to let Blender calculate the new values for position/rotation.

Re: Presenting UruDistro

PostPosted: Sat Nov 26, 2011 11:50 am
by Sirius
Sorry - you need to apply the modifications to the Coordinate Interface (but you'll have to understand how it works, which doesn't seem obvious to me).

Ok, I didn't really understand how you wanted to use Blender for this kind of modification. I thought you somehow wanted to remove the visible from the old object and replace it with the one in Blender (which means UV mapping would be recalculated, and the user could modify the whole mesh - if I understood correctly you just want it to calculate the new positions for the verts).
I guess you know better than me how this should work anyway.

Re: Presenting UruDistro

PostPosted: Sat Nov 26, 2011 10:00 pm
by Chacal
Sirius wrote:I guess you know better than me how this should work anyway.


Not really. I don't even know what the coordinates in the plCoordinateInterface are for.
I'm not a builder in any way.

Re: Presenting UruDistro

PostPosted: Sun Nov 27, 2011 6:04 am
by Sirius
I meant, you know how you want your UruDistro to work.
All I know about the Coordinate Interface is that it stores the object's origin (position, rotation and scale). An object without a Coordinate Interface can't be animated. I tried to understand how they stored the position, rotation, etc, but that's not really easy.

Re: Presenting UruDistro

PostPosted: Sun Nov 27, 2011 10:16 am
by Chacal
That makes sense. And the plGenericPhysical stores the same info about the object's collision mesh, I don't know if it is absolute or relative.

It is probably easier to just delete the old object and replace it with the new one at a new position.

Re: Presenting UruDistro

PostPosted: Tue Nov 29, 2011 9:20 pm
by Tsar Hoikas
Sirius wrote:I meant, you know how you want your UruDistro to work.
All I know about the Coordinate Interface is that it stores the object's origin (position, rotation and scale). An object without a Coordinate Interface can't be animated. I tried to understand how they stored the position, rotation, etc, but that's not really easy.


If there's no Coordinate Interface, the drawable spans contain the matrices, which are indexed by span ID (you can find this out by looking for the index specified by the DrawableInterface in the DISpanIndices). The physical will contain the physics mesh and be completely independent. Things get complicated when a CoordinateInterface enters the picture. I'm not certain enough about the processes to comment on them.

Also, for your own sanity, try to avoid editing GenericPhysicals when you can help it. Data tends to get lost when writing those out to the stream. There are still some unknown havok flags, and that becomes readily apparent in some cases... like door regions.