| 
    
    
    
      
       Note: You must be registered in order to post a reply.
  
      
       
     | 
   
 
  
    
      
        
          
            
              
                
               
              
                | STufaro | 
                Posted - Jul 25 2006 : 9:04:04 PM  Hey guys,
  Yesterday I began the excellent tutorials on Direct3D8 at directx4vb.vbgamer.com
  I decided to go off the beaten path a little before getting into the next few lessons and decided to make a landscape program.
  Actually, two programs.  One is the dirty little mapping program that I whipped together in about five minutes.  The other is the program that actually renders the map.  That's the one with the problem.
  It seems that about a dot from random textures is all that renders (almost as if it's teasing me).  My "water" (which is a blue square) used to render but then stopped rendering altogether despite my code not changing!  Something's up here.
  I've included a ZIP archive with my files in it.
  Closing notes:
  - the "textures" aren't really textures, they're just BMP placeholders for when I get real textures - the code to load the actual map file in is a mess; the map file format is a mess - there are two folders in the ZIP I have attached.  The one with the problem is Land3D_VB.  The other is the heightmap editing utility.
  Thanks in advance for looking into it, guys.  Your help is much appreciated in advancing the knowledge contained in my puny brain :)
  Thanks again, - Steve.
  Download Attachment:  lndscp.zip 14.3 KB | 
               
              
                
               
              
                | cbx | 
                Posted - Aug 08 2006 : 05:31:34 AM  quote: Originally posted by STufaro It seems that about a dot from random textures is all that renders (almost as if it's teasing me).  My "water" (which is a blue square) used to render but then stopped rendering altogether despite my code not changing!  Something's up here.
 
  
  It feels like that happends to me all the time... | 
               
              
                | Almar | 
                Posted - Aug 05 2006 : 05:28:33 AM  I'm glad that you found it! :) | 
               
              
                | STufaro | 
                Posted - Aug 01 2006 : 11:17:38 AM  Success!
  It turned out to be a logic error in the vertex init code like you said, Almar!  Thanks for pointing me in the right direction (and sorry for the late reply)! | 
               
              
                | STufaro | 
                Posted - Jul 28 2006 : 5:16:05 PM  Much thanks for the reply!  Will try it out now and get you the results ASAP.
  I wasn't sure if you could have an array of types with arrays in it, or, for that matter, an array of arrays... | 
               
              
                | Almar | 
                Posted - Jul 28 2006 : 4:22:26 PM  1) Add 
      D3DDevice.SetRenderState D3DRS_FILLMODE, D3DFILL_SOLID      Somewhere t obe sure it's rendering solid
  2) Your vertex data is messed up. I checked out the contents of:
  Land(i, j)
  @
  D3DDevice.DrawPrimitiveUP D3DPT_TRIANGLESTRIP, 2, Land(i, j).verts(0), Len(Land(i, j).verts(0))
  Using the watch window, and all 4 vertices have 0 0 0 as position, makes not much of a triangle :). Tex coords and everything seem to be OK.
  | 
               
              
                | STufaro | 
                Posted - Jul 26 2006 : 12:36:26 PM  I've had some minor breakthroughs but the problem itself isn't solved.
  - The water stopped rendering because of culling.  Uncomment the line that turns culling off. - Put the camera at (25, 0, 25) - In the loop in the Render sub, change "TRIANGLESTRIP" to "POINTLIST" - Run the program and click start
  You'll see what I'm attempting from a slightly better angle. | 
               
              
                | STufaro | 
                Posted - Jul 26 2006 : 07:49:44 AM  Thanks for your reply!
  I developed the program on a 450MHz PIII with a 16MB Diamond Viper V550 (it uses an nVidia TNT chipset I think), 64MB RAM on Windows 98.  I think that ought to be quite enough to run it (it only renders 514 trianlges windowed)!  I brought the compiled .exe to my Dell (1.6GHz P4, 128MB Radeon 9600) and had the same results.
  As for my camera, it should be set up okay.  I have it placed (I think) at (25, 25, 25) which is far enough away to see the entire scene; that only extends out to (17, 2, 17).  Playing with the cameras got me nowhere, unfortunately.  (Originally I thought my camera was inside the mountain I made)
  I think the problem with my code is in the DrawPrimitiveUP() part in the Render sub.  The "2" in there - should that be something different, perhaps?
  Thanks very much for your help and looking into it, Spodi.  Hopefully someone else catches what I'm missing. | 
               
              
                | Spodi | 
                Posted - Jul 26 2006 : 03:47:16 AM  I cant figure it out either - though I do get just dots, too, so we can know that it isn't your computer but rather your code. ;) Are you sure the camera is set up right? Sorry I cant be of much more help - I never have delt with actual 3d, just 2d on a 3d engine. ;) | 
               
             
           | 
         
       
       
     | 
   
 
  
    
      
        
          | VBGamer | 
          ©  | 
            | 
         
       
     | 
   
 
 | 
 |