PDA

View Full Version : Nodes and math help

wibly wobly
02-13-2017, 07:56 PM
I've spent the evening trying to figure out if this is even possible in LW or not and I'm not really getting anywhere so I'm wondering if anyone might be able to give me a hint. What I need to do is have a bunch of books sitting on top of a rough water plane (that's easy) but on the crest of the waves, I need to have the pages of the books flip. So the effect is instead of foam crashing, it's the pages of books flapping and then settling. I'm not sure how many books are going to be filling this space yet but, I'm picturing probably in the neighborhood of 1 to 2 hundred (maybe more). I figure it's got to be instanced in either some kind of rig or a blended baked animation of some kind. I started trying to make one book act the way I want but I can't even find a way to make the rotation of the book pages count in an additive manner, so that the higher the book is, the faster is spins. Best I've been able to get is having the Y pos linked to it's rotation. Which is pretty useless because it just rotates back and forth as it goes up and down. I'm pretty horrible with node math, so I haven't been able to figure out a way to string the vector nodes together to do act in an additive way, going in one direction.

I'm thinking this might be beyond LW. To me this screams Houdini but, I can't use it for this. Might try creating it in Fusion but, I expect something like this will likely be very slow to work with.

jwiede
02-13-2017, 08:10 PM
I'm not quite sure I understand. Are there actual waves in the water, or are the "waves" just the books' pages rising and falling? Is the water intended to appear as if moving the pages?

This is one of those situations where a small picture might be worth a LOT of words.

jeric_synergy
02-13-2017, 09:00 PM
Blue skying here: Some sort of MDD that is triggered by an altitude parameter? When a given book (item or instance) achieves a trigger height, the MDD is 'fired' and a page flipping animation plays.

Weren't Bryphii's last couple videos about some sort of triggering action?

Prince Charming
02-13-2017, 11:59 PM
Its definitely doable in multiple ways. The best way (IMO) would be to use the old volumetric dp instance plugin (still works great in Windows 2015.3!) with a dpm motion file. That is going to be the only way you can instance with a controllable deformation animation. You can also use mdds with objects, but to do 200 books... they would need to be fairly low res. I do think it could be done with mdds and 200 books, but your system would crawl. If you go the dp instance route you can do thousands of books and it wont slow down when working with it.

The additive trigger is also very doable. If you really want to accomplish all this in LW you need to research...
nearest point node,
point info node,
how to control a directional force per point based on a condition,
how to reference those points by index,
how to use the point and instance indexs to pass values back and forth.

Basically, for every book you have you want to have a layer with the same amount of points as you do instances. Then when your books go above a certain level you can use a directional force to push the corresponding point in a direction. Then you can take that info and use it to control the dpm file for the instances.

So...
1. Place your instances or objects on points with nodes using the point index.
2. Have another layer that has a matching number of points. (they can just be clones along any axis so you can see them in a row).
3. When the points that your instances are placed on go above a certain level use a directional force and hard fx to push the corresponding point in any direction ( I use z).
4. What you now have is a force that will push the corresponding point only when the book point is above a certain level. (The corresponding points will move down the z only when the book points are above a certain level, other wise they will stop moving... aka additive trigger).
5. Then you can use that z info of the points and pass it back to control the dpm file for the instances using the index.
6. You could also do things like the higher to book goes the faster it will turn. (all kinds of stuff like that based on how you set up your force to act on the points).

That being said... This is just the concept behind it. It will take a good amount of nodal set up, and a LOT of knowledge of dponts nodes. It is fairly straight forward, and will work very well for what you are trying to do, but if you have never used these type of work flows it may be difficult to sort out. It wont be any easier in Houdini either...

hypersuperduper
02-14-2017, 12:05 AM
Yeah. He used wind to move a particle to create an additive thing which may be what you need. I think the thread had to do with a "ratchet" animation if you want to search for it. If recollection serves even he was surprised how well it worked.

TheLexx
02-14-2017, 01:24 AM
It's beyond me personally, but there appear to be "page flipping nodes" in this (https://www.youtube.com/watch?v=77tOFmtwFBg)demo.

