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"

Author Topic: how do i get the script by gamer3d to work?  (Read 5850 times)

marafca

  • Newbie
  • *
  • Posts: 3
    • View Profile
how do i get the script by gamer3d to work?
« on: September 22, 2008, 10:48:10 pm »

how do i get his script for converting anim8or stuff to roblox? ???
Logged

3D Joe Wiltshire

  • Sr. Member
  • ****
  • Posts: 728
  • Winter's Coming :O
    • View Profile
Re: how do i get the script by gamer3d to work?
« Reply #1 on: September 23, 2008, 03:58:13 pm »

[ Edited By Moderator: Joe, no unconstructive posts please, this is not "your" forum so do not think you can do whatever you please. ]
« Last Edit: September 23, 2008, 05:01:21 pm by Raxx »
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: how do i get the script by gamer3d to work?
« Reply #2 on: September 23, 2008, 04:59:29 pm »

3D Joe Wiltshire: No, I do not understand. There is no excuse for that behavior. All guests are welcome to ask their questions, and if you have nothing good to say then don't say it.

marafca: please provide us with your script so that we can check it out next time. I had to hunt for it, so I'll post it here for anyone else:

Code: [Select]
/*
  Description: Add this to your Anim8or scripts directory and start Anim8or. The script MUST have the ".a8s" extension and be in the Anim8or Scripts folder. Make sure that "Preload Scripts" is set to ON (this is NECCESSARY). This script has been tested for 0.95 and 0.97 preview.
*/


#plugin("object", "export", "Roblox Mesh", ".mesh");
#file($output, "text");
#return($result);

file $output;
int $result;
object $obj;
shape $shape, $shapes[1], $childShapes[1];
tridata $data;
material $mat;
int $numFaces;
point3 $point, $normal, $color;
point2 $uv;
int $i;
int $j;
int $index, $mIndex;
int $count;
float $gCol;
string $nm;
string $newName;
float4x4 $tMatrix;

$nm = $output.GetRoot();

$obj = project.curObject;
$output.print("version 1.00\n");
$obj.GetShapes($childShapes);
$shapes.size = 0;
while($childShapes.size > 0)
{
    $shapes.push($childShapes.pop());
}
while($shapes.size > 0)
{
       $shape = $shapes.pop();
       $shape = $shape.ConvertToMesh();
   $data = $shape.GetTriangleData();
          $numFaces = $data.GetNumTriangles();
   $tMatrix = $shape.GetGlobalTransform();
   $output.print("%d\n",$numFaces);
   for $i = 0 to $numFaces - 1 do {
      for $j = 0 to 2 step 1 do {
         $index = $data.GetIndex(($i*3)+$j);
                       $point = $data.GetPoint($index);
                      $point = $tMatrix.Project($point);
                       $normal = $data.GetNormal($index);
                       $uv = $data.GetTexCoord($index);
         $output.print("[%.6g, %.6g, %.6g]", $point.x, $point.y, $point.z);
         $output.print("[%.5f, %.5f, %.5f]", $normal.x, $normal.y, $normal.z);
         $output.print("[%.5f, %.5f, 0]", $uv.x, $uv.y);
                }
   }
}


$result = 1;

If you already have this script, make sure it has the .a8s extension and place it in your scripts folder. If not, just copy and paste this code into notepad and save it as whatever.a8s. If you do not have a scripts folder, place the .a8s file in the same directory as the anim8or.exe file. You then load the script by going to Scripts->Load script file... or go to File->Configure and check "Preload Scripts" and then restart Anim8or and it'll automatically load the script.

Make your 3d models, go to Object->Export. Select the .mesh extension in the "Save as Type" drop down menu, then save it to whatever directory you want. That's all.

Anim8or does not officially support Roblox, therefore we are not familiar with it and only recently the topic has come up (I'm guessing someone introduced Anim8or to you guys and so the program has become popular for customizing Roblox). If you have any other basic Anim8or usage questions, check the Manual on this site or use the search question before asking any other questions.
« Last Edit: September 23, 2008, 05:39:32 pm by Raxx »
Logged

3D Joe Wiltshire

  • Sr. Member
  • ****
  • Posts: 728
  • Winter's Coming :O
    • View Profile
Re: how do i get the script by gamer3d to work?
« Reply #3 on: September 23, 2008, 06:15:41 pm »

I'm sorry 'bout my outburst, i feel like looking down in shame, but there's no good emoticon for that, so this will suffice    :-\

It is, however, frowned upon, and possibly disabled, at the moment, by the admins of the game... i don't know the details, but i know they've said that somewhere, and it's probably why the guide to uploading meshes is so vague.
Logged