Samstag, 17. September 2016

rendering ISO-tiles with blender

Back in 2009 I had a blog about flash game development. After taking it offline I've got some requests to put some content back online. Today I found a backup of the blog and some posts still seem to be interessting to me. So I'll repost some of them here. This is one of them.

For a project I am planning I want to render iso tiles with blender. After some research with google and in some blender forums, I just found no satisfying solutions. So I had to build up something myself. First let's consider the situation in an iso game to get some cornerstones for our system to work efficiently.

1. Buildings and landscape tiles need to be rendered from four directions.
2. Creatures need to be rendered from four or eight directions depending on the game design.

This leads to a render scene with eight cameras.

3. We need a system to synchronize all properties, positions and angles of all cameras. This makes the perspective of an object stays the same if we use the images of a different camera in the game.

That leads to a system where:
- all eight cameras are looking exactly at the same point.
- all eight cameras are at the same distance of the focus point. So, their positions are building a circle around the the focus point with an angle of 45 degrees between each camera.
- all eight cameras have exactly the same properties, like focal distance, ...

I am not an expert in blender, so it took me some hours to build up a system providing all that points.

How does it work:

1. I created an empty at {0,0,0} and named it "camTarget". This is the focus point.
2. I created a circle at {0,0,10} and named it "camCircle.001".
3. I created a camera and named it "cam.001". To this camera I added two constraints.
   a) a FollowPath to "camCircle.001".
   b) a TrackTo to camTarget.

4. I repeated these steps eight times, where I duplicated the camera with ALT+D to secure all cameras will have the same properties.
5. Each camCircle is rotated +45 degrees.

6. I added an empty and named it "camRing" all camCircles are child object of this empty.
7. I added an empty and named it "camAll" camRing and camTarget are child objects of this empty.

8. I locked some properties to allow the three empty just to move along the z axis.

That's it.

To change the perspective you can drag camTarget and camRing. To lift the whole system without changing the perspective you can drag camAll.


Keine Kommentare: