Jump to content
  • Advertisement
Sign in to follow this  
NightMarez

MDX 3D Grid and iso view

This topic is 4260 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

Hi all. Im trying to do a 3D Grid on my map editor and create a isometric / orth. camera view on the view. I know i prolly have to use VertexBuffer to create the grid, but im unsure on how to do it. And also, what do i have to use for the isometric or orth (dunno whats best) camera view? I tryed to find some info on it, but i cant really locate any on 3D grid that "works". I only found alot of questions to it, but no real answers. Im using managed directx9 in c#. Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
You can render a 3D grid just using lines. Fill up a vertex buffer and send it off as a line list/strip.

You can create an orthogonal projection matrix with Matrix.OrthoLH/RH. I recommend going through some tutorials on setting up a camera and using world/view/projection transforms first.

Share this post


Link to post
Share on other sites
Thanks.

I could use a exsample of the grid, how to put it together.


I got a grid.cs, containing initgrid and rendergrid.

I will read up on the camera thing tonight.

Share this post


Link to post
Share on other sites
If you just need a regular fixed-size grid, an easy alternative would be to use a quad (a simple square mesh of 4 vertices and 2 triangles) textured with an image containing the grid cells. By using alpha-testing you can then make anything but the lines transparent. If this option works for you, you can provide additional info on the grid texture as a bonus, like highlighted coordinate axes etc.

If you need a more flexible solution though, stanlo's suggestion would be a better choice.

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!