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 - sagedavis

Pages: [1]
1
ASL Scripts / Sage ASL collection
« on: October 15, 2008, 02:48:41 am »
Since Kubajzz had started a little tool box of his own, I thought it would be cool to begin a small collection of my own as well. Having them on this board all in one place is pretty neat. Perhaps larger collections could get stikied up so that they can be found every time.

This is my first contribution (well, my first one to be added to this new board at least)

Over at http://www.anim8or.com/smf/index.php?topic=1361.0 VBSmiles posted some really great metalic materials to use with ART for really great metallic effects.

I took the liberty of using the export_materials tool to convert that set into a materials script. The export_materials tool only attaches them to an object at the moment, so, I edited the script to appear in the "file" tab of the material editor so that you can use them throughout your project.

Enjoy.
Sage

EDIT: unfortunately, this one did not export the attributes that made these items so awesome, I'll work on editing them to get those in. Perhaps Bob_its will edit (or allow me to mess with) the export script to try to figure out how to include those items.

2
ASL Scripts / ASL and working with materials
« on: October 15, 2008, 01:55:01 am »
I have been working with the materials script to export materials to a .a8s file. http://homepage.ntlworld.com/w.watson3/main/files/export_materialv1.a8s

I notice that when I import my exported script, it imports them to the object tab (rather than the file tab) of the material editor.

I would prefer my palet to be global so that I can import it once and use it for any object.
So, when I export my materials in the "File" tab, I don't get any material, but, I do if it's attached to the object tab.
Her's what I get.
<code>
/* basic Material script for Anim8or 0.97d beta
*/
object $obj;
material $mat;
$obj = project.curObject;
$mat = $obj.NewMaterial ( "Gold");
$mat.LockAmbiantDiffuse = 0;
$mat.SetAmbiantColor ((0.957 , 0.831 , 0.498 ));
$mat.Ka = 0.300;
$mat.SetDiffuseColor ((0.957 , 0.831 , 0.498 ));
$mat.Kd = 1.000;
$mat.SetSpecularColor ((1 , 1 , 1 ));
$mat.Ks = 0.500;
$mat.SetEmissiveColor ((0 , 0 , 0 ));
$mat.Ke = 0.000;
$mat.roughness = 3.00;
$mat.brilliance = 10.000;
$mat.alpha = 1.00;
$mat = $obj.NewMaterial ( "Brass");
$mat.LockAmbiantDiffuse = 0;
$mat.SetAmbiantColor ((0.929 , 0.725 , 0.192 ));
$mat.Ka = 0.300;
$mat.SetDiffuseColor ((0.929 , 0.725 , 0.192 ));
$mat.Kd = 1.000;
$mat.SetSpecularColor ((1 , 1 , 1 ));
$mat.Ks = 0.500;
$mat.SetEmissiveColor ((0 , 0 , 0 ));
$mat.Ke = 0.000;
$mat.roughness = 3.00;
$mat.brilliance = 10.000;
$mat.alpha = 1.00;
$mat = $obj.NewMaterial ( "Copper");
$mat.LockAmbiantDiffuse = 0;
$mat.SetAmbiantColor ((0.875 , 0.353 , 0.129 ));
$mat.Ka = 0.300;
$mat.SetDiffuseColor ((0.875 , 0.353 , 0.129 ));
$mat.Kd = 0.700;
$mat.SetSpecularColor ((1 , 1 , 1 ));
$mat.Ks = 0.600;
$mat.SetEmissiveColor ((0 , 0 , 0 ));
$mat.Ke = 0.000;
$mat.roughness = 0.60;
$mat.brilliance = 1.800;
$mat.alpha = 1.00;
$mat = $obj.NewMaterial ( "Silver");
$mat.LockAmbiantDiffuse = 0;
$mat.SetAmbiantColor ((0.714 , 0.714 , 0.8 ));
$mat.Ka = 0.300;
$mat.SetDiffuseColor ((0.714 , 0.714 , 0.8 ));
$mat.Kd = 1.000;
$mat.SetSpecularColor ((1 , 1 , 1 ));
$mat.Ks = 0.500;
$mat.SetEmissiveColor ((0 , 0 , 0 ));
$mat.Ke = 0.000;
$mat.roughness = 3.00;
$mat.brilliance = 6.000;
$mat.alpha = 1.00;
$mat = $obj.NewMaterial ( "Steel");
$mat.LockAmbiantDiffuse = 0;
$mat.SetAmbiantColor ((0.878 , 0.878 , 0.878 ));
$mat.Ka = 0.300;
$mat.SetDiffuseColor ((0.878 , 0.878 , 0.878 ));
$mat.Kd = 0.700;
$mat.SetSpecularColor ((1 , 1 , 1 ));
$mat.Ks = 0.400;
$mat.SetEmissiveColor ((0 , 0 , 0 ));
$mat.Ke = 0.000;
$mat.roughness = 8.00;
$mat.brilliance = 2.000;
$mat.alpha = 1.00;
$mat = $obj.NewMaterial ( "Alien Green");
$mat.LockAmbiantDiffuse = 0;
$mat.SetAmbiantColor ((0.00392 , 0.408 , 0.00392 ));
$mat.Ka = 0.300;
$mat.SetDiffuseColor ((0.0118 , 0.851 , 0.0118 ));
$mat.Kd = 0.700;
$mat.SetSpecularColor ((1 , 1 , 1 ));
$mat.Ks = 0.400;
$mat.SetEmissiveColor ((0 , 0 , 0 ));
$mat.Ke = 0.000;
$mat.roughness = 3.00;
$mat.brilliance = 10.000;
$mat.alpha = 1.00;
</code>

Is there anything I can change in this to get it to send to the file tab in the script editor? I tried changing the first line "object $obj;" to read "file $obj;"
I am assuming that $obj is a variable and this line would be like saying $obj = object;
Thanks
Sage

3
Anim8or v0.98 Discussion Forum / Suggestion - Relative Path - and
« on: October 09, 2008, 06:00:42 am »
For some reason, I have been getting more and more into portable apps. Actually, it really isn't without reason, I have way too many computers that I access, between home and work and friend's houses. Sometimes the flash drive I am working from is E: sometimes it's F: just depending on the day and what all is plugged in first.
Using a relative path for scripts and so on would be Fantastic.

I had actually thought it was already, because when you go to congfigure you see dots, which usually tells me that it means start here.

the second thing, does anim8or write to the registry at all? If so, is it possible to use a .ini file instead for anything that requires registry writes? this would make anim8or completely portable along with all of it's settings.

Just suggestions
Sage

Pages: [1]