🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Zelda64 Engine..?

Started by
1 comment, last by BouncePup 24 years, 5 months ago
Anyone know anything on the Zelda64 engine.. like view types, landscape rendering, landscape type.. etc.. Thanks :o) Nathan s.
"Always forgive your enemies, nothing annoys them more.."
Advertisement
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
Graphix Coding @Skullpture Entertainmenthttp://www.skullpture.de
thanks!
"Always forgive your enemies, nothing annoys them more.."

This topic is closed to new replies.

Advertisement