PDA

View Full Version : New (?) Waterfall Mechanic Tech Demo



rtm223
02-23-2010, 01:32 AM
I've just published a tech demo for a waterfall mechanic I've developed, which I believe to be new, although it wouldn't surprise me if someone has done anything similar. I've never seen it anywhere before and personally I think it looks bloody lovely :) I've actually published it as it links in with the fabled next installment of my logic blog, but I figured this would have wider appeal than those who want to read about logic, what with it being pretty and that.

Logic blog will be published tomorrow (no really, it just needs a proof read), with details of the method, and I'll probably add more specifics of getting it to work as a waterfall shortly after.

Anyhoos, lemme know what you think.


Edit - sorry no pics, but they all looked naff, so just go look when you're on LBP :)

Edit again - Oooops, forgot to give credits, these people provided some very important additions so thanks to them:

Comphermc - sitckering.
Javi haguse - foliage.
Syroc - a box of sponge.




Awesomely Awesome Step-by-Step Guide

So, as I described in the blog, the waterfall is simply an extension of the conveyor belt, in fact, mechanically it's no different from the conveyor belt - it is just a block of material moving at fixed velocity on a piston. So the best starting point is a simple block of material:


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_22.jpg

This thick layer rectangle will form the main part of the waterfall. It is grid aligned and 50 units (5 big grid squares) high. The width is irrelevant, just make it as wide as you want it to be - but keep it grid aligned. If you refer back to the pictures of the conveyor, you can see the join between the blocks, which is something that we want to avoid (as much as possible) with the waterfall - we want it to look more natural than that.

The first step towards this is to break up that straight line at the bottom, but remember: we still need these blocks to emit and perfectly align, so that means we're still using the grid. Just add in some diagonals (using the corner editor) that match up both top and bottom.


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_24.jpg


The other important factor here is that we need an anchor point for the piston. Once again, precision is required and the piston needs to be travelling straight downwards, and the best way to achieve this is grid alignment once again, so we will make a 5-units (2 small grid squares) wide horizonal line at the top and of course, at the bottom as well.


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_25.jpg


At this point it's best to check that you've actually done this right. you should be able to copy and paste the object directly below itself (still in grid mode) and get no merging of materials. As an alternative to this process you can just do the top edge and the copy and cut it out of the bottom. It's your choice.


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_27.jpg


Important note: One problem I did hit with morganna's waterfall was that if you have diagonals that are too steep, you may be able to do the copy/paste test successfully, but the emitters will fail on it. I'm not sure why, but the phrase "rounding erros" is springing to mind.

We still aren't looking very natural here though, so turn off the grid and shape up the sides. I've gone for something relatively subtle here - just a kind of loose wavey pattern - remember it's going to be travelling past pretty quick so vast numbers of vertices really aren't necessary. Tip: make sure the top and bottom of each side match up still - you don't want a harsh angle in there.


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_25.jpg


So that's the shape of our waterfall made, next to add the mechanics. Connect a stiff piston to the anchor point at the top of the waterfall and then we need to tweak it to the correct speed.


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_28.jpg


This is the tricky bit, so pay attention.... So take the equation from my blog and remember we need P to to be some multiple of 0.1. We know the value of the object length (d) and if we set the minimum length of the piston to 0, we have a much simpler equation to deal with:




d t
p = -------------
2 (L - l)


60t 30t
= ----- = -----
2L L


We want L to be something pretty long as we need enough space to spawn the waterfall out of sight above the screen and have it drop out of sight at the bottom before we can allow it to vanish. As I mentioned in the comments of the blog I prefer to have this length longer than needed, so that the piston will never fully extend before the emitter lifetime expires. So lets plug in a max length of 450 - which is way taller than we need and also another nice round number (no need to make life difficult for ourselves eh?) If we plug these into the equation and rearrange:



30t
p = -----
450

t = 15p



Remembering that p is the emitter timing, we know it has to be a multiple of 0.1s. For a sheet of material 60 units high, having 2 go past every second seems like around the right sort of speed we want, which will require a value of p=0.5s, giving a piston timing of 7.5s. In summary:

Piston Minimum Length = 0
Piston Maximum Length = 450
Piston Time = 7.5s
Piston Visible = No
Piston Stiff = Yes
Emitter Lifetime = 0.5s


