Sign in to follow this  
Keith1977

Direct3D Terrian/Engine

Recommended Posts

Keith1977    126
Over the past week I've been doing a lot of research on how to do my graphics engine. The game the engine is targeted at is an Iso3d tile based flooring that supports different corner heights for the tiles; in other words just a normal terrain that is using small tiles to compose the texture. I'm getting ready to code the engine now though so I was hoping I could get a little more input before I commit myself. As I did state before I've read a couple DirectX/Direct3D books and many articles on the subjects I felt would help me. After my research and a previous posting on here this is what I've come up with: The tile sizes I'm using are 32x32 pixels so to fill the screen a large number of these tiles will need to be rendered. I'll also be offering around 200 different tiles that could be used for floor tiles (and I expect many of those to be used on every map) so that limits my possibilities a little. Calling SetTexture is supposed to be a drain, so I guess what I should do is split my map into 256x256 pixel sections (8x8 tile sections). For each of these sections a texture will be created and the actual tiles will be placed onto this texture. This will turn 64 SetTexture calls into one during render time. Of course, I'd only store the sections that are to be displayed and those in surrounding sections to make sure rendering will always be smooth. That seems like a decent plan to me, the only sticking point I'm having is what will be the most efficient way for me to display these 256x256 textures? They are to be placed onto terrain with hills and valleys so I would think a mesh would be the best place for me to render these sections onto. Currently I'm planning on creating a different mesh for each 256x256 section and placing them using a world transform. My only overt question in this message would really be is there another way I could do the meshs? Would it be possible to actually create one map mesh then render these map subsections onto this mesh at the offsets I specify? I've looked and couldn't find any information on doing just that! So I've sort of figured that it's not really possible. Then again I noticed the skinned mesh in the DXSDK. That is taking a tga file and splitting it into different parts and rendering it onto the mesh. But one issue with that could be that they are still only using one texture. Please review my plans and if you have any suggestions or a possible answer to the question I posed, your responses will greatly help. Keith http://www.gamedev.net/community/forums/topic.asp?topic_id=275447 was the post that I refered to as perviously posting. It has a little more information in it about what I'm doing. (Just thought I'd note it incase anyone wanted to reference back to it)

Share this post


Link to post
Share on other sites
Keith1977    126
Seeing as I've yet to get a reply after 50 people have read this, I think maybe I should clearify my problem a little. If I were to use a single large mesh then I believe old graphics cards will limit how many textures I can actually use to render onto this mesh? Also I'm still not sure how to seperate what texture to map onto a section of mesh.

I know the message was long and for that I am sorry, but any help will be appreciated. I'm really looking forward to getting this engine underway.

Keith

Share this post


Link to post
Share on other sites
ashen_vale    122
From my own experience I can tell you that you will learn far more from overcoming obstacles and mistakes.

I would suggest you go ahead with your plan and see how it goes. Although, you will likely come across problems but the trick is not to get mad and crazy then bang your head against keyboards, walls and toilet seats... but try to see solving problems as a positive way. It is hard not knowing where to start and where to go, but try something out first and keep trying.

Reading and listening to advice is good but not enough, to truly become a skilled programmer you must engage and hack away.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this