Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 3    [LBP3] Tutorials
#1

Fireflies

Archive: 4 posts


Ever wanted completely random fireflies (random-relatively speaking)?
EASY! Lets delve right on in!
First off we start with the visuals, a light and a sticker. We do this so we can input opacity changes for how fast the firefly is moving, to give some variation in the lighting. Typically what I do for the visuals are just a LED on the top of the material set to dimmer, and a small white circle on sticker panel (all white that way you can change the color easily)
Next, connect a microchip to the top of that sucker (center it if you can, it will be crucial for border sensor accuracy). Inside of that microchip, you're going to need 4 tag sensors for X and Y movement. 2 will restrict the movement of the X and 2 for the Y (Left, Right, Up, Down). Now, it's easy to just hook up a randomizer to 2 selectors for movement, but that way is just a bunch of 45 degree angles, just nasty looking; you don't want to do this. What you should do is create some kind of gradient in speed to avoid this, but the concept is still the same in theory.
To make this gradient, you'll need 2 timers, one for the X axis, and one for the Y. Timers are great for acceleration because of course, they are designed to time and gradually crawl to their destination. These timers should all be speed scale to ensure they work correctly. Next, to the input of these timers, input a combiner. To those combiners, input a randomizer for each combiner, adjust timings yourself for the timer and the randomizer, it's all specific to how you want your fireflies to work. What this will do is randomly add and subtract value from the timer with allowing pauses into the timing so speeds don't always have to be changing, allowing for more randomness. Now all you have to do is to disable moving out of bounds.
To disable out of bounds movement, you need to disable the wiring links between the randomizer and the combiner. This is how it should be done because if you disable it anywhere else, the boundaries will be hard, and it will look unnatural. Of course, if you want to have hard boundaries then this tutorial will be flawed in many ways, and I'll create an offshoot tutorial in the comments for hard boundaries. Doing it this way, all you're telling the timer is that "You can't go out any further, but if you choose to come back, that is allowed". Now it should look like this:

http://ia.api.vita.lbp.me/img/ft/5ba6755c5a09256090b1c7a621e04979fa517ff1.jpg
Now is a bit confusing (the motive at least), but we'll make it through! Take another combiner (one for each timer) and hook the timer output into the positive node of the combiner and a 50% input into the negative node. Take the output and hook it up into an OR gate set to addition, effectively doubling the value. What this does is makes the middle of the timer neutral, and each end +/-100%. This is a compact unit that can accommodate both negative and positive aspects for an advanced mover. Now just plug each of those OR gate outputs into an advanced mover. Adjust speeds to be optimal.
Z axis movement is the last on the list. Unfortunately, to my knowledge, there are no ways to detect Z value (at least efficiently) so we have to do this manually, no modular borders that can just easily move around. All you have to do is make another timer unit such as the ones above, less the sensors and AND gates. Now just plug this timer in directly (no combiner and -50% stuff) to a positional advanced in and out mover. Manually adjust layer range to fit your needs and you're golden.

I hope this is a good tutorial for you all, I'm going to make a variant tutorial in the comments soon for hard bordered fireflies in case you have like a room of fireflies or something.

Leave feedback and questions below
2015-08-12 23:50:00

Author:
amiel445566
Posts: 664


I'm gonna give this a whirl.... I'll let you know have I get on!2015-08-13 10:32:00

Author:
James-p
Posts: 286


Thanks a lot for this tutorial, I will try to create my first firefly with your recipe!
Though I've often proved to be a bad cook even with recipe!

Many greetings, Jürgen^^
2015-08-24 08:36:00

Author:
CuriousSack
Posts: 3981


https://s-media-cache-ak0.pinimg.com/originals/c9/b1/62/c9b162c72a6b7e06d5ccebf84962a40f.gif2015-08-26 01:26:00

Author:
TenebrisNemo
Posts: 11336


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.