General Category > Ongoing Anim8or Development

Animated Parameteric Plug-in Scripts

<< < (5/7) > >>

2020 Hindsight:
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

ianross:
Thank you 2020 Hindsight, fantastic work!!!!!! well done.

johnar:

--- Quote from: Steve on January 07, 2021, 06:24:22 am ---johnae the ground grid is underneath the water. The water has an index of refraction of 1.3 which redirects the rays as you look trough the surface.

--- End quote ---

Wicked!!

2020 Hindsight:
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

Steve:
2020 Hindsight - Did you try adding this to a controller script, or to a parameteric mesh script? The GetAttributeXXX() functions are only supported in controller scripts in a scene.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version