PDA

View Full Version : Model Swapping


RabbidMickeyMouse
9th January 2010, 09:06 AM
If the position, orientation, and some sort of model ID are known at all times when the emulator is drawing them, can their models be swapped with other models specified by the user as they're drawn? Does the game control the camera and the way the world is drawn to the extent everything is rendered by the game, as opposed to the 3D being handled by OpenGL or DirectX when emulated?

How do the retexturing mods operate? I'd imagine if the 3D was drawn by DirectX or OpenGL, that what I was talking about before would likely be more possible, unless Rice Video doesn't have that level of control/access to drawing, and merely knows where and how the texture is being drawn on the final rendered 2D screen plane, as opposed to knowing where it exists in the gameworld in 3D, and has to 'paint over' the existing rendering job of the game, and approximate how the texture is skewed accordingly.

Although, that assumes that the points are known for whatever reason (let alone whether the textures are facing the camera, and what objects are known to having being drawn at any given time), which if that were the case, then everything drawn can be known in a three dimensional sense, and passed through another rendering engine, as opposed to the game's native engine. It would seem then either way, swapping models is possible.

Of course, I don't know how the emulator operates, or Rice Video for that matter, though I'm interested in hearing an explanation.

I guess basically, I'm asking how rendering is handled with Project64. Does it draw the 3D itself in some fashion, as if you could take a snapshot of the game world, and operate camera freely (albeit separate from the game's scripting etc)? Is the rendering handled by the game, or passed to another rendering engine?

I'd imagine that collision scripting, however any particular game operates their own engines, that they would remain the same, as the game isn't checking the video memory pixel for pixel, but basing itself off of existing known models in code, regardless of the drawn model (as opposed to the collision model, even if it's the same thing), and the swap is superficial and seperate from how the game is operating otherwise; just that it would look odd to swap a model with the existing that appeared to overlap and clip into one another, for being too large or unfitting.

HatCat
9th January 2010, 11:28 PM
In texture replacement, the texture memory part of the game that's loaded into RAM for display in Project64 is replaced.

The game holds the definitions, and the emulator chooses what to make of them.

Other than that it's a bit difficult for me to sift through and understand, but maybe that cleared something up.

I can't say near as much as with swapping models, but I'm sure that someone at EmuTalk can. Actually there are GameShark codes for cheats that modify model geometry; I'm sure that by knowing the identification, positioning and other situational factors as you mentioned then there is some start.