So tweak your piston to those values, attach a grab switch to the dark matter and tweak that to be directional and inverted and connect it to the piston. Unpause and your piece of glass should shoot down in a straight line and stay there. Assuming it works, rewind and capture it. Put down an emitter and tweak the frequency to 0.5s and make your newly captured waterfall the emitted object. Make yourself a viewing platform and observe:


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_30.jpg


Rewind.

You will probably have been able to see the join quite clearly if you are looking for it, as shown in the picture above. To help disguise this, we will use the fact that if you have two layers of glass on top of each other, the back layer becomes invisible. Obviously this means that if there are two pieces of glass behind, the join between them becomes invisible:


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_31.jpg


Note that I've swapped to the PotC glass here, partly because it shows up the join better, but it actually looks a lot prettier too once it's stickered up in the final product.

So attach some thin layer detail to the front of the think layer piece in such a way that they overlap the join on the waterfall. Note I'm just using 4-6 vertices per piece, it's going to be rushing past so no need to overdo the detail. I'm sure some of you will come up with far more impressive patterns than me, but I to much detail will probably be wasted effort IMO:



http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_32.jpg


Make sure again that you can still butt two of these pieces together in grid mode, and that you haven't messed up the overlapping and there aren't any empty areas.


http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_33.jpg


Put this object in the emitter and unpause again and your new, improved waterfall should just work as all the timings etc are still valid:

http://i600.photobucket.com/albums/tt82/rtm223/Emitter%20Blocking/Waterfall%20Tech%20Demo/APhoto_34.jpg


Now it's just a case of stickering and placing in situ. Then of course adding some lights, gas, rockets, sound objects and of course, your trusty box of sponges :D

comphermc
02-23-2010, 01:48 AM
Haha. What's a box of sponge? Lol. I needed a paperwritingbreak, so I'll check it out. I still think the little vine is the coolest! ;)

Littlebigdude805
02-23-2010, 02:01 AM
pretty, follow the waterfall down the right way with your eyes and you can see the breaks ;) still a very nice method.

comphermc
02-23-2010, 02:13 AM
Ouch... two stars when I got there, lol. By sponge box, do you mean invisible barriers? Because I saw no sponge. :D

dajdaj03
02-23-2010, 02:13 AM
Just had the time to see this before my PS3 froze... :grr:


It looks really great! The fall is very smooth, and there's no visible transition which is great!
I'm not a Logic expert but I'm curious to know how you did this...

I think I never saw this mechanic. The water falls that I know are not that smooth, but more shaky (fast emitting).

Can you for example set its speed?
I was thinking that maybe if is was a little faster, maybe it would look even more natural...?
Hum...don't know, I'm just imagining :)


Anyway great work!

rtm223
02-23-2010, 09:12 AM
pretty, follow the waterfall down the right way with your eyes and you can see the breaks ;) still a very nice method. I know you can - it really does show up in the stills sadly. Personally I think it's easier to see the repeating pattern than the breaks, but yeah you can see it. I've been thinking about spliting it up into thick layer, thin layer, and checkpoint thick layer and have them moving past each other at different speeds to help disguise it. But that feels like a lot of work :p


Ouch... two stars when I got there, lol. By sponge box, do you mean invisible barriers? Because I saw no sponge. :D
2 Stars? Haha, how many "rubbish" tags did I have? :p You won't see syroc's box of sponge, but you can hear it layered in with the other sounds if you listen really really hard. It adds a little "bubbling brook" sound into the mix :)


Just had the time to see this before my PS3 froze... :grr: I swear this has nothing to do with me.


It looks really great! The fall is very smooth, and there's no visible transition which is great!
I'm not a Logic expert but I'm curious to know how you did this...
Can you for example set its speed?
I was thinking that maybe if is was a little faster, maybe it would look even more natural...?
Hum...don't know, I'm just imagining :)!

You can play around with the speed, but it's quite hard to make slight adjustments to it. For example, I think it would be easy to make this one 20% faster, but 15% faster would be quite hard. Essentially some speeds are easy to achieve, others are harder and some are impossible without a complete rebuild. Sorry I'm being a little bit cryptic here, but I've already written up the technical details of it and they will follow in a couple of hours.