jeric_synergy
02-14-2017, 01:39 AM
Yeah. He used wind to move a particle to create an additive thing which may be what you need. I think the thread had to do with a "ratchet" animation if you want to search for it. If recollection serves even he was surprised how well it worked.
Nah, that was a different thing. Although the wind deal was incredibly clever.

wibly wobly
02-14-2017, 04:45 AM
@jeric, that's exactly what I'm thinking of doing next. I don't recall seeing any if/then type logic gate math in the node editor under the instancing controls but, there might be a way to do it. I avoided going down that route initially last night because the animation will have to be baked rather then totally independent related to the objects height off the wave. I don't think LW instancing is powerful enough to copy rigs. So unless I physically copy a ton of objects and hope it's manageable, or use baked animation. If I can't find a way, I'll try using baked alembic anim in Fusion. I can save out a luma height map of the water and use that to displace a plane and try going from there.

@jwiede Sorry, I don't have any pictures I can show. I haven't reached a point that shows much atm. Not totally sure I'm doing this show but, there's a short that I'm going to be working on in a couple of months where in one scene there are simulated water waves. Riding on top of the waves are books. Like the books are the water plane. Where the waves crest, instead of white caps / foam, the pages of the books will flip. It's a pretty neat idea and should look pretty good, I just have no idea how to make it work in LW. Were talking procedural animation and that's not exactly one of LWs strong points. Someone else in the studio has started something in Maya but, I don't know how far along they got. I know there's water that's been made. But that's like 2 clicks in that program. Because of the lead in time, I'd try to look into doing this in Houdini, because quite frankly, to me, this shot is screaming for it. Studio makes a lot more then 100k a year, so I can't get the cheapy version for this.

pinkmouse
02-14-2017, 06:00 AM
Do you actually see the water, or just the layer of books on tip?

jeric_synergy
02-14-2017, 09:24 AM
You know, you could HIRE Bryphii to suggest a solution, as a consultant.

wibly wobly
02-14-2017, 02:12 PM
Heh, that's probably not going to happen. It's one shot in a short with no budget. If this was something I was running into often, I'd probably look into hiring out someone to write me something. Hell, I'm probably over thinking how complex it's going to be in the end. I'll get an idea tomorrow when I have a meeting about it. I will post results as they come.

Prince Charming
02-14-2017, 02:49 PM
I'd probably look into hiring out someone to write me something.
You would be wasting your money... tools already exist to do this very well. Would be much cheaper to just hire someone who knows how... unless you like spending money on programmers to create tools that arent needed?:D
I did explain how to do it a few posts up, but sbowie is slow on the draw today.:heart:

jwiede
02-14-2017, 04:13 PM
You would be wasting your money... tools already exist to do this very well. Would be much cheaper to just hire someone who knows how... unless you like spending money on programmers to create tools that arent needed?:D
I did explain how to do it a few posts up, but sbowie is slow on the draw today.:heart:

Yeah, I do believe your approach (dp instance vol plugin/nodally-adjusted .dpm offset) would be the best approach, presuming we're on the same page w.r.t. open books' covers as water plane (not on, _as_), and rising and falling of pages as they turn as the manifestation of waves.

Done that way, you could even using something like HOT or aaocean to generate the "displacement map" for the page heights, separating into a map for the "ocean surface baseline" (low-freq info) and a map to drive the .dpm offset selection (high-freq info).

wibly wobly
02-14-2017, 04:37 PM
@jwiede ya, that's pretty much exactly what I'm going to do. Going to make a simple animated mdd seq tonight of the book flipping. Hopefully, by tonight I'll have something figured out but I need content to test it with first.

@Prince Charming I'll def have a look at your method. Hadn't seen your post until now. The objects are likely to be pretty low rez. I can honestly see them being under 100 ploys with probably just a colour UV map. Having the whole thing automated would be ideal. So if I wanted to change the ocean animation, I wouldn't have to care about what the floating objects are doing.

