Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

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.

Topics - Raxx

Pages: 1 [2] 3 4 ... 6
16
ASL Scripts / [ TUTORIAL ] [ BEGINNER ] Hello World!
« on: October 30, 2014, 05:14:31 am »
Hello World!

Good day ladies and gents. This is the first in hopefully a long series of tutorials related to learning the Anim8or Scripting Language (ASL for short). In this tutorial, you will learn how to print the traditional "Hello World!" statement in the console while discovering some basics about programming in general.

What you need

Getting Started
Before we can dive straight into writing ASL, there are a few things you need to do first to prepare yourself.

Set up your development folder
Even if you already have a Scripts directory set up with Anim8or, I recommend making a new folder elsewhere strictly for script development. This way you will eliminate the clutter that all the other scripts will cause. Clutter = stress & confusion, especially when debugging code.


I recommend also that you keep this development folder in the cloud. Dropbox is a good first choice, as there is a form of version control that allows you to pull up previous versions of the same files. This might save you some headaches! There are also other cloud services such as Microsoft's OneDrive and Google Drive. Alternatively, if you have your own server, you can install Bittorrent Sync.

Define your development folder in Anim8or
Depending on what type of script you're developing, you'll need it to automatically load in Anim8or. To do so, open Anim8or and go to File->Configure...


And click on the '...' next to the Scripts input field. Navigate to your development folder and press OK. While still in the Configure dialog, enable the "Preload Scripts" option. While you're at it, make sure "Script Console" is also enabled, and press OK.

Restart Anim8or to see the changes take effect.

Set up your ASL editor
Any text editor will do for editing ASL scripts, but here are three that I can recommend to varying degrees:
  • Notepad: The most basic text editor of all time. You type in text, you save text. No formatting or line numbers or anything even remotely fancy. Useful for Hello World tutorials, and that's about it. Hit your Windows key and type in "Notepad" in the search field, and there you go.
  • ASL Editor: Written by Kubajzz, one of our own, this is an editor specifically for ASL. It includes cool features such as Syntax Highlighting, Line Numbers, Auto-Complete, and even a Parametric Shape Button editor. Unfortunately, it is no longer being developed, so it does have some bugs and hiccups, and is not up-to-date with v0.98+ ASL changes. I recommend this program for basic editing at best.
  • Notepad++: This is a popular text editor, and has many extensions for various file formats. It also supports themes, so you can darken the colors for less stress on the eyes. I recommend this program for those who want more barebones control. Attached to this post is a ASL.xml file that can kick-start your ASL experience in Notepad++. Just go to Language->Define your language, then click on Import, and import the ASL.xml file. Afterwards, files with the ".a8s" extension should automatically have syntax highlighting. Note: This file is for darker themes.

Creating your Hello World!
Let's dive straight in! As we go along, I'll give a quick explanation of what each line does. More detailed explanations on the various elements of code can be found in the ASL Specification and in future tutorials.

First, open your text editor and save a blank file as "Hello World.a8s" to your development folder. The .a8s file format is automatically recognized and compiled by Anim8or when it opens. If it's a shape script, it will show up in your shapes toolbar. If it's a command script (such as this Hello World script), it'll show up in your Scripts menu. If it's an export script, it'll show up in the Object->Export dialog box. If you save it as a .txt file, it won't be automatically detected nor show up anywhere, but you can execute it at any time by going to Scripts->Run Script File.

Alright, to start with, let's make a comment! Type in something like this:
ASL Snippet
  1. /* Wow! This is a block-style comment! Anything between the asterisks
  2. will be ignored, even if on more than one line!!! */
  3.  
  4. // This is an inline, or end-of-line comment. Only text on this line will be ignored!


That's fun and all, but comments serve a very useful purpose. They help you organize your code and let you and others know what's going on. You should get into the habit of commenting everything! For example, look at this block of code:

ASL Snippet
  1. float $getFaceArea(shape $s, int $f)
  2. {
  3. int $i;
  4. float $a, $b, $c, $perimeter;
  5.  
  6. for $i = 2 to $s.GetNumSides($f) - 1 do
  7. {
  8. $a = length($s.GetPoint($s.GetFacePointIndex($f, 0)) - $s.GetPoint($s.GetFacePointIndex($f, $i - 1)));
  9. $b = length($s.GetPoint($s.GetFacePointIndex($f, $i - 1)) - $s.GetPoint($s.GetFacePointIndex($f, $i)));
  10. $c = length($s.GetPoint($s.GetFacePointIndex($f, $i)) - $s.GetPoint($s.GetFacePointIndex($f, 0)));
  11.  
  12. $perimeter = ($a + $b + $c)/2;
  13.  
  14. return sqrt($perimeter*($perimeter - $a)*($perimeter - $b)*($perimeter - $c));
  15. }
  16. }
  17.  


Do you know what's going on? You can guess by the name of the function, $getFaceArea, that it gets a face's area, but what if you had to go in there and edit the code? Imagine this except with hundreds of lines of code! Horrible!

Below is the same code except with comments. Now with just a glance you know what each part of the function does, and helps you to figure out what each line is trying to accomplish.

ASL Snippet
  1. /* float $getFaceArea
  2. Retrieves a face and calculates the surface area
  3. *shape $s - Shape that contains the face
  4. *int $f - Index of the face to be calculated
  5. */
  6. float $getFaceArea(shape $s, int $f)
  7. {
  8. int $i;
  9. float $a, $b, $c, $perimeter;
  10.  
  11. /* Loop through each point of the face */
  12. for $i = 2 to $s.GetNumSides($f) - 1 do
  13. {
  14. /* Get the lengths of each side of each triangle, one point is always the first */
  15. $a = length($s.GetPoint($s.GetFacePointIndex($f, 0)) - $s.GetPoint($s.GetFacePointIndex($f, $i - 1)));
  16. $b = length($s.GetPoint($s.GetFacePointIndex($f, $i - 1)) - $s.GetPoint($s.GetFacePointIndex($f, $i)));
  17. $c = length($s.GetPoint($s.GetFacePointIndex($f, $i)) - $s.GetPoint($s.GetFacePointIndex($f, 0)));
  18.  
  19. $perimeter = ($a + $b + $c)/2; /* Calculate perimeter */
  20.  
  21. /* Now calculate the area using Heron's Formula */
  22. return sqrt($perimeter*($perimeter - $a)*($perimeter - $b)*($perimeter - $c));
  23. }
  24. }
  25.  


Alright, enough scary-looking code, let's get back to Hello World! At the start of every script, it's useful to explain what the script does, who wrote it, who else might deserve credit, any dates or bugs or changelogs, etc. So clear the file and put this as your header:

ASL Snippet
  1. /*
  2.  * Hello World! Script
  3.  * Author: [Your Name]
  4.  * Version: 1.0
  5.  * Date: [Current Date]
  6.  *
  7.  * This script prints out "Hello World!" in the console. Yay!
  8.  */
  9.  


Now run the script file in Anim8or. You can either restart Anim8or every time and go to Scripts->Hello World or just go to Scripts->Load Script File and select the script (then go to Scripts menu and find another Hello World menu item added to it). You can also run it directly since it's a command script, by going to Scripts->Run Script File. Whenever you load a script after making changes, check the console for error messages!

You may come across an error message that says missing or invalid directive, script not installed. Oh no!

What's a directive? Well, a directive is a line of code preceded by the "#" symbol. All .a8s scripts require a directive before any line of code (excluding comments) in the script, to tell Anim8or what type of script it is. If this were a .txt script that you wanted to run using Scripts->Run Script File, you would not need a directive. Add this line to the code, below the header:

ASL Snippet
  1. #command("object");


The #command directive tells Anim8or to place the script in the Scripts menu for easy access. "object" indicates that this is for the Object editor. Therefore this script will be located in the Scripts menu of the Object editor.


Next, let's make a string variable! A variable is a data type that stores information. A string is a series of characters such as the letters in the statement, "Hello World!". So a string variable is a data type that stores a series of characters. But first, we must declare that variable before we can use it. You have to declare variables beforehand so that Anim8or will allocate the memory needed to store it. So add this line to your code:

ASL Snippet
  1. string $helloWorld;


What does this do? First, "string" precedes the variable when declaring it, to tell Anim8or what type it is. In Anim8or, you can declare multiple string variables on one line by separating the variables with commas.Such as below:

ASL Snippet
  1. string $a, $b, $c, $d;


Variable names in ASL are preceded by the dollar sign ($). All statements must end with the semicolon (;). This is called a terminator (or separator), that tells Anim8or that the statement has ended.

A side note: camelCase is a common practice when creating variable names. The first word is lowercase, while the next words are uppercase without spaces or underscores between the words. Spaces are illegal in a variable name. Also, variable names cannot be preceded with a number. For example, "$1_apple" is illegal and would throw up an error.

Now let's assign some text to that variable!

ASL Snippet
  1. $helloWorld = "Hello World!";


Operators are very basic functions that perform operations on elements in the statement. What is 1 + 2? The 1 and 2 are operands, and the + is an operator. Other operators include =,-, *, /, <, >, %, ||, &&, and are explained in the ASL specification.

So = is an assignment operator that assigns the "Hello World!" characters to the $helloWorld variable. All strings, when typed out in code, must be enclosed in quotation marks ("").

Now, how do we get this printed out in the console? If you run the script,

ASL Snippet
  1. /*
  2.  * Hello World!
  3.  *
  4.  * Author: [Your Name]
  5.  * Version: 1.0
  6.  * Date: [Current Date]
  7.  *
  8.  * This script prints out "Hello World!" in the console. Yay!
  9.  */
  10.  
  11. #command("object");
  12.  
  13. string $helloWorld;
  14.  
  15. $helloWorld = "Hello World!";


Nothing shows up! Well, we need to initialize the console and send a print command to it. So first, let's create a file variable. For the sake of organization, try to declare your variables in one location. So let's declare it immediately after the string declaration:

ASL Snippet
  1. string $helloWorld;
  2. file $output;


Files in Anim8or are exactly what you might suspect. Anim8or treats the console window as a file, allowing you to open, print, and close access to the console just like you might with a file on your hard drive (save that for another tutorial ;)). So first, we must open the console using the following statement (place it after the variable declarations):

ASL Snippet
  1. $output.open("$console", "w");


.open() is a member function of the $output object we created. Member functions are basically preprogrammed actions that activate when called. Parameters are passed in the parenthesis when required. In this case, "$console" tells Anim8or that the target is the console rather than some file on the hard drive. "w" is the mode, and in this case tells Anim8or to open the console for writing.

Almost done! Now we need to tell Anim8or to print the contents of the string into the console. Let's use this line:

ASL Snippet
  1. $output.print("\n%s\n\n", $helloWorld);


Woah hey, what's all the \n's and %s's? ASL uses a C-like print function, meaning that you map out the formatting and variables in a string using special characters.

Let's break it down a bit further.

\n is a newline character. It creates a new line, and everything afterwards is placed on that new line. So \n\n makes a double spacing. %s represents the content of the first variable in the list of variables following the string. In our script, there's only one variable indicated afterwards, called $helloWorld. So when printed out, %s will get swapped with the contents of $helloWorld.

If we weren't using variables, we'd do something simpler like this:

ASL Snippet
  1. $output.print("Hello World!");


If we wanted to use two variables, one a string and one an integer, it'd look like this:

ASL Snippet
  1. $name = "Bob";
  2. $numApples = 3;
  3. $output.print("%s says there are %d apples in the basket!", $name, $numApples);


The output of the above statements would look like this:
Code: [Select]
Bob says there are 3 apples in the basket!
Anyway, let's get back on track. Whenever we open a file, we must close it. So at the very end, add this line:

ASL Snippet
  1. $output.close();


The final script should look something like this:

ASL Snippet
  1. /*
  2.  * Hello World!
  3.  *
  4.  * Author: [Your Name]
  5.  * Version: 1.0
  6.  * Date: [Current Date]
  7.  *
  8.  * This script prints out "Hello World!" in the console. Yay!
  9.  */
  10.  
  11. /* Directive */
  12. #command("object");
  13.  
  14. /* Declare variables */
  15. string $helloWorld;
  16. file $output;
  17.  
  18. /* Assign string to the variable */
  19. $helloWorld = "Hello World!";
  20.  
  21. /* Initialize the console, ready for writing */
  22. $output.open("$console", "w");
  23.  
  24. /* Print to the console */
  25. $output.print("\n%s\n\n", $helloWorld);
  26.  
  27. /* Close the console */
  28. $output.close();


When you run it, the output will look like this:


Congratulations! You made Anim8or say Hello to the world!

17
ASL Scripts / Select Larger/Smaller
« on: October 30, 2014, 03:17:53 am »
In the zip file attached are two scripts, "Select Larger.a8s" and "Select Smaller.a8s". Install them into your scripts directory.

As one might imagine...
  • If you select a shape and activate either script, then it'll select all larger or smaller shapes in that object (by volume of the bounding box).
  • If you select a face and activate either script, then it'll select all faces in the object that are larger or smaller than the currently selected face(s).
  • If you select an edge and activate either script, it'll select all edges that are longer or shorter than the currently selected edge(s).

If you select more than one shape, it adds the volumes together and searches for shapes larger/smaller than their combined individual volumes. The same applies to faces and edges. This way you can select, say, a blob of faces and find all faces that are larger or smaller than that blob.

The "Selection Margin" float attribute allows you to define a percent margin between -1 and 1. A margin of, say, 0.1 when Selecting Larger faces, will select all faces that are 0.9 times the surface area of the currently selected face(s) or larger. A -0.1 would select all faces that are 1.1 times the area or larger. It's flipped for selecting smaller: a 0.1 when Selecting Smaller would select all faces that are 1.1 times or less the area, and -0.1 would select all that are 0.9 times or less the area. The default is 0.00. Whenever you run any of the two scripts, this attribute is automatically created so that you can jump in and adjust the margin with ease.

18
On a frame where a morph target is being used, the changes done by the morph is not reflected in the .3ds file that is exported on that frame.

19
ASL Scripts / Advanced Spherize
« on: October 20, 2014, 05:24:24 am »
Alright, this tool lets you make spherical any mesh object. Install the two scripts into your scripts directory, and then create the Spherize Helper Shape (parametric shape button in your left toolbar) around whatever you want to spherize. The helper shape has a lot of options, so double click it and play with it to figure out the behavior.

It's a little funky, use at your own risk. It does work with morph targets though....


  • Convergence Radius: This is the middle line where points (can) converge. This is changed by using the Uniform Scale tool, or by manually entering the parameter. Radius is in Anim8or units.
  • Inner Radius: This is the small dotted circle within the Convergence Radius. It indicates where points begin to converge towards the convergence radius (or where they stop if inverted). This is changed by scaling along the Y axis using the scale tool, or by manually entering the parameter. The number is the multiplier (ie 0.50 would be half the Convergence Radius)
  • Outer Radius: This is the large dotted circle outside of the Convergence Radius. Same as inner radius, in concept. This is changed by scaling along the X axis using the scale tool, or by manually entering the parameter.
  • Inner Falloff: 0 means no falloff, which means all points in the inner circle will be flattened against the Convergence Radius (if inverted, against the Inner Radius). 1 means linear falloff, which is a fade effect in terms of strength as the distance is greater/smaller
  • Outer Falloff: Same as Inner Falloff (in concept)[/b]
  • Invert Outer Dir: Invert the outer direction. Basically flips the direction the points will move. (0 is default, 1 flips)
  • Invert Inner Dir.: Same as above.
  • Strength: Global adjustment of the influence that helper object has on the meshes. 0.000 (no influence) to 1.000 (max influence)
  • Dot Density: Density of the little indicator arrows in the helper shape. Aesthetics. 0.000 to 1.000

You can have more than one helper shape in an object at a time. Multiple helper shapes can influence single/multiple meshes. You can limit the deforming to selected meshes or selected points within those meshes. If nothing is selected, all meshes in the object will be deformed if within radius of the helper shapes.

Note: The changes the Spherize script does cannot be undone. Best to play with copies of the meshes in a new object or be prepared to reload the file.

I was going to include subdivision meshes but forgot that the cage data can't be accessed :P

20
For various reasons, a user may need to get the shape's position and orientation (and other details) from within that shape's script. Assuming $S was the shape in the "#return($S)" directive, $S.loc, $S.orientation, and $S.name should return the proper information.

21
Finished Works and Works in Progress / Doodling
« on: May 29, 2014, 07:03:07 am »
Alright, figured I'd start exercising my creative muscles, they've been sitting in the muck for a little too long. This topic is for my art that doesn't really qualify as a "project" by itself, but rather more for exercise and practice. Or other random stuff.

First up, a dinosaur/monster/toy thing that I've had sitting around the back of the brain for a while. I made a rough sketch, created a vector version, and then modeled and textured it. I wanted to go for that "painted" texture look, and I think I got kind of close. Low poly, no real target triangle count at 934 triangles, just wanted something that was easy to make that still loaded easily in the web browser ;)








Screenshot attached for those who might have trouble viewing it...

22
General Anim8or Forum / Anim8or Skype Chat
« on: May 28, 2014, 08:23:24 pm »
Summer's here (school-summer), and I'm always logged into Skype. I figure, why not start an Anim8or group there? It's much better for chatting than IRC, so it may become a good alternative for now.

If you want to be a part of it, add me to your contacts (mention that you're from the Anim8or forums) and I'll put you in the group.

My handle: raxx_isbak

23
General Anim8or Forum / Anim8or 3D Viewer
« on: April 08, 2014, 02:24:49 pm »
Anim8or 3D Viewer


3D and...more?


Good day ladies and gentlemen. I present to you the first release of the Anim8or 3D Viewer. This is an encompassing forum mod that not only lets you embed Anim8or attachments directly in your post, but also images, videos, and ASL.


Usage

.an8 Attachments
If you attach a .an8 file and its textures (if applicable), you can embed it directly in the post using this BBC:
Code: [Select]
[attach <width> <height> <options={params}>]<index>[/attach]
<index>
This is the attachment number (counting down the list of attachments for that message, starting with index 1). If you're embedding the first attachment in the list, the index would be 1. If you want to embed the 4th attachment, the index would be 4.

<width> and <height>
The width and height use the standard width=# height=# syntax within the attach tag. If one or the other is missing, the default values will be used instead.
  • width: [Integer: Default 640] Width of the plugin
  • height: [Integer: Default 480] Height of the plugin

<options={params}>
Optional parameters for when embedding .an8 files. The syntax for the parameters is something like this {parameter: value, parameter: value, ...}. You can include one, some, all ,or none of the following:
  • background: [mixed] Can be the url to an image, a css hex color (#000, for example), or "none". Defaults to a generic background image.
  • wireColor: [Hex Color: Default #666699] The color of the wireframe lines
  • uiColor: [Hex Color: Default #fff] The color of the ui elements (icons and text)
  • uiShadow: [Boolean: Default true] Enable/Disable the shadow effect on ui elements
  • locked: [Boolean: Default true] Lock the interface (no ui elements or interaction)
  • autoRotation: [Boolean: Default false] Disables the autorotate feature
  • shading: [Integer: Default 2] Type of shading. 0 is no shading, 1 is flat shading, 2 is smooth shading
  • softwareRender: [Boolean: Default false] Enables software (HTML5) canvas rendering. Overall not recommended, webGL incompatible devices will automatically fall back to this
  • doubleSided: [Boolean: Default false] If you need backfaces enabled, set this to true. Note: can lead to a performance decrease on large files

IMPORTANT: All hex colors and background (none/url/color) data must be enclosed in quotes. All other values (booleans and integers) must NOT be enclosed in quotes. Note the camelcase (capitalized letters within the parameter name). Eventually I'll make it case-insensitive, but for now please follow it strictly.

Image Attachments
If you wish to embed an image attachment, you can embed it the same way as .an8 attachments, except without the "options" parameter.
The width and height will be scaled accordingly if one or the other is missing. If no width or height is set, the width will be set to the default (and height scaled).

An image attachment would look something like this, in code:
Code: [Select]
[attach width=640 height=480]1[/attach]
Video Attachments
If you want to attach a video file, you can upload flv, mp4, ogg/ogv, and/or webm. If you need a program to convert to those formats, try the Freemake Video Converter (opt out of the addon software during installation--it's an excellent program otherwise), or another converter of your choosing. Attaching and embedding video files is done exactly the same way as with .an8 attachments, except with different options:

  • autoplay: [Boolean: Default false] Enable/Disable autoplay. Plays the video as soon as the web page loads
  • loop: [Boolean: Default true] Loops the video
  • controls: [Boolean: Default true] Show/hide the controls

An example of the video attachment code, with options, would be:
Code: [Select]
[attach width=640 height=480 options={controls:false, loop:true, autoplay:false}]1[/attach]
If you choose mp4/ogg/webm, consider uploading all of them into the same post. Those use HTML5 video embedding, and one format may not be compatible with a browser, but another will. I made it so that it automatically sources all videos of the same name, of those formats, into the same video so that the browser can fallback to whichever one it's compatible with. You'll need modern versions of Internet Explorer, FireFox, or Chrome that support HTML5 video playback.

Flv (flash video) could be your best bet for universal compatibility. Granted, some (mobile) browsers/operating systems don't support flash, but otherwise it's widely supported. If you choose flv, include both the width and the height in the parameters since there is no automatic aspect ratio retention.

.a8s Attachments
Attaching and embedding .a8s files is the same as with the others, except that there are no parameters:
Code: [Select]
[attach]1[/attach]
What this does is embed the content of the .a8s file into your post with syntax highlighting and line numbering.

ASL Snippets
You can copy and paste ASL directly into your post and it'll be syntax highlighted just like with .a8s attachments. Make sure you put the ASL text in between asl tags, like so:
Code: [Select]
[asl title="optional"]ASL goes here[/asl]
The title is optional, and if excluded then "ASL Snippet" will be used instead.


Examples


Code: [Select]
[attach]2[/attach]


Code: [Select]
[attach width=720 height=360 options={shading:0, wireColor:"#fff", uiColor:"#000000", uiShadow:false, background:"none"}]2[/attach]


Code: [Select]
[attach options={shading:0, locked:true, background:"#666699"}]2[/attach]


Code: [Select]
[attach options={shading:0, autorotation:false, background:"http://www.petslovers.info/wp-content/uploads/2014/03/kittens_cute_kitten.jpg"}]2[/attach]

Code: [Select]
[attach width=400]1[/attach]

Code: [Select]
[attach options={controls:false, autoplay:true}]10[/attach]


Hiding Attachments


You might have noticed that when you edit or make a new post, the attachments have a new option next to them labeled "Do Not List". When checked, that attachment will no longer show up on the list of attachments that gets displayed under that message. This post is an example of all of the attachments being hidden.


Notes About The 3D Viewer


The 3D viewer is still in its rough initial stages. Here are some things to keep in mind:
  • You can only view mesh shapes in objects
  • Subdivision meshes show up in their unsubdivided state
  • Internet Explorer is horrible. If you report problems while using it, you will be ignored.
  • Materials aren't 100% accurate. There are differences. For example, if you have a black diffuse rgb color with a texture, the mesh will show up black. In Anim8or, this does not happen.

Something cool: You can view these in mobile browsers that support WebGL. Looks awesome in Opera Browser for Android ;)

Summary


I intend on adding more features over time, eventually allowing everything to be viewed in the 3D viewer, from objects to scenes.

If you have bug reports, suggestions, or other feedback, the place to do so is in this post or via pm. If it's a 3D viewer bug report, please provide your browser (and version), the offending .an8 file and related textures, and specific information about what you're experiencing.

Thanks and enjoy the update!

24
I think this is an old issue, but while working on the browser plugin I came across this problem and would like to see if this'll get fixed.

For cube maps, Up (+Y) is actually used as the Down (-Y), and vice versa.

25
General Anim8or Forum / Anim8or Projects
« on: March 29, 2014, 08:44:16 pm »
Hello everyone, I figured I'd introduce (what feels like) many projects I have planned that revolve around Anim8or. Steve is actively developing Anim8or, so I am trying to actively contribute to the Anim8or environment.

I'm posting this because these are pretty large in scale and take time, so I want to avoid conflicts of interest and have a place to update my progress. These projects will be publicly released at each milestone in development.

If you have any questions or comments or requests, let me know, thanks.

An8Hub.org
Progress: Milestone 1
Language: PHP, Javascript, HTML
Libraries/Dependencies: CakePHP, JQuery
Description: Heavy Anim8or resource website. Will contain a repository for models and scripts and related software and tools, tutorials, and custom manual. Completely ad-free, requires user account to add resources, but otherwise guest-friendly downloads. Likely endorsed by Steve upon completion.

Note: Development is currently being done locally. No changes will be visible on the actual domain as of yet.

Current Progress Screenshot

Milestone 1 (Not Started | In Progress | Completed)
  • Basic Visual Design and Layout
    • Logo
    • Navigation
    • CSS Styling
  • Basic Features
    • User Authentication System
    • Home Page - News(Add/Edit/View)
    • Scripts Repository (List/Add/Edit/View)
Milestone 2 (Not Started | In Progress | Completed)
  • Completed Visual Design and Layout
  • Advanced Features
    • Previous Features Enhanced
    • Tutorials System
    • Models Repository
Milestone 3 (Not Started | In Progress | Completed)
  • Completed functionality
    • Software Repository
    • Manual


Anim8or File Converter (title pending)
Progress: Milestone 1
Language: C#
Libraries/Dependencies: Custom Anim8or File Parser Library, OpenTK, .NET 4.0
Description: A toolkit that converts Anim8or files to popular formats or vice versa. Full scene and animation support. DAE and FBX formats supported. 3D viewer/playback and export options.

Current Progress Screenshot

Milestone 1 (Not Started | In Progress | Completed)
  • Anim8or Parser Loading Ability
    • Objects
    • Figures
    • Sequences
    • Scenes
  • .DAE Export Ability
    • Objects
    • Figures
    • Sequences
    • Scenes
Milestone 2 (Not Started | In Progress | Completed)
  • Anim8or Parser Saving Ability
    • Objects
    • Figures
    • Sequences
    • Scenes
  • .DAE Import Ability
    • Objects
    • Figures
    • Sequences
    • Scenes
  • Basic 3D Viewer
Milestone 3 (Not Started | In Progress | Completed)
  • .FBX Import and Export
    • Objects
    • Figures
    • Sequences
    • Scenes
  • Advanced 3D Viewer


In-Browser 3D Plugin
Progress: Milestone 1
Language: HTML, CSS, WebGL, Javascript
Libraries/Dependencies: Three.js
Description: A completely client-side plugin that allows anyone to embed their .an8 file directly into a web page.

Milestone 1 (Not Started | In Progress | Completed)
  • Three.js An8Loader - Basic Import
    • Objects
      • Materials & Textures
      • Meshes
      • Wireframe
  • Basic Object Viewer
    • Orbit Controls
    • Toggle Wireframe & Shading
    • Embeddable Plugin Behavior

Milestone 2 (Not Started | In Progress | Completed)

26
General Anim8or Forum / New Forum Modifications
« on: March 22, 2014, 10:18:13 pm »
Hello all,

You may notice new Youtube and Vimeo icons when making a new post. You can now embed videos from those two websites into your post.

Also added were social media icons. If you go to your profile, you can fill in your Youtube, dA, and other account info to have the icons linking to your websites. As of yet it does not show up in the message posts under your name, it's on the fix-list. It does show up in your profile page, however.

27
General Anim8or Forum / Robin Diversity
« on: March 10, 2014, 08:15:38 pm »
I needed a break from stuff, so I figured why not have a light-hearted collection of user-made Robins? 2D, 3D, doesn't matter. If you want to make your own Robin, post it here!

The 2D Robin's design is part of a logo for an Anim8or resource website I'm working on, which I will announce when it's at a good development stage. I'm still experimenting with him a bit, so it's probably not the final version.


The 3D one, you guys may already recognize from before. I thought I shared the file a long time ago, but seems like it's not anywhere in the forums. I was extremely lucky that I could find the original model...there are too many old artworks that I've lost permanently :(


28
ASL Scripts / AOBake
« on: February 25, 2014, 07:35:10 am »
AOBake v0.2
Ok, so I lied. My next script ended up being impractical again. Welcome to AOBake, a raytraced Ambient Occlusion texture baking script for Anim8or.

Description
To use this, select mesh shapes or faces in a mesh shape that you want to bake the AO for. Alternatively you can select nothing and it'll bake AO for all shapes in the object. This script writes all of the selection onto one   texture, so be wary of overlapping UVs from different objects.
   
Go to Build->Export, and select the "Bake AO to PPM Image" (.ppm) file format and save to the file name of your choice. Anim8or will then generate the AO. You can track the progress in the console.

The .ppm format can be opened in image editors such as GIMP and Photoshop

Attribute Options:
AO_Width: (int [Default 128]) Sets the width of the texture in pixels (Default 128). Increasing this value slows render time greatly.

AO_Height: (int [Default 128]) Sets the height of the texture in pixels (Default 128). Increasing this value slows render time greatly.

AO_Samples: (int [Default 3]) Number of rays cast per pixel on a triangle (Default 8) . Increasing this value slows render time.

AO_Blending: (int [Default 0]) "Blurs" the results so that it's less pixellated (Default 0). The number represents the number of blur iterations. 0 means no blur. If you have very low samples, you'll want high (10-20+) blur. You can achieve this effect in an image editor, though the blending here automatically crops it to the uv cluster space.

AO_Padding: (int [Default 3]) Number of pixels that will be padded around each UV cluster (Default 3)

AO_Contrast: (float [Default 0]) Adds contrast so that lights are lighter (Default 0). 0 is no contrast, 0.5 is moderate, 1.0 is high, 1.5 is extreme, etc. Can also be done in an image editor.

AO_RayLength: (float [Default Variable]) Anything past this distance (in Anim8or Units) will not be detected as occluding the light. Useful if you want to have more or less geometry affecting the shadowing. If not set, the ray length is automatically set to 0.15*(diameter of bounding sphere)

AO_BGColor: (point3 [Default 255 255 255]) Background color of the image. Useful if you want to do your own blur or image editing.

AO_RayConeBounds: (float [Default 0.15]) Determines how close to the plane of the triangle a ray can go (example in image below). Clamped between 0 and 0.999


Ray Cone Bounds Effect

To-Do
  • Optimize...where's my octrees?

Sample Images
Not much yet (yeah, it's that slow).







Warning: Best to treat this script as experimental. This script is very slow and practically primeval (hah...ahah...). If you want fast, high resolution AO, turn to something like xNormal. Otherwise tinker as you will :P

29
ASL Scripts / UVTools Preview
« on: February 12, 2014, 02:44:35 pm »
UVTools Preview

Introduction
Welcome to another set of specialized scripts by yours truly. Ever want to export the UVmap of a model straight from Anim8or? Or better yet, view it directly within the Anim8or workspace?

Well, UVTools is a set of tools made to do just that!

What You Get
Create Canvas ("UVCanvas" parametric shape)
This shape creates a blank canvas, which is required if you want to use the next two tools.

Paint UVs Onto Canvas
This script paints the selected shape or faces onto the canvas. If nothing is selected, all shapes in the object will be painted. If there is no canvas, nothing happens. Only MESH shapes can have their UVs edited by these tools. Convert any other shape to mesh (including subdivision meshes) if you want to edit their UVs.

Apply UV Changes To Mesh
This script applies the UV coordinates represented on the Canvas back onto the mesh. If no canvas and/or no "context" exists, nothing happens.

View Vector
Creates a general UV canvas in the workspace, in the form of a parametric shape. Has options such as Width/Height (the ratio) and Shading (the darkness of the mesh overlay). You must mark a mesh in order to view its UVs on the canvas. This shape is not the same as "Create Canvas", and is only for viewing UVs. Basically, it's redundant and will probably be removed.

View Pixelated
More novelty than anything else. Creates a pixel-based canvas in the workspace, in the form of a parametric shape. Has options such as width, height, scale, and line transparency. You must mark a mesh in order to view its UVs on the canvas. Please note that Anim8or is really slow with generating meshes from ASL, so avoid using this on high-def meshes, and beware setting high width and height values.


View Vector on Left, View Pixelated on Right (as seen in the workspace)

Mark Shape
Mark which mesh(es) you want to view for the view-type scripts above. Do this by selecting the mesh(es) and going to Scripts->Mark Shape. Note that if you have nothing marked, nothing will appear on the UV canvas except a blank square.

Export PPM
Export your UVs to the .ppm format, which is compatible with image editors such as Gimp and Photoshop. To use this, select the meshes you want to export, or select none to export all of them. Optionally, create the "PPM_Width" and "PPM_Height" integer attributes to customize the export resolution. Exports as black lines on white background.


Example of an Exported PPM

Export SVG
Export your UVs to the popular Scalable Vector Graphics format, which is compatible with software such as Inkscape, Gimp, and Illustrator, as well as all modern web browsers. To use this, select the meshes you want to export, or select the faces you want to export, or select none to export all of them. If you select faces, and then select a mesh, it'll only export the selected faces of that mesh.


Example of an Exported SVG

Comes with these export options, in the form of object attributes you have to create:
  • (float - Default 0.5) SVG_InnerLineWidth : Width of the lines within a UV cluster
  • (float - Default 0.5) SVG_InnerLineOpacity : Opacity of the lines within a UV cluster
  • (float - Default 1.0) SVG_SeamLineWidth : Width of the seams of a UV cluster
  • (float - Default 1.0) SVG_SeamLineOpacity : Opacity of the seams of a UV cluster
  • (float - Default 0.3) SVG_MaterialOpacity : Opacity of each face, colored as its material diffuse color

If you view the exported SVG file in a modern web browser, you'll notice mouse hover effects. I'm investigating some form of interactive capability if viewed in a web browser, such as detailed information and manipulation.

How To Edit The UVs
The v1.1 release added the ability to edit the UVs of a mesh shape directly within the workspace. Here's a quick run-down of how to do so:
  • Create a UV Canvas - This is the parametric shape that has the button "UV Canvas", white on black. Only one canvas can be used at a time, so keep only one in the workspace.
  • (Optional) Assign a material to the canvas - If you want to edit the UVs on top of a texture, apply the material with its corresponding texture to the UV Canvas you had just created.
  • Select the meshes or faces that you want to edit - Only mesh shapes (Build->Convert to Mesh) can be edited by scripts, so only mesh shapes are detected by these editing tools. Select a mesh, or select faces within one or more meshes, that you want to "paint" onto the UV Canvas you made.
  • Go to Scripts->Paint UVs Onto Canvas - This "paints" the UV coordinates onto the canvas. In otherwords, it displays the UVs as if it were an image. The resulting mesh is called the "Context".
  • Edit the UVs - In point-edit mode you can select the faces, edges, and points of the painted UVs and move or scale them. Note: Do not use point operations such as knife, bevel, merge, etc., on these painted UVs. You'll mess things up. Seriously.
  • Go to Scripts->Apply UV Changes To Mesh - This applies whatever changes you made on the canvas back onto the mesh.


UV Editing

Some notes:
  • It's best if you don't rotate the Canvas or Context, and just work with it from the front view. You can split the views if you want to zoom at an angle on the origin mesh while working.
  • Again, don't perform mesh editing operations on the Context aside from move and scale. More UV editing tools like make seams, relax, merge, pack, etc., may come in the future, which is about all you could need. Also leave the origin mesh alone until you're done with the Canvas and Context
  • You can undo UV edits by hitting undo until you get rid of the unwanted point operations done on the Context. Then go to Scripts->Apply UV Changes To Mesh.

Your Feedback
These scripts are basic in concept and practice. However, I feel that they have potential. Pending whether you guys think it's worth pursuing, I'll add more features to these tools, to include:
  • UV Editing - Ability to edit the UVs of a mesh directly within Anim8or (in the same manner as programs like UVMapper
  • Better UV viewing - Texture underlay, easier method of selecting a mesh for viewing
  • Richer Export Options - More SVG styling options, UV clusters, padding, material-based export, texture underlay
If you want to give it a shot, download the attachment and install all the scripts into your Scripts directory that Anim8or autoloads from. If you have feature requests, bug reports, complaints, or ideas, post them here.

Demonstration Video (Download - 198MB)


Changelog
v1.0 - 02/12/2014
  • Initial Release
v1.1 - 02/14/2014
  • Added UV editing tools - Paint UVs, Apply UVs, Create Canvas
  • Improved SVG Export
  • Added progress bar to Export Scripts and View Pixelated

30
ASL Scripts / XSI Export Script - LIA
« on: February 05, 2014, 01:13:57 am »

Okay, here's the XSI export script that supports hierarchy using the LIA system. If you're interested in having hierarchy, I recommend you download LIA v1.1 or later and use its tools to help you along the way.

Notes:
  • Groups are ignored. The shapes within the groups are extracted and processed like any other shape. So if you have a shape named under the LIA system, and group it, it'll still retain its hierarchy.
  • Non-mesh shapes are treated as dummy shapes. Basically they'll have empty frames and otherwise be treated as another object in the hierarchy. So you can use splines to denote dummy shapes if you wish.
  • Transformations are "baked" into the vertices. Meaning that rather than the vertex data being relative to the shape's pivot point, all vertices are moved to its actual location in world coordinates. If there's demand for local transforms, I'll revisit this. If not, oh well.

Script is attached.

Pages: 1 [2] 3 4 ... 6