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"

Pages: [1] 2

Author Topic: Challenge #33: Parametric Shape  (Read 62878 times)

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Challenge #33: Parametric Shape
« 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
  • No Prefabs: You cannot only create a 3D mesh and use the Mesh2A8s or Llyr Carter's cr8 plugin to automatically convert it to a parametric shape. You may however start with one of those and then program in some parameters or otherwise perform significant adjustments/additions via code.

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!
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #1 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 :)
Logged

Arik_the_Red

  • Sr. Member
  • ****
  • Posts: 785
  • Just another aninoob...
    • View Profile
    • æwakened!
Re: Challenge #33: Parametric Shape
« Reply #2 on: November 19, 2014, 01:04:11 pm »

hehe... Not even ready to make sense of this! Nowhere near touching scripting yet...
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #3 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 method. I might end up making a fractal generator first though, to make sure I have a full grasp on it.
Logged

Arik_the_Red

  • Sr. Member
  • ****
  • Posts: 785
  • Just another aninoob...
    • View Profile
    • æwakened!
Re: Challenge #33: Parametric Shape
« Reply #4 on: November 20, 2014, 12:01:14 am »

ahhh helllll... Let me go buy a 5th of Kraken and we'll see...
Logged

$imon

  • Sr. Member
  • ****
  • Posts: 540
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #5 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?
« Last Edit: November 20, 2014, 04:17:57 am by $imon »
Logged

justiceiro

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #6 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.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #7 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.
Logged

justiceiro

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #8 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 ::)
Logged

kreator

  • Hero Member
  • *****
  • Posts: 1146
  • Anim8or, Blender, & Carrara. A Great Combination!
    • View Profile
    • Anim8orWorld
Re: Challenge #33: Parametric Shape
« Reply #9 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!!
« Last Edit: January 02, 2015, 02:01:37 am by kreator »
Logged
O

justiceiro

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #10 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.

Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 490
  • errm...errr?
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #11 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.
Logged
!

justiceiro

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #12 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.
Logged

justiceiro

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #13 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.
Logged

captaindrewi

  • Sr. Member
  • ****
  • Posts: 490
  • errm...errr?
    • View Profile
Re: Challenge #33: Parametric Shape
« Reply #14 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.
Logged
!
Pages: [1] 2