Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - nitsua60

Pages: [1]
1
ASL Scripts / Still: difficulty creating mesh with script
« on: February 27, 2008, 11:03:33 pm »
Hi-

   I'm clearly far too dependent on syntax highlighting -- I missed the omission of a "*/" before the blocks of face declarations. Solves everything. Sorry for the trouble. (it's visible on line 32 of the second code in my original post if you're curious). Thanks for all the help.

2
ASL Scripts / Re: difficulty creating mesh with script
« on: February 27, 2008, 02:38:04 pm »
Hi Steve-

   thanks -- that seems to do it (selecting -> all and going to point-edit mode). However, this belies a clear underlying misunderstanding of mine: I assumed that by creating meshpoints and assigning them  as vertices of faces, they would be visible in all of the views. Do I need to explicitly add a texture to each face? Is there a default texture that I can apply in one fell swoop to all faces? Is my confusion that this is not a closed solid, or that I haven't explicitly associated these faces with a shape object?

3
ASL Scripts / difficulty creating mesh with script
« on: February 26, 2008, 09:55:53 pm »
Hello all- I'm trying to use anim8or to visualize data coming out of another program. Basically, I have a working trial script, but when I have my program write a script, it displays nothing (though the console claims no errors and successful exit). Below are excerpts of both -- any ideas why the 1st works and the 2nd doesn't? Thanks.

This one works:
Code: [Select]
$mymesh.Open();
for $i = 0 to 99 step 1 do {
  $index[$i] = $mymesh.AddPoint(($i%10, $i/10, 1));
}

/* assigning meshpoints to faces (or is it faces to meshpoints?) */
for $y = 0 to 8 step 1 do {
  for $x = 0 to 8 step 1 do {
    $mymesh.OpenFace(0,0);
    $mymesh.VertexN($index[10*($y) + ($x)]);
    $mymesh.VertexN($index[10*($y) + ($x + 1)]);
    $mymesh.VertexN($index[10*($y + 1) + ($x + 1)]);
    $mymesh.VertexN($index[10*($y + 1) + ($x)]);
    $mymesh.CloseFace();
  }
}

$mymesh.RemoveUnusedData();
$mymesh.Close();

But this one doesn't:
Code: [Select]
$heightmesh.Open();

/* creating mesh, point by point */
$index[0] = $heightmesh.AddPoint((0, 0, 1));
$index[1] = $heightmesh.AddPoint((1, 0, 1));
$index[2] = $heightmesh.AddPoint((2, 0, 1));
$index[3] = $heightmesh.AddPoint((3, 0, 1));
$index[4] = $heightmesh.AddPoint((4, 0, 1));
$index[5] = $heightmesh.AddPoint((5, 0, 1));
$index[6] = $heightmesh.AddPoint((6, 0, 1));
$index[7] = $heightmesh.AddPoint((7, 0, 1));
$index[8] = $heightmesh.AddPoint((8, 0, 1));
$index[9] = $heightmesh.AddPoint((9, 0, 1));
$index[10] = $heightmesh.AddPoint((0, 1, 1));
$index[11] = $heightmesh.AddPoint((1, 1, 1));
$index[12] = $heightmesh.AddPoint((2, 1, 1));
...
$index[97] = $heightmesh.AddPoint((7, 9, 1));
$index[98] = $heightmesh.AddPoint((8, 9, 1));
$index[99] = $heightmesh.AddPoint((9, 9, 1));

/* assigning meshpoints to facees (or vice versa?)
$heightmesh.OpenFace(0,0);
$heightmesh.VertexN($index[0]);
$heightmesh.VertexN($index[1]);
$heightmesh.VertexN($index[11]);
$heightmesh.VertexN($index[10]);
$heightmesh.CloseFace();

$heightmesh.OpenFace(0,0);
$heightmesh.VertexN($index[1]);
$heightmesh.VertexN($index[2]);
$heightmesh.VertexN($index[12]);
$heightmesh.VertexN($index[11]);
$heightmesh.CloseFace();

...

$heightmesh.OpenFace(0,0);
$heightmesh.VertexN($index[88]);
$heightmesh.VertexN($index[89]);
$heightmesh.VertexN($index[99]);
$heightmesh.VertexN($index[98]);
$heightmesh.CloseFace();

$heightmesh.RemoveUnusedData();
$heightmesh.Close();


Pages: [1]