Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: GenerateTerrain -> AccessViolationException  (Read 598 times)
phantom75
Community Member
*
Posts: 2


« on: October 06, 2007, 07:21:38 PM »

Hello there,

I tried to load a heightmap with the following code:
======================
TVLandscape Land; // = new TVLandscape() didn't make things better
Land = Scene1.CreateLandscape("myland");
Land.GenerateTerrain("C:\\height.bmp", CONST_TV_LANDSCAPE_PRECISION.TV_PRECISION_HIGH, 2048,2048,0,0,0); //<---- Access-Violation
           
Land.SetCullMode(CONST_TV_CULLING.TV_FRONT_CULL);
Land.ExpandTexture(Global1.GetTex("land"), 0, 0, 8, 8 );
=======================
In Line 3 I'm getting an access-violation-Exception whith the GenerateTerrain. Can you help me with that?

Version 6.5 Beta, AMD 64 3400+, 1GB, C# Express 2005

Many thanks for your help, your's

Martin
« Last Edit: October 06, 2007, 07:23:41 PM by phantom75 » Logged
pizzayoyo
Customers
Community Member
*****
Posts: 1320


WWW
« Reply #1 on: October 06, 2007, 09:55:44 PM »

The problem is that you specified 2048 for the chunk values. A single chunk is 256 units, so just imagine how big that terrain is going to be. That's why it is crashing. Bring it down to a more reasonable value, like 4, and it won't crash.
Logged

phantom75
Community Member
*
Posts: 2


« Reply #2 on: October 07, 2007, 03:10:30 AM »

Hi pizzayoyo

Many thanks for your help. It's solved my problem.

greetings

Martin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks