Anim8or Community

General Category => ASL Scripts => Topic started by: Raxx on November 26, 2013, 02:36:11 am

Title: Mesh2A8s Export Script
Post by: Raxx on November 26, 2013, 02:36:11 am
Mesh2A8s.a8s

I needed a distraction, so I figured I'd polish a script I had written to ease the development of PHUR and RIBRobin. Basically, this script allows an ASL enthusiast to easily generate parametric shape versions of meshes in the object editor.

How to use:

From there you can modify the newly generated script as you see fit.
Title: Re: Mesh2A8s Export Script
Post by: captaindrewi on November 26, 2013, 07:22:13 am
works a treat....once again thank raxx.
my first one.
if anyone wants to make a library.
Title: Re: Mesh2A8s Export Script
Post by: Steve on November 26, 2013, 09:35:37 am
Clever!
Title: Re: Mesh2A8s Export Script
Post by: Raxx on November 26, 2013, 10:06:03 am
captaindrewi, glad it works! And thanks Steve :)

Some notes about the script:

I really only expect it to be useful as a starter for helper objects for complicated scripts (like the comb and frowny face for PHUR or the special objects in RIBRobin).

However, it can also be used to create an object generator for any object, similar to Bob_I_Ts's f8ce plugin. For example, you could scale and move points and swap meshes out based on parameters to create a wheel/rim generator with different sizes and features.
Title: Re: Mesh2A8s Export Script
Post by: neirao on November 26, 2013, 11:29:37 am
Thanks Raxx!!  :)

amenzing script!!
Title: Re: Mesh2A8s Export Script
Post by: lppena on December 21, 2013, 07:53:15 am
Very amazing work thank you very much bro. Leroy. Objects can also be grouped together using the script. Very cool Raxx.  ::)
Title: Re: Mesh2A8s Export Script
Post by: lppena on December 21, 2013, 06:15:59 pm
Here's a B-25 Mitchell converted to a parametric script using Raxx's new script. This script is quite awesome and I would imagine will become quite useful for sharing models in a script format to some extent. Leroy.

PS: I converted the original Caligari COB B-25 Mitchell model file to 3DS so I could import it in to Anim8or and convert it to a parametric script. The script handles model part data quite nicely. I also had to zip the script as the original was a bit too big to upload. 
Title: Re: Mesh2A8s Export Script
Post by: lppena on December 22, 2013, 08:53:53 am
Here's a nice rounded cube basically a stock primitive used by Truespace. I was unable to make one in Anim8or; probably due to my inexperience. I converted it to OBJ in 3D Exploration and imported it in to Anim8or. It has no triangulation in the mesh hope someone can use it. Thank God for folks like Raxx who really make using Anim8or so much easier.  ::)
Title: Re: Mesh2A8s Export Script
Post by: captaindrewi on December 22, 2013, 09:29:22 am
nice Ippena,
raxx is there an editable part of the script that decides what icon will be shown?
would be handy to differentiate between a number of icons with the same image ie 'mesh'.
Title: Re: Mesh2A8s Export Script
Post by: kreator on December 22, 2013, 10:01:05 am
This is the Button Drewi:

Code: [Select]
/* ----- Button ----- */
#button(26, 26, 2, 0x00000000, 0x00000000, 0x00000000,
  0x00000000, 0x00000000, 0x00000000, 0x0105f7a2, 0x018d0422,
  0x01550422, 0x01250422, 0x01050422, 0x01050422, 0x0105c7be,
  0x010500a2, 0x010500a2, 0x010500a2, 0x010500a2, 0x010500a2,
  0x0105f7a2, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
  0x00000000, 0x00000000, 0x00000000);

Its based on a Picture I think. I had Tyson Collins Button maker but it does not work with Win7 ( thinks it was working on XP OS)

Anyways I attach the Button Maker see if it works for you... all my efforts to do something with it are in vain.  >:(
Title: Re: Mesh2A8s Export Script
Post by: captaindrewi on December 22, 2013, 01:16:07 pm
Cheers Kreator.
 :o oh ...yeah same result with win7.
Title: Re: Mesh2A8s Export Script
Post by: kreator on December 22, 2013, 03:35:38 pm
Ok dragged out my XP Laptop and did a Black and White doodle, ran plugicon and loaded a BMP file and it saved the file successfully. transferred the button data to a model previously saved as a Mesh2A8s file.

It worked!

My offering attached.... look for the doodle icon!

Good Luck

Title: Re: Mesh2A8s Export Script
Post by: Raxx on December 22, 2013, 10:33:05 pm
You can also use Kubajzz's ASL Editor (http://www.anim8or.com/smf/index.php/topic,2178.0.html) for editing the ASL file. It has an integrated button editor.
Title: Re: Mesh2A8s Export Script
Post by: kreator on December 23, 2013, 12:54:56 am
Thanks Raxx, totally forgot about the ASL Editor, Shows I don`t write many ASL Scripts!!

works with WIN7?  Not on mine says need net framework 3.5 or above, I have 4 but refuses to let me edit any script once loaded in  and promply crashes.

With Windows XP I don`t have any problem
Title: Re: Mesh2A8s Export Script
Post by: polyGon_tError on December 23, 2013, 08:48:51 am
good Script Raxx, but i have another Script that Do it.

i found it at:"http://homepage.ntlworld.com/w.watson3"
made by 'Llyr Carter' (he is not a Member of this Forum but of them.).
for V.95 (made around 2006-07), was popular then.
if you add it to Script Database, please add this one as well, thanks.

* i am posting it with respect to both of your work and contribution.
Title: Re: Mesh2A8s Export Script
Post by: kreator on December 23, 2013, 10:42:28 am
polyGon_tError:

Your zip file only shows 5kb when de-compressed, half of the script is missing, The Correct Cr8 File is 23Kb.

Which I attach.

Title: Re: Mesh2A8s Export Script
Post by: Raxx on December 23, 2013, 12:55:32 pm
Yeah, I was aware that someone made something like it, but at the time I needed the shapes made a specific way. Use whichever one you prefer ;)
Title: Re: Mesh2A8s Export Script
Post by: captaindrewi on December 23, 2013, 06:56:12 pm
success :)thanks everyone.
my first two attempts.
i have posted the book before but this one has a suitable icon.
Title: Re: Mesh2A8s Export Script
Post by: polyGon_tError on December 26, 2013, 09:27:28 am
well, allow me to make you all little happy,

getting some info/data from you all i made a 'Book' live, now can be opened with page's as well.

don't forget to reply how it is.

*Note : Update (01.01.14) - 3 Material (now editable) + Normal fix, please download again and replace previous, thanks.
Title: Re: Mesh2A8s Export Script
Post by: captaindrewi on December 26, 2013, 10:49:39 am
Works fine.super job :)
Title: Re: Mesh2A8s Export Script
Post by: lppena on January 01, 2014, 12:05:31 pm
Here's a trick I figured out to get a image thumbnail 32x32 out of Caligari Truespace 7.6 using its render to file function. Load the object you want to use and set the material color to 0 0 0 turn off all lights in the scene and set the background color to 255 255 255.

In the render to file option select PNG as the output format in the out image size set it to 32x32 and save the file to the folder with Tysons button plugin converter.

Open the converter and open the PNG image to convert it to an a8s file and then open the parametric script that you want to use for the button image in a text editor and remove the current button block of text and open the new a8s file and copy the button section to the parameteric script and save it.

At first I could figure out why my first attempt failed showing only a blank button, but after some trial and error I found that turning off the scene lights did the trick in creating a usable image on the button face.

I suppose that it can be done in Anim8or as well but I am not that familiar with Anim8or; prehaps someone more knowledgable could post the steps for doing in Anim8or. Leroy. Happy new year to all btw.

Update: to do it in Anim8or apply a material color of 0 0 0, use the render image function, set the output size to 32x32, the background color to 255 255 255 and select the alpha channel option. The other steps are the same for editing the button in a text editor.

I attached the a8s button for the B-25 Mitchell that I uploaded in an earlier post. Leroy.
Title: Re: Mesh2A8s Export Script
Post by: polyGon_tError on January 02, 2014, 02:39:31 am
Difference of 'Raxx' - 'Mesh2An8' and 'Llyr Carter' - 'Cr8plugin' for general user.

 Mesh2An8 :
 * simple, easy, small Output.
 * work with 'Scale' tool.
 * output Data is easy to RegExp to use it for making true Parametric Mesh.
 * single Mesh, Default Material, no Texture Output.
 * Material and Texture can't be changed(currently).

/* add this code before defining Material to make it user changeable */
if($<Object Name>.LookupMaterial("<Material Name>") == NULL){
 ... define Material here ...
}

 Cr8plugin :
 * little complex, big, not easy to RegExp.
 * work with 'Non-Uniform Scale' tool.
 * Multiple-Mesh/Shape (Output will be Single) with Multi/Sub Material, Multi-Texture Support.
 * Work with old Version (V.95) as well.
 * keep user Setting of Material and Texture after changed.

* Note (12.01.14): added the Round Cube (Mesh is from 'lppena' modified for better Subdivision), now it is parametric. updated the Book as well (see above).

Title: Re: Mesh2A8s Export Script
Post by: lppena on January 12, 2014, 06:15:53 am
Cool Thanks.