Jump to content
  • Advertisement
Sign in to follow this  
AMcIntyre2010

Terrain, Water and Sky

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

My project is coming along nicely but I would be so grateful if someone just could spend a small amount of time with me to create terrain, water and sky for the enviournment just to get things started off and I would be able to do the rest myself. I have already created the DirectX 9 application and but it look very dull with no enviournment and I would be over the moon if the enviournment was put in. If you can help please reply to this post so I can talk more about it as it's only three simple things to do. Thank you very much. Andrew

Share this post


Link to post
Share on other sites
Advertisement
I don't think someone will just spend a little time on the immense task you presented. Just to start:

The sky can be done by using a nice toned blue. Use this as the background colour of your scene.
You can also use a sky-box.

Water is a bit more difficult, but fortunately you can create stunning images without it, so I'll leave it open.

For the terrain you could use a simple mesh. You can create that in a 3d modelling program. If you want to get your hands dirty, you can go for height-maps. Take a look at this site, to get an idea. It's in C#, but the basic principals are the same. You can also read the heights in from a file, as in the next chapter. A search on Google provides enough code examples.

I don't know if you can use shaders in your project, but if you can, I can provide some examples when using shaders.

Emiel

Share this post


Link to post
Share on other sites
Is anyone willing to help me, or should I look elsewhere as only I ask to help with a few things and no one is willing to help me.



[Edited by - AMcIntyre2010 on December 23, 2009 7:03:35 AM]

Share this post


Link to post
Share on other sites
I'll help you

1) Water: This is extremly complicated: You'll need to get into advanced shader, frenels, reflections, bla bla bla. BUT!!!! i have an easy solution for you!!! Go to this website http://www.magicindie.com/ and download the Aquatica Engine, a well documented, nice looking water engine for Direct3D 9.
2) Terrain: There is a lot of tutorials for terrain out (most of theme are for OpenGL, so they'll require a little translation on your part) but I'll give you a little sample here (Note this is a brute force approach:


// width/depth
float w = (vertCols-1) * dx;
float d = (vertRows-1) * dz;
for(int i = 0; i < vertRows; ++i)
{
for(int j = 0; j < vertCols; ++j)
{
DWORD index = i * vertCols + j;
v[index].pos = verts[index];
v[index].pos.y = // Get you height from TGA image;
v[index].tex0.x = (v[index].pos.x + (0.5f*w)) / w;
v[index].tex0.y = (v[index].pos.z - (0.5f*d)) / -d;
}
}

Share this post


Link to post
Share on other sites
Hi,

I don't mean to be annoying but would I be able to contact anyone here by e-mail so I can send all the code I have created already as it would fantastic to have the enviournment by the beginning of January.

Thank you

Andrew

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!