Anim8or Community

Artwork => Anim8or Challenges => Topic started by: Raxx on November 03, 2014, 03:52:23 pm

Title: Challenge #33: Parametric Shape
Post by: Raxx on November 03, 2014, 03:52:23 pm
ASL Snippet
  1. /* ------------ [ Challenge #33: Parametric Shape ------------ */


What this is...
This is a ASL scripting challenge! Consider this your opportunity to learn how to script for Anim8or! This is not a competition! Your goal is to write a parametric shape script that hasn't already been written before, and post in this topic whenever you have issues, questions, or helpful suggestions to others' scripts as they work on it!

Resources

Restrictions

Getting Started
Think of a shape that you think would be fun or useful to have in your arsenal, that hasn't already been made before. Announce your idea and if you like, any thoughts, and then have at it! Post your updates in this topic, including the script(s) as you work on it, to let others test it and provide feedback. If you stumble on a problem, feel free to post it here and get some pointers from other members!
Title: Re: Challenge #33: Parametric Shape
Post by: Raxx on November 03, 2014, 06:29:08 pm
Alrighty, I've been hankerin' to make a parametric tree script, so that's what I'm gonna work on :)
Title: Re: Challenge #33: Parametric Shape
Post by: Arik_the_Red on November 19, 2014, 01:04:11 pm
hehe... Not even ready to make sense of this! Nowhere near touching scripting yet...
Title: Re: Challenge #33: Parametric Shape
Post by: Raxx on November 19, 2014, 04:16:39 pm
Aww, c'mon now Arik, you can do this if you put your mind to it ;)