Syroc
02-23-2010, 09:51 AM
Syroc - a box of sponge.
Fame at last! :D

(The gold coin material makes decent err coin sound, by the way)

I actually like that type of waterfall more than the standard glass pane moving quickly up and down or a million pieces of glass being emitted over and over again. I feel it fits the game overall better. :)

Ungreth
02-23-2010, 10:43 AM
Got treated to a live demo of this the other day, and I can say without any doubt that this is the prettiest waterfall effect I have seen in LBP yet.

Oh the irony, that our resident tech-geek should have outsmarted the aesthetes in the visuals department! Next we'll be hearing that Teebonsey has produced a lower thermo toggle switch than rtm or comph, and the world as we know it will be turned on it's head and given a huge wedgie.

lbpholic
02-23-2010, 11:07 AM
This does indeed sound pretty kewl i might try and use it somehow in a level me, plasmavore, fredrik94 and ghostrider are workign on, i can't wait to check this out.

julesyjules
02-23-2010, 11:15 AM
Just checked it out, looks great guys. The detailing in the nearer thin layer (im assuming from what i saw) really makes it. I would have hearted it but I couldn't see the sponge box, sorry!

rtm223
02-23-2010, 12:35 PM
OK, blog is up with an explanation on how to achieve this http://www.lbpcentral.com/forums/entry.php?1041-Emitter-Blocking-Theory. If you aren't that interested in my overblown technical investigations then feel free to skip to section 2.0 which is the tutorial on conveyor belt mechanics which leads on to the waterfall.

I'll update the OP later with some tips on getting it to work as a waterfall so it's convincing, but the best starting point is to build a conveyor belt using the described method.

Syroc
02-23-2010, 01:33 PM
I would have hearted it but I couldn't see the sponge box, sorry!
Pff, it's not something you see its something you experience...

I shall make a thread about it so as not to derail this thread. There will be drawings! Edit: Here ya go (http://www.lbpcentral.com/forums/showthread.php?23090-Box-of-Sponge&p=399201)

julesyjules
02-23-2010, 02:51 PM
It was a joke. I went in expecting a to see a lovely sponge box.

Littlebigdude805
02-23-2010, 04:06 PM
that would be awesome if it was put in a place where the player would be able to see it for a while like in the background of a boss or maybe a hard puzzle, the water shifting past itself may seem more natural and add more wow factor but not worth it if its just going to be seen for a second or two.

Kern
02-23-2010, 04:13 PM
Its good, but it needs MOAR WAT0R!

:p

Well its pretty sweet, If you can perfect it.. Not that its not perfect already... erm.. erm :cry: Sticks head in sponge box

Thegide
02-23-2010, 07:43 PM
Waterfalls are pretty. I must see this.

croissantbuncake
02-23-2010, 08:21 PM
Looking forward to seeing this!! Can't wait to try the new conveyor method also (I'm fed up of wheel based belts)!

Rogar
02-23-2010, 09:20 PM
Hmm, it looks cool, can't see any seams myself. But couldn't this be achieved with a carefully tweaked flipper piston?

Morgana25
02-23-2010, 09:35 PM
I can tell you from personal experience it looks gorgeous... so much so I had to hold rtm captive on my moon until he worked out how I'd messed it up. lol Never send an artist to do an engineer's job. ;) I'll have to check out your published level now as I've just seen the two examples so far :) It's brilliant by the way - makes me wish I were better at math.... and logic... and had a better car... wait? what? ;)

rtm223
02-23-2010, 09:37 PM
I can see a repeating pattern, and see the join because I know where it is.


