THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/06/2004 at 13:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Windows ; Mac OSX ;
Language(s) : C.O.F.F.E.E ;
---------
Hello,
Terra4D is an open source plugin to combine Terragen with Cinema4D. Unfortunately it's impossible to import terrains from Terragen which are larger than 1024. It seems that there isn't enough memory to create such a big polygonobject.
// procedures
///////////////////////////
CreatePolygonObject(pointcount, polygoncount)
{
if (pointcount <= 0 || polygoncount <= 0) return FALSE;
var obj = new(PolygonObject);
var points = new(array, pointcount);
var polygons = new(array, polygoncount*4);
obj->SetPoints(points);
obj->SetPolygons(polygons);
var vc = new(VariableChanged);
var bt = new(BackupTags);
bt->Init(obj);
vc->Init(0, pointcount);
if (!obj->Message(MSG_POINTS_CHANGED, vc))
{
bt->Restore();
return FALSE;
}
bt->Init(obj);
vc->Init(0, polygoncount);
if (!obj->Message(MSG_POLYGONS_CHANGED, vc))
{
bt->Restore();
return FALSE;
}
obj->Message(MSG_UPDATE);
return obj;
}
// main
///////////////////////////
main(doc,op)
{
var obj = CreatePolygonObject(1, 2049*2049);
obj->SetName("Test");
doc->InsertObject(obj, NULL, NULL);
}
The problem is the following command:
var polygons = new(array, 2048*2048*4);
I think COFFEE can't handle such big objects. But is there a workaround or something like that?
Thank you very much,
Janos Menberg