I'm in the prep stage for my tree script, kind of psyching myself up for the dive, haha. I've researched it a bit, and will approach the implementation using the traditional L-System (http://en.wikipedia.org/wiki/L-system) method. I might end up making a fractal generator first though, to make sure I have a full grasp on it.
Title: Re: Challenge #33: Parametric Shape
Post by: Arik_the_Red on November 20, 2014, 12:01:14 am
ahhh helllll... Let me go buy a 5th of Kraken and we'll see...
Title: Re: Challenge #33: Parametric Shape
Post by: $imon on November 20, 2014, 04:15:50 am
Haha I know how you feel Arik.. But don't worry, we don't have to make anything too difficult..
When I have some time I'll see if I can dive into this as well.. Was thinking about making a random squash generator, but maybe I should start with something easier ;)

Can't wait for your tree generator, Raxx! There's a need for a good one.. Make sure to give the option for groups of transparency-map leaves instead of mesh leaves maybe?
Title: Re: Challenge #33: Parametric Shape
Post by: justiceiro on December 31, 2014, 12:13:16 pm
Was considering making a claw script, but i have no prior experience with the asl tools. The asl editor from 2009 is still the best option?

Thanks.
Title: Re: Challenge #33: Parametric Shape
Post by: Raxx on December 31, 2014, 02:51:26 pm
Hi justiceiro, would certainly be interesting to see a claw script. For small to medium sized scripts, the ASL editor would be sufficient for the task. Otherwise give Notepad++ or your favorite code editor a shot.
Title: Re: Challenge #33: Parametric Shape
Post by: justiceiro on January 01, 2015, 12:51:19 am
Well, after some strugle, i managed to get the basic idea working. The script alreadly make a path for the object to follow, and i can even put a straitgh model of the claw. I'm now interested in using the float4x4 to make the claw bend, but this kind of operation will probably be quite hard.  :-X ::)
Title: Re: Challenge #33: Parametric Shape
Post by: kreator on January 02, 2015, 01:53:01 am
justiceiro: Just a heads up I get a syntax error at line 25

fails to load in version 0.98 but operates in build 1146 revision.

Dunno about the spanish I`ll have to look up raio (radius?) comprimento and espessura!!
Title: Re: Challenge #33: Parametric Shape
Post by: justiceiro on January 04, 2015, 06:55:02 pm
justiceiro: Just a heads up I get a syntax error at line 25

fails to load in version 0.98 but operates in build 1146 revision.

Dunno about the spanish I`ll have to look up raio (radius?) comprimento and espessura!!
Same thing with me about the syntax errors. In the 0.98, ASL didn't have main() functions, so i stoped bother about it and just made a script that worked in the lastest version, since that was the one used on the tutorial about parametric shapes. Actually, it seems to me that no funciontons where supported this taht version, and really hard to make a good code without at least functions.

And, no, its not spanish, but Brazzilian portuguese(also know as - huehuehue BR). Some glossary to help you out on the understandment:
raio = radius
comprimento = length
espessura = thickness
garra = claw
passo = step

the rest problably mean what looks like(divisoes=divisions,pontos=points,indices=indexes, etc)

The idea is to use arc froma circle to make the claww oriented by that, but for do this, i'm still working on matrix transforms. Pls don't close the constest just yet, i'm still working on it, thanks.

Title: Re: Challenge #33: Parametric Shape
Post by: captaindrewi on January 05, 2015, 05:14:12 am
Hi justiceiro,
i know you are still working on the claw and may be aware but have noticed it crashes anim8or when attempting a subdivision.
Title: Re: Challenge #33: Parametric Shape
Post by: justiceiro on January 07, 2015, 01:29:15 am
Hi justiceiro,
i know you are still working on the claw and may be aware but have noticed it crashes anim8or when attempting a subdivision.

Heh, sorry, another know bug. You see, i put on the shape some loose points, so, if  you convert to a mesh and go on edit mode, you can see the points floating around that are probably cauing the errors. You can delete then, for now, and try to subdivide again.
Title: Re: Challenge #33: Parametric Shape
Post by: justiceiro on January 14, 2015, 09:43:08 pm
Ok, getting somewhere now, don't know exactly on where, but definitivily somewhere :P

I'm having some problems with the use of scale_x, and scale_y, and the subvision error persist, but at least you can change the color now, which is nice.
Title: Re: Challenge #33: Parametric Shape
Post by: captaindrewi on January 16, 2015, 02:35:41 pm
Very organic looking now,a very pleasing shape.
playing with it and extruding all faces simultaneously it didn't crash.
Title: Re: Challenge #33: Parametric Shape
Post by: Raxx on July 02, 2015, 04:21:56 am
Alright, been ages but I finally got around to it. I just implemented a crude L-System where you can enter basic rules and create 2D fractals. I was able to implement the rules in the examples on the Wikipedia entry with relative ease once I got the system working. The system itself was extremely easy to implement. About 90% of the time taken was making the drawing function that draws geometry along vectors.

This is the starting point to creating a plant/tree generator. I'll post a 2D fractal shape script after I organize the code and make the implementation more user-friendly.
Title: Re: Challenge #33: Parametric Shape
Post by: captaindrewi on July 02, 2015, 05:51:46 am
Very impressive,i'm excited.
Title: Re: Challenge #33: Parametric Shape
Post by: ENSONIQ5 on July 02, 2015, 07:06:00 am
That really is very impressive, I'm also excited!  The last image in particular is just staggering, fractals never cease to fascinate me in the way they seem to be able to cross the threshold from geometric perfection to organic fluidity.  Very, very cool!
Title: Re: Challenge #33: Parametric Shape
Post by: justiceiro on July 11, 2015, 05:49:56 pm
Damm, surpassed :P
anyway, i kinda busy ritgh now to finish mine of. Maybe by the first week of august i can do it.
Title: Re: Challenge #33: Parametric Shape
Post by: Raxx on August 02, 2015, 11:01:02 pm
Been working on this script still. The user can now set colors, distances, radiuses, and angles that (can) age based on step or generation, among other things.

Still have to fix a few bugs, optimize some areas, and make the script as user-friendly as possible. The Box pattern, which is one of the simpler ones, has 30 user-definable settings. I doubt users would want to slog through Anim8or's attributes system 30 times, so any changes or additions by the user will have to be made within the script itself using a text editor.

In the meantime, here's a screen recorded video of the script running various patterns in Anim8or. When refreshing at each step, like in this video, it gets slower the further into the pattern it gets. When refreshing is disabled, however, these patterns get completed in one or two seconds.


When the script is ready, I'll give it its own topic and how-to in the ASL Scripts board.
Title: Re: Challenge #33: Parametric Shape
Post by: lppena on August 03, 2015, 04:30:19 am
hehe... Not even ready to make sense of this! Nowhere near touching scripting yet...


I hear ya bro my brain begins to ache at the thought of writing scripts. God bless you guys that understand the process for us modeling igits that can only scratch ourselves silly....