I honestly don't care how it's made or in what program. I'm not really interested in "my dad can beat up your dad" conversations regarding software. They're all tools, some are better then other for different projects or budgets. For all I know, it may end up being done as a 2D solution or composited in some form to get the right "look". I'd just like to have an idea about how it could be done in LW since that's my primary 3D app in the studio and the 3D route seems to make sense from what I remember when I was first briefed about the project.

jeric_synergy
02-14-2017, 08:03 PM
You would be wasting your money... tools already exist to do this very well. Would be much cheaper to just hire someone who knows how... unless you like spending money on programmers to create tools that arent needed?:D
I did explain how to do it a few posts up, but sbowie is slow on the draw today.:heart:

Just because tools exist doesn't mean one can't hire a consultant to show you HOW to use them. Not insulting wibly here, but you (PC/BP) ARE probably the Node King, and having someone craft and explain a node network to achieve a specific effect is exactly what a consultant does.

++++
::goes back and reads:: See, I have never even HEARD of a "dpm" file (is that DPKit specific?). That's what a consultant would tell me about.

jwiede
02-15-2017, 11:07 AM
See, I have never even HEARD of a "dpm" file (is that DPKit specific?). That's what a consultant would tell me about.

It plays a very similar role for DP's volumetric instancing plugin what an .hdm file does in HDInstance: It's a pre-processed (baked), randomly-accessible animation cache such that instances can randomly choose to start the contained sequence at any point (by instance).

Prince Charming
02-15-2017, 01:24 PM
It plays a very similar role for DP's volumetric instancing plugin what an .hdm file does in HDInstance: It's a pre-processed (baked), randomly-accessible animation cache such that instances can randomly choose to start the contained sequence at any point (by instance).

It is very similar to .hdm, but far superior do to its nodal implementation.
It will allow you to chose the frame/offset/speed of the file nodaly per instance (in this case it would be frame based on z pos of corresponding point).

Wibly wobly...
This can be set up to be mostly non destructive (with the exception of baking out the initial page animation which can be done in a separate scene file so that everything can be changed on the fly without much fuss.
I did play with this idea a bit last night, it is very doable. If you can get away with mdds and objects... I would go that route. It will render faster, and be easier to set up because you will get direct feed back in the view. It really depends on how much you plan on throwing at it.

One thing that changes the set up a bit is whether or not the books themselves move across the surface of the water, or if they stay locked in one position. Both are possible, but the set up is slightly different. One method you can juts lock them directly to points copied from the water mesh, or the other, you can use raycast geo to place them on the water. Deformations in world space could also be used instead of raycast to get the points to follow the same deformations as the water even if you move the points independently.

The other thing you have to consider is the orientation of the books. Do you want them to follow the normals of the water? If so... raycast would be a better option for moving books across the water, or if they are stationary on the water they can be placed on points directly, and you can grab the normal from the nearest point of the water mesh.

Jeric... I do appreciate you trying to get me some 3d work.
That IS why my vids are down... I cant justify giving back to an industry that has given me absolutely nothing. Even though that is what I am doing here ;)

wibly wobly
02-15-2017, 04:45 PM
Seems that I have at least a good month or two to figure out a process for this. So I'm not in a rush. It sounds like they want to go some 3D route with the effect, which was to be expected. You guys have given me a few directions to look into that I hadn't though of before. I was looking at going about a different way but, as the sub to the thread says, working with nodes like this isn't really my strong suit. I'll try and post results as they come.

jeric_synergy
02-15-2017, 05:48 PM
So, what Jwiede and PC/BP seem to be saying is, MDD cannot be fired on an instance-by-instance basis with the native Instancer, but can by DP Instancer, am I getting that right?

Thomas Leitner
02-16-2017, 04:52 AM
So, what Jwiede and PC/BP seem to be saying is, MDD cannot be fired on an instance-by-instance basis with the native Instancer, but can by DP Instancer, am I getting that right?

Hi,
"DP Instancer" cannot use MDDs on an instance-by-instance basis, too.
But "DP Instance" (Denis Pontonniers volumetric instancer) can use DPM (a motion data file format from Denis; like MDD) with indivtual settings per instance. The same is right for HD Instance (with their own motion data file format), another volumetric instancer for LW. But both of them render slower than the nativ instancer.

ciao
Thomas