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"

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.

Messages - 2020 Hindsight

Pages: 1 2 3 [4] 5 6
46
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 10, 2021, 09:55:16 am »
I believe I added it to the “controller script” but I’m not confident in the terminology – I could be confused about the names of things.

I added it to the file with the “.an8” file extension not the “.a8s” file extension. The file attached to the post above that starts “How about this version Ian?” called “Animated toy yacht on sea - 192x128zoom.an8”

47
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 09, 2021, 09:11:51 am »
I would like to make floating objects bob with the waves. But I think I must be being thick as I cannot follow what is written under the heading “Controller Expression Script” in https://www.anim8or.com/scripts/spec/index.html

I have tried adding the following to the “Animated toy yacht on sea - 192x128zoom.an8” file I’ve been using, but I just get the error report “Error in reading file” in a pop-up window named “just so you’d know”:
  point3 $bluePos;
  $bluePos = GetAttributePoint3("toy yacht", "position");
  $position = $bluePos + (0, 50, 0);


I have also tried simply declaring an int variable at any point I think it may be acceptable within the .an8 file. But I always get the “Error in reading file” error report.

Can someone point me to a .an8 script that demonstrates how to use the GetAttribute* functions?

Should the above code be inside the scene { "scene01" …} section, or after the closing ‘}’? Or somewhere else?

Thanks,
John

48
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 08, 2021, 08:58:31 am »
I think this looks better. I increased the height of the waves:

I tweaked the settings from the last video to:
    parameter { "X Tiles" int 192 }
    parameter { "Y Tiles" int 128 }
    parameter { "Scale" float 0.50000 "scale" "scale_x" }
    parameter { "Seed" int 3454 }
    parameter { "Wave origin count" int 23 }
    parameter { "Max wave height" float 0.33000 }
    parameter { "Mean wavelength" float 7 }
    parameter { "Min wave distance" float 120 }
    parameter { "Wave direction" float -65 }
    parameter { "Time" float 92 }


and

$DecayingWaveOrigins.push( ($x + $len_x * $dy - $len_y * $dx,
                            $y + $len_x * $dx + $len_y * $dy,
                            0.15, 4) ); // amplitude, wave length

49
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 07, 2021, 06:28:02 pm »
How about this version Ian?

The water is wider than it is deep 192x128 to fill horizon, with small waves so the reflections don't go off the cloud .jpg backdrop. It would have been better if the wave origin wasn’t so far left or at least if it was further back from the grid.



50
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 07, 2021, 12:19:53 pm »
Hi Ian,
There be monsters!


OK. Some scale and centring issues here!

51
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 07, 2021, 07:01:26 am »
Thanks Johnar!

52
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 06, 2021, 06:09:20 pm »
Waves around ball but with no call of addBoat()
(For comparison with "Waves around a ball animation, with decaying waves around the ball.")

[/youtube]
The second video is the video I posted before of "Waves around a ball animation, with decaying waves around the ball."

As I mentioned in the earlier post: It is a shame that the YouTube video quality is so fuzzy – the video I uploaded was nice and crisp. I have been using the “Intel IYUV codec” for video compression. Is there a better choice for uploading to YouTube?

53
I added a function to place boat outlines in the water in a script I uploaded on:
https://www.anim8or.com/smf/index.php/topic,6051.0.html
I also posted a couple of YouTube links of the script in action.

/* Function: $addBoat( float $x, float $y, float $direction, float $length, float $width )
 *
 * x,y - Center of boat
 * direction - direction boat is pointing (in radians {radians=PI*degrees/180})
 * length - length of the boat
 * width - width of the boat
 */
int $addBoat( float $x, float $y, float $direction, float $length, float $width )
{
    $dx = sin($direction);
    $dy = cos($direction);
   
    for $angle = 0 to 2*PI step PI / (8 * ($length + $width)) do{
        $len_x = sin($angle) * $length;
        $len_y = cos($angle) * $width;

        $DecayingWaveOrigins.push( ($x + $len_x * $dy - $len_y * $dx,
                                    $y + $len_x * $dx + $len_y * $dy,
                                    1, 12) ); // amplitude, wave length
    }
    return 0;
}


