Flocking and schooling

Forums: Flocking and schooling
Forum for OctaneRender Lua scripting examples, discussion and support.

Flocking and schooling

Postby haze » Fri Dec 04, 2015 12:30 pm

haze Fri Dec 04, 2015 12:30 pm
In my off time I've written a script to simulate flocking in Octane. It does this by scattering a number of meshes and rotating them to face a certain direction, and applying the Boids rules to them repeatedly. The result is a realistic looking (and very configurable) school of fish, or flock of birds. You can generate the exact same sequence of movements over and over again without storing the translations/rotations - just by keeping the random seed value that you started with. In other words, for a convincing flock/school irrespective of size, it only takes around 32 bytes of storage.

You can make these fish do anything - you could tell them to collectively move over to a certain location, avoid a certain area, etc etc with minimal effort.

I've made a short movie clip of one such animation. I'd like to gauge interest - being a personal project, if there was enough interest I would spend more of my own time developing this into a configurable GUI and make it easier to use, then release it.
Attachments

[ Play Quicktime file ] out.mp4 [ 542.03 KiB | Viewed 13009 times ]

nodes.png
User avatar
haze
OctaneRender Team
OctaneRender Team
 
Posts: 961
Joined: Sun Feb 08, 2015 8:57 pm

Re: Flocking and schooling

Postby bepeg4d » Fri Dec 04, 2015 2:25 pm

bepeg4d Fri Dec 04, 2015 2:25 pm
Wow, very powerful :o
Count me in :)
ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9940
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Flocking and schooling

Postby pegot » Sat Dec 05, 2015 2:14 am

pegot Sat Dec 05, 2015 2:14 am
This is really neat! I'm interested. Would this only be available in Standalone or could the script also work in the Blender plugin?
Win 10
3.7Ghz i9 10900k / 64GB
ASUS STRIX Z490-E
PSU: PowerSpec 850Wd
RTX 3090 Asus Tuff

Network rendering:
Win 10
4.2Ghz i7 7700k / 64GB
AsRock SuperCarrier
PSU: EVGA 1200w
RTX 3080 Ti EVGA Hybrid
RTX 3080 ASUS Tuff
GTX 1080ti SC Black (wc)
pegot
Licensed Customer
Licensed Customer
 
Posts: 921
Joined: Mon Nov 07, 2011 3:44 am

Re: Flocking and schooling

Postby prehabitat » Sat Dec 05, 2015 2:15 am

prehabitat Sat Dec 05, 2015 2:15 am
This looks great!
Win10/3770/16gb/K600(display)/GTX780(Octane)/GTX590/372.70
Octane 3.x: GH Lands VARQ Rhino5 -Rhino.io- C4D R16 / Revit17
prehabitat
Licensed Customer
Licensed Customer
 
Posts: 495
Joined: Fri Aug 16, 2013 10:30 am
Location: Victoria, Australia

Re: Flocking and schooling

Postby haze » Sun Dec 06, 2015 11:36 pm

haze Sun Dec 06, 2015 11:36 pm
pegot wrote:This is really neat! I'm interested. Would this only be available in Standalone or could the script also work in the Blender plugin?


Theoretically it can, but I'm not sure that the plugin allows you to load a lua script for Octane itself to execute
User avatar
haze
OctaneRender Team
OctaneRender Team
 
Posts: 961
Joined: Sun Feb 08, 2015 8:57 pm

Re: Flocking and schooling

Postby prehabitat » Mon Dec 07, 2015 2:04 am

prehabitat Mon Dec 07, 2015 2:04 am
Actually reminds me of leaves/seed pods falling on a slight uplifting wind,

Can it be used with similar random movement but a plane (below) being the anchor? (Ie gravity)?

Or even better could chose two influencers; gravity and wind...
Win10/3770/16gb/K600(display)/GTX780(Octane)/GTX590/372.70
Octane 3.x: GH Lands VARQ Rhino5 -Rhino.io- C4D R16 / Revit17
prehabitat
Licensed Customer
Licensed Customer
 
Posts: 495
Joined: Fri Aug 16, 2013 10:30 am
Location: Victoria, Australia

Re: Flocking and schooling

Postby haze » Mon Dec 07, 2015 8:41 am

haze Mon Dec 07, 2015 8:41 am
Yes - it is very easy to do so. In fact, if I developed it further I would probably have a list of points or perhaps geometry to fly or swim around/away-from/towards etc.
User avatar
haze
OctaneRender Team
OctaneRender Team
 
Posts: 961
Joined: Sun Feb 08, 2015 8:57 pm

Re: Flocking and schooling

Postby Inverse404 » Tue May 31, 2016 2:56 pm

Inverse404 Tue May 31, 2016 2:56 pm
Such a function would be super awesome, can we try out your dev script node ?
Inverse404
Licensed Customer
Licensed Customer
 
Posts: 14
Joined: Wed Sep 10, 2014 4:05 pm

Re: Flocking and schooling

Postby haze » Wed Aug 24, 2016 12:13 am

haze Wed Aug 24, 2016 12:13 am
Here it is. Please remember it is really not a finished product.. You can currently only go forwards in time with the sim.
Attachments
boids.orbx
(1.65 MiB) Downloaded 746 times
User avatar
haze
OctaneRender Team
OctaneRender Team
 
Posts: 961
Joined: Sun Feb 08, 2015 8:57 pm

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 7 guests

Thu Mar 28, 2024 11:42 am [ UTC ]