Archived

This topic is now archived and is closed to further replies.

idx14

3D Character w/ pre-rendered background

Recommended Posts

How would this kind of system be implemented? Y''know, like Grim Fandango or in Final Fantasy VIII? How does the character ''collide'' with objects that aren''t there? And what if my pre-rendered terrain is something other than a flat plane, an uneven terrain of some sort. How would I calculate ''where'' in the 3D space did the user click with the mouse (2d coords) for the character to walk to that spot? What are all my possibilities and weird-ass things that I have to use for this kind-of game? (Because, Honestly, I have no clue whatsoever as to what to do) idx. to code or not to code, that is the algorithm

Share this post


Link to post
Share on other sites
You load a simpler copy of the mesh used to render the background and use that to fill the Zbuffer and for collision detection.

As for the mouse you fire a ray in from the 2D point where the mouse clicked back into the seen and find the 3D point where it first intersects a poly.

A good book to get is “Programming Role Playing Games With DirectX” it’s got a part on using a pre rendered background.
Hope I helped

Share this post


Link to post
Share on other sites
Loading up the entire original mesh probably won''t be the best option considering that a mesh use to render a prerendered background will likely be quite high in polycount.

Do what Abob recommends or might I recommend that you use a different mesh entirely for collision detection. Take a car for instance; You don''t need to check for collision on each little bit of the car, like the sideview mirrors (In fact it might drive your players nuts when they keep getting stuck on tiny protrusions like that). Instead, just use a big rectangular box to resprent the car. Use this method to block out the entire scene. This is rather easy to do if your modelling software lets you use an image as a background in the viewports.

As for properly layering the scene. You could probably use your own kind of Z-Buffering. Basically you would cut up the image of the scene into parts and depending on where the character is, render the parts that are in back first, then the character and then the foreground. I''m not sure is this is a very good solution, but it is all I could thing of right now. I''ll post more if I come up anything else.

------------------------------------------------------------

Stupid divide by zero error. I should be allowed to tear a hole in the fabric of time and space if I want!

Share this post


Link to post
Share on other sites