The variable names are a bit odd because I was reusing variables I had already defined.

I should probably add amplitude and wave_length as function parameters!

54
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 05, 2021, 07:45:14 pm »
The addBoat() function can make boat shaped splashes too (well ellipses anyway).

Here is an animation I made testing this functionality – you see the splashes but I haven’t added a boat.

I think I used a length of 20, a width of 5, and an angle of PI/6 radians (which is 30 degrees).

55
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: January 05, 2021, 07:21:29 pm »
I’ve had a bit of a play with the animated waves, and tried to give the impression of interaction between an object and water.

I added a function to the script to make a boat hull shaped splash. I felt that otherwise it looks artificial - I probably should do another animation without calling the addBoat() function, and compare them:
/* Function: $addBoat( float $x, float $y, float $direction, float $length, float $width )
 *
 * x,y - Center of boat
 * direction - direction boat is pointing
 * length - length of the boat
 * width - width of the boat
 */

If you set the width to the same value as the length, then your boat is a coracle, or Rover from The Prisoner, as I have animated! (Well a sphere is a lot easier to model than a boat!)

Having the ball bobbing around a bit would help with the realism.

The function adds a number of decaying wave sources around the periphery of the boat:
$DecayingWaveOrigins.push( ($x + $len_x * $dy - $len_y * $dx,
                            $y + $len_x * $dx + $len_y * $dy,
                            1, 12) ); // amplitude, wave length


The last two parameters set the wave height and the wave length.

Anyway here is the result:
[/youtube]

I notice that the video on YouTube isn’t as sharp as the video I uploaded. I have been using the “Intel IYUV codec” for video compression. Is there a better choice for uploading to YouTube?


56
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: December 30, 2020, 07:34:40 am »
Hi Steve – you may want to shout “That’s forboden!” at me, but …

The parameter editor only allows 10 parameters, which was a bit limiting on the waves script. Originally I had separate scaling factors for X, Y, and Z. And as an experiment I just added back the “Z scale” (as an eleventh parameter). From the .an8 file I can configure the wave scrip with all 11 parameters (proved by animating big and small waves).

Should it be safe to add extra script accessible only parameters?

If I select the wave object, and bring up the “Parametric Plug-in Editor” then hit “OK”, I get the error “Bad value:  Z scale”. And if I hit “Cancel” I get “Anim8or has stopped working”.

If I just load the .an8 script that sets all 11 parameters, I can produce animations without a problem.

57
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: December 30, 2020, 05:10:38 am »
:)

58
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: December 29, 2020, 07:01:14 pm »
This is my first try of Anim8or's animated parametric plug-in meshes. It is cribbed off Steve’s demo files. But I have moved the wave source closer, rotated the wave direction 180 degrees, and added a decaying wave origin at the centre of the grid (offset from grid by 0.49 to reduce the splash height. But this resulted in a truncated splash. Is it possible to subdivide faces on an animated parametric plug-in mesh? ):

Thanks for all your work Steve!

59
Sorry I didn't get round to creating wave meshes for each frame.  But Steve had sent me a message indicating he hoped to soon start on implementing a proper solution for animated objects.

I see that he has now done this, or at least implemented a “preliminary version”:
https://www.anim8or.com/smf/index.php/topic,6051.0.html

This is much better than a hacked workaround from me.

I didn't pass the message on, because I didn’t want to raise expectations that Steve was going to deliver functionality, when it could have turned out that there was an unexpected complication meaning he had to ditch the feature.

Regards,
John

60
Ongoing Anim8or Development / Re: Animated Parameteric Plug-in Scripts
« on: December 29, 2020, 05:49:39 am »
That looks great Steve! I shall have to have a play with it.

John

Pages: 1 2 3 [4] 5 6