As for the flipper: possibly, but have you seen what that looks like under even slight multiplayer lag? It just judders around looking like a mess :(

All the flipper piston versions I've seen looked jerky in 1 player anyway. I know you should be able to make it smooth but it just doesn't seem to work for some reason. Although saying that, that was partly because of the fact that the basic glass has a really distinguishable pattern that wouldn't match up at the point of the flip. The potc glass is much less obvious, so it may still be possible.

However, you're gonna need a very big single piece of waterfall if you want to get that working seamlessly - so up thermo requirements and no possibility of nested emitter thermo hacks.

ghostrider135
02-23-2010, 10:36 PM
ive just seen it it looks superb, i want 1 lol

Tamland
02-24-2010, 07:19 AM
Pretty much the best looking waterfall ive seen in LBP.

The next step to take is having it randomized.. so the pattern is no more! That would be awesome!

rtm223
02-24-2010, 11:47 PM
Step by step tutorial added to the OP, I've tried to keep it less technical than my normal blog posts, but it's still quite detailed and does include a wored example of one way to approach the maths.

Probably has spelling / grammar and all sorts of other errors in it, but if you're not satisfied you can have all your money back ;)

Thegide
02-25-2010, 02:47 AM
I finally figured out the trick of overlaying DM objects using emitters just a short while ago. Thanks for the details in your OP on how to calculate the precise timing so there are no gaps in the seam. Absolutely perfect. I had to really look long and hard to see the seams.

Hope you don't mind if I use this soon ;)

rtm223
02-25-2010, 09:33 AM
Yeah that's cool. Remember to use your nested emitters to save thermo if possible though ;)

The trick with the calculations is really just to use sensible numbers. In fact if I had set max length to be 600, rather than 450, it would have been easier still (600 being 10 times the height of the waterfall piece). Looking at it, I'm probably doing it in a bit of a roundabout way TBH, but it's kinda hard to explain in a simplified manner as I've been doing this stuff pretty much on instinct, with the occasional bit of trial and error :p

If anyone tries this, for conveyors or anything else, and comes across any difficulties, then feel free to give me a shout.

ffha
02-25-2010, 08:54 PM
Checked out the level a few hours ago and I'm fairly certain it's safe to say that this is the best waterfall I've ever seen (which doesn't use real LBP-water).
You're the creator of the de-emitter technique, right?
Awesome.

Either way, I love it.
Thanks.

javi haguse
02-26-2010, 07:05 PM
Who cares about the logic!! look at those vines!! LMAO jk
I haven't been able to see it published, but I'll definitely will!

shebhnt
02-26-2010, 10:00 PM
I read this and your blog post on using emitter blocking and am going to incorporate it into any new levels I work on.

I actually want figure out a way to use the static/moving blocking in other ways, like how you can have multiple sponge swings appearing and looking like they are all attached to the same block.

Just think of a challenge that the player has to get from one side to the other but as they start moving stuff, more stuff starts to appear.

rtm223
03-06-2010, 03:31 PM
Any chance I can get this moved to tutorials. It kinda makes more sense there seeing as the OP is now an in depth tutorial.

srgt_poptart
03-06-2010, 10:48 PM
Really, really brilliant. Just looked like a flowing waterfall. I as like "whoah!" and then "geeez!", and then just couldn't say anything else.


Also, I assume by "box of sponge", that you mean one of those things with a bunch of little squares of the same material rolling around to create a sound? Usually hidden just of-screen?

rtm223
03-07-2010, 12:04 AM
Yep, that's what the box of sponge is. Syroc left it in my level and I'm someone who really loves subtlety and attention to detail, to the point I will add things to a level that no player would ever notice, just to keep me happy. The extra sound it makes is so hard to spot that it's almost impossible to notice, but to me that doent matter, I like it :)

comphermc
03-07-2010, 12:38 AM
Moved to tutorials, as per your request.

:)

srgt_poptart
03-08-2010, 04:41 AM
The extra sound it makes is so hard to spot that it's almost impossible to notice, but to me that doent matter, I like it :)

Well, I noticed it if it makes you feel any better. :) BTW, aren't those things pretty thermo unefficient? That's not the RTM I know! ;)

rseah
03-08-2010, 06:23 AM
oo awesome waterfall

i will check it out :)

rtm223
03-08-2010, 08:57 AM
BTW, aren't those things pretty thermo unefficient? That's not the RTM I know! ;)

Reasonably so, but they're pretty and that's more important sometimes :) If I were to use it in a n actual level then I'd most likely use a nested emitter trick to fool the thermo into thinking there is only one of these pieces, so it would probably work out pretty efficient in the end.

bob-omb25
03-08-2010, 12:22 PM
This looks great! I just made mine earlier it took me a bit to get the stickering just right but when i did it was amazing!

Luos_83
03-16-2010, 07:17 PM
Ive come up with two very cool ways of using this, without it being waterfalls.
Wont tell untill i got them used in my levels though :)

clarkdef
03-21-2010, 07:56 AM
This is awesome, I love it. Thanks for sharing

ArcFire43
04-05-2010, 11:28 PM
I'm really terrible at the tech side of this game. If anyone that successfully made this waterfall could help me out with some of my problems it'd be very much appreciated.

I get to the point where the the emitter is introduced. I can make the waterfall fall in a straight line but the emitter seems to have no effect on the waterfall.
Also, from the images your piston is like inside the waterfall the entire way down, mine only stays on top, is that a problem?

This may seem stupid, but I have no idea how to make the water details you made at the end of the tutorial. I just simply don't grasp it. :<

Thanks for anyone who takes the time to help out. <3

rtm223
04-06-2010, 04:07 PM
I get to the point where the the emitter is introduced. I can make the waterfall fall in a straight line but the emitter seems to have no effect on the waterfall. I'm not entirely sure what you mean by this TBH.


Also, from the images your piston is like inside the waterfall the entire way down, mine only stays on top, is that a problem? No, the piston connects to the top of the waterfall. You can see the piston of the waterfall piece below (i.e. the one that was emitted before) through the glass, I assume that is what is causing the confusion.

Id recommend making a basic conveyor belt first using this method as it is significantly easier and should help you get your head around the basic tech.

Screenhogs
06-28-2010, 04:03 AM
Hey Im new here but like can you give away ur waterfall or...

R0GUE--Elite
07-07-2010, 12:52 PM
Wow! thats the best waterfall I've seen on LBP! Could using a 0.0 frequency emitter (found on those MGS point bubble dispensers) eliminate the need for the calculation?

RottenAvocado
07-10-2010, 06:56 PM
Yep, that's what the box of sponge is. Syroc left it in my level and I'm someone who really loves subtlety and attention to detail, to the point I will add things to a level that no player would ever notice, just to keep me happy. The extra sound it makes is so hard to spot that it's almost impossible to notice, but to me that doent matter, I like it :)

Don't worry, I do the same thing. I'll go and sticker and update all my costumes to make myself happy and no one will tell a difference :P I'm a detail addict. Although I don't think it worked much like yours, I think in one of Morgana's levels she had a waterfall that looked similar. I think it was emitter based because I stickered it to see if it was on a lever or not and the sticker never re-appeared.

Tynamite
07-30-2010, 09:19 PM
i need a video tutorial :/ im not really understanding how to do it. i dont know where to place the emmiter. were do i emmit. its confusing me. ive read all of it.

XXGrEEn0Xx
08-02-2010, 08:05 AM
Excellent! I will be defiantly using this in my new level, easy instructions to follow aswell ^^ I always used to go for the normal and most obvious, piece of glass on flipper-motion, well I won't be using that technique anymore ha! Thanks Rtm, Your a genius xD

Tynamite
08-03-2010, 05:08 PM
you made the tutorial assuming we should know where to emit the object, should i delete the object after i capture it(not from inventory)? its so confusing! should i be placing my waterfall high in the level? you leave out so much

LukeCF
09-09-2010, 07:20 PM
Fame at last! :D

(The gold coin material makes decent err coin sound, by the way)

I actually like that type of waterfall more than the standard glass pane moving quickly up and down or a million pieces of glass being emitted over and over again. I feel it fits the game overall better. :)

I agree. It's visually much more in 'LBP' style, than the other waterfalls.

mutant_red_peas
09-23-2010, 06:39 AM
I couldn't grasp the concept of the emitter. To be honest when you started the equasionsI started dreaming about my tea last night. It's a good thing you summed it up after the equasions, because I was confused.

damaz10
09-25-2010, 07:47 PM
This is a question for Rtm: Is there a minimum to how many grid spaces your emmited waterfall can be? I tried making a 10 small grid spaces waterfall using your equation and it wasnt emmiting properly for some reason. I thought about what I just said, that it was too small, so I instead make a 20 small grid spaces waterfall and it worked out fine, by the way, I had the equation set to have 2 grids going by each second, this was true for the 10 grid and 20 grid ones I made. Does the equation just not work properly with a small amount of grid spaces, or did I just happen to do it right when I opted for the 20 grid waterfall? O, and I am using your water tech in my w.i.p level which is in my sig. Thanks for this handy tutorial, it really helps add a more realistic enviroment to levels. :)