#### Archived

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

# Zelda64 Engine..?

This topic is 6586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Anyone know anything on the Zelda64 engine.. like view types, landscape rendering, landscape type.. etc.. Thanks :o) Nathan s.

##### Share on other sites
Hi,
I''ve never played Zelda64, only seen a few screenshots, and I don''t think it''s that cool. For landscape rendering, I prefer using a heightmap and then apply quadtrees to smaller blocks of these heightmap. I used a quadtree size of 16x16 and got the best performance out of it.

                            /           /          /           \          \      /  /  \  \   / / \ \     / / \ \    / / \ \

So, you use a struct like this for the Quadtree :

typedef struct CQuadtree{    float x[4];    float y[4];    float z[4];    CQuadtree *child1, *child2, *child3, *child4;} CQuadtree;

Then the first parent node has the edge coordinates

1) (0/0) & (16/16)

Then you get 4 childs out of this parent node which have the following coordinates :

1.1) (0/0) & (8,8)
1.2) (8/0) & (16,0)
1.3) (0/8) & (8/16)
1.4) (8/8) & (16/16)

You simply split the tree again and again until you have the smallest tile size of the landscape (which would be 1). Now you have these blocks and check the distance between the camera and the block and choose how detailed it should be. If it''s far away, then you render only the polygons in the first parent node, if it''s closer to the camera then you move some child nodes up and render those.

For the sky, I use a hemisphere and the render multiple cloud layers over it so that i looks somehow realistic. You can also render lens-flare layers over the hemisphere to get a sun and use a directional light where the sun is one the hemisphere.

You can also generate the cloud layers dynamically. This is often done using Perlin Noise (Fractal Plasma). Hugo Elias wrote a nice article on PN which you can find on http://freespace.virgin.net/hugo.elias/models/m_perlin.htm .

Did I forget something ? I hope not. If I did, post it here.

CU

Graphix Coding @
Skullpture Entertainment