Prerendered game (Resident evil, Final Fantasy etc)

Not too long ago I made this little house in blender and recently like in the last hour or so I’ve played with render layers. I managed to line up transparent planes in the screen to achieve a prerendered effect in the game engine. It works very nicely with the trees I put in the scene. But it was a crappy looking quick test now I was thinking of creating a little prerendered demo with animated sprites. I was thinking either a windmill or a flag or some leaves could wave in the wind. Then you put a proper character model in the scene and have him run around.


If you model the demo on the Final Fantasy games you could have the player start on the world map enter a town and then render out 4 or 5 different camera views of the town and have the charater seamlessly move in between the scenes. There is no need for a panning camera, but there are some things I’m not sure of how to achieve.

•Looping leaves blowing on a tree?
•Looping a flag?

Also I have several projects that I’m working on this idea was the result of 45 or so minutes of messing around with render layers. So it would be nice if someone would want to help out with the project, it’s not a terrible amount of work but it’ll still take some hours to create a decent looking little town. If you’re interested and maybe not sure about the technicalities of what has to be done I’ll tell you the workflow.

  1. Model and texture the location.
  2. Place all the cameras.
  3. For each camera look up how many objects the character is going to be able to walk behind.
  4. Create a render layer for each object the character is going to be able to walk behind and put the objects on different layers.
  5. Render out the scene.
  6. Repeat step 4 and 5 for each camera.
  7. Create a plane in the center of the camera, copy the rotation of the camera to the plane and drag the plane away from the camera.
  8. Line up all the planes with the objects in the scene and scale them until they cover the camera view perfectly.
  9. Unwrap each plane and import your render layers.
  10. Do this for all the cameras in the scene.
  11. Now create invisible geometry to serve as collision detection for the character, use the original models as guides but make the invisible geometry low poly.
  12. Create an invisible plane which upon being touched by the player freezes the scene fades the screen to black and switches camera AND enables the planes that belong to that particular camera.
    DONE

That’s the pipeline, it’s quite tricky but if done right could look amazing, especially if elements of the prerendered scene could be animated. I was thinking maybe it would be possible to loop a water simulation to serve as a river. The looping process itself I have no idea how to achieve, keyframed animations is one thing but simulations is something different. Anyone who knows how to do this?

Anyway if anyone would be interested to work on this together since it’s quite a bit of work let me know. We would aim for something akin to the house I made up there, it would probably look a bit better since that particular house is very round and tricky to model.

There is a example of using the zDepth of the render as a mask, so objects closer to the camera occlude the player, it’s in smoking mirrors game the hole, and a recent discussion in the discussion section.

“objects closer to the camera” I’m not sure about the technicalities but you’re dealing with sprites not objects. I tried the method above and it worked very nicely:
http://imgur.com/1Tf48qb

It takes the whole 3d scene, renders it flat, but renders another image that is the depth at each pixel,

A shader then masks the player with the background if they walk behind it.

No need for sprites*

I have no idea of how to do that, seems difficult, if it’s fast maybe it would be preferable. It’s not really a problem, what is a problem is how one would loop an animation of say leaves blowing or a river pouring. Anyway I’ll post whatever progress I make in this thread.

I suggest you: render the scene without the looping object. Than make the scene objects be transparent and only receive shadows(look for tutorials on how to do it). After that you put in flag and render all the needed frames. Than use image editing software to put it in some scale sprite(usually 16 frame animation will be totally enaugh). Than you put it in scene in right spot. For the river, though, you may want to animate the base image itself(as river is more complex object, involves refraction).

render the scene without the looping object.

You mean render the scene without the water simulation first, I guess one would want to do this to not have to rerender all that detail at each frame of the simulation, would take a lot of time right?

Than make the scene objects be transparent and only receive shadows

Oh I see, like if a windmill would cast shadows on the ground you would want to only have the shadows cast on the ground be rendered out of the looping sprite.

After that you put in flag and render all the needed frames. Than use image editing software to put it in some scale sprite

For the river, though, you may want to animate the base image itself(as river is more complex object, involves refraction).

This I don’t understand, what’s a scale sprite? I was thinking for the river you might want to simulate the water flowing down stream then you grab maybe 20 or so frames from the middle of the simulation and you make the transition from the last frame to the first frame be seamless. But I’m not quite sure how one would do that, maybe you could loop the frames in a video program using a fade to effect or maybe the river is so noisy that you won’t notice the transition. This might not be a problem for the flag since you actually could keyframe it and tweak it into looping that way. But for any kind of complex simulation it’s different, I actually don’t know how to do this but I know it’s possible to have the leaves on a tree react to wind, how would one loop that…

I’m not sure about this, I’m blocking out the town as I’m typing this, I’ll just concentrate on the scene and hopefully any of you guys who knows more about this than I do might want to help.

Hi BPR, I actually didn’t use the z-buffer I just duplicated the background plane, moved it closer to the camera, cut out some geometry and projected on to the new plane.


@ Leinadien

There’s a great talk about using palette shifting to achieve animations.


Click the picture to enlarge

I blocked out the village/farm, also placed the cameras. The entrance to the village will be picture 1, you’ll emerge from behind the tree then you’ll be able to walk forward towards the bridge and the sign. The sign will read village of blah blah and right: mount blah blah. If you choose to go to mount blah blah you’ll be taken to picture 5, nothing of interest here just another view of the village. If you choose to walk over the bridge you’ll be taken to picture 2, this is a brief glimpse from above of the bridge and the beautiful water simulation. I thought there could also be a guy sitting on the bridge trying to catch a fish.

Then you’ll come to picture 3 which will make it possible for you to access two houses, the mill and the random house to the left. There might be some random NPCs walking around randomly here that you can talk to. First after you turn around the corner at the end of picture 3 will you be taken to picture 4. Naturally the NPCs might want to walk here too, the nice thing is that the actual 3d models can walk around in realtime even when the player is switching cameras. Here is also the inn and a gate which is closed because wouldn’t want to get carried away.

Also found this town theme which I thought might fit the scene well.


There would be other sound effects added like the the sound of the river for example.

Here is a list of the models that needs to be made.
•3 types of trees
•10 rocks
•A fence
•Square house
•Mill
•Inn house
•Gate
•Wall section
•Tower
•Broken carriage
•Sign
•Ground
•3 citizens (Could be rather blocky)
•Cow
•Barrel

Besides the models we’ll need a water simulation for the river and an animation for the mill wheel, I was very conscious of only having the water show in one camera, wouldn’t want to mess around with that in every camera. If possible it would be nice to see the leaves wave a bit, I have no idea how to do that. Then we’ll need to create the grass, I have messed around with this before, see the round house in the first post, I don’t really like messing with these particles. If anyone is very good at the water simulation, good looking grass etc you’re welcome to do that if not I’ll try do it.

But the leaves on the trees is no problem because of fibermesh, I think it’ll be possible to produce nice looking leaves. It might be possible to do something similar with the grass, but I haven’t tried it yet. If you want to help finish the scene let me know and I’ll send you to blend file. After the models, simulations and grass is done we’ll render out the different camera angles, we might be able to touch them up in photoshop, the sky for example could be fixed in photoshop and the horizon.

Then we use the original scene to make the rendered views interactive, create collision bounds etc, will be done quickly. Areas that I’m unsure of is the:

•Water simulation
•Good looking grass
•Animated looping textures in the game engine?

Yes smoking mirror I’m not sure how to loop sprites in the game engine, if you know all about it and would be interested in helping out that would be great otherwise I’ll deal with it when it’s time to animate the textures.

Smoking_mirror, reminds me of Men in Black the game, on the PC, and Playstation.