PDA

View Full Version : PolyMove Node for rough crowds perhaps ?



adk
08-28-2008, 09:53 PM
as in Aussie rules mobs :D:D:D

G'day folks ...

I'm pretty much a node virgin but thought some here might be interested in this and take it a little further perhaps. It's come about with me messing about with HD instance and trying to get a little variety in the movement of the polys where HD instances are placed. All movement / rotations of the polys are based on greyscale images images (applied to the ground for visual reference). There are only 2 objects in this scene ... 1 poly for ground and 1 layer with the red walkers that do their thing.

All thanks to Denis P. for the PolyMove node :thumbsup: plus all the others I use ... we owe you big time. Oh and lets not forget Antti of course ;)

PS: Will upload the scene for anyone who's interested as soon as I can...

adk
08-28-2008, 09:54 PM
...more

adk
08-28-2008, 09:56 PM
...more still

adk
08-28-2008, 09:57 PM
...last one

JMCarrigan
08-28-2008, 10:24 PM
Hmmmm. Very interesting!

adk
08-29-2008, 02:38 AM
Here's the scene folks ...

What I'd like to figure out / play with is how to clamp limit rotations + get something that resembles obstacle avoidance. They "kind" of do it now but in a very rough and unpredictable way ... All I know is I'm way to old to be resurrecting my engineering degree maths ... I think it's actually permeated out of my head to be honest. I'm sure someone out there can do this more justice then I can at this stage. I have a feeling this can be pushed to do quite a bit more but I'm not really in the best place to know if that's possible or not ?

PS: Apologies as some of those MOV's don't scale to well .. if the walkers don't appear to be doing anything it's cause they are rotating :)

erikals
12-31-2008, 05:15 AM
interesting,.. :)
can be combined with this one :)

http://www.newtek.com/forums/showthread.php?t=86338&page=7

erikals
12-31-2008, 05:25 AM
can be combined with MarkerPen also,... :)
http://www.newtek.com/forums/showthread.php?p=801096#post801096

adk
01-05-2009, 12:36 AM
If you mean combined with HDI erikals that's exactly what I was wanting it for. A few random variations to the speed / heading of the walking clones.
Was just trying a few creative ways of animating people walking down streets / paths and around corners etc. without too much hand animating.

As for this working with marker pen... am yet to give that a go :) but thanks for the heads up. :thumbsup:



interesting,.. :)
can be combined with this one :)

http://www.newtek.com/forums/showthread.php?t=86338&page=7

erikals
01-30-2010, 05:02 AM
bumpedi bump...

i wonder, could this be use to make e.g. ants crawl around the backside of a tree and the branches as well?

adk
01-31-2010, 07:57 PM
Heya erikals,

Actually, something that I posted here that serge solved ...

http://www.newtek.com/forums/showthread.php?t=105308

... gave me the idea that perhaps this could work in other situations. So I just gave it a quick go and it seems to work ok (needs further work I reckon).

Again this is just two layers, trunk & ants and I wanted the ants to "stick" to the trunk as they move up. I roughly animated the ring of ants (ANTS_01.mov) then applied serge's idea (but across 2 axes) - which kind of creates a hybrid "sticky" I guess. Result is ANTS_02.mov.

Not sure how much further you can tweak it (there's places where they don't stick 100% as you'd expect ) or layer this with my image idea above in order to produce what you need. Here's the scene anyway and see if it helps & how you go :thumbsup:

Cheers .... adk

erikals
02-02-2010, 04:52 AM
thank you for the videos and files. http://erikalstad.com/backup/anims.php_files/smile.gif

i did some testing, but couldn't get the results i was aiming for.
one of the problems is that it doesn't seem to stick properly..

the more i though about the challenge, the more i got to the conclusion that dynamics were the way to go. however, even with dynamics ants crawling on a tree, spitting in groups onto different branches seems like a tough task.

i almost had a solution, but i hit a wall when trying to think of a solution to track pixels in 3D.

is there any way to morph baked particles?

dpont
02-02-2010, 07:53 AM
...is there any way to morph baked particles?

1-Morphs & Endomorphs are point vertex maps, so you need points.
2-Particles are not points, no geometry.
3-Transformed Particles in Partigons, are points but cloned on
the fly, so in Modeler a Partigon object has geometry but only
one point.
4-Particle Scan is a way to baked calculated dynamic particle
in a MDD file, it create also the cloud of point as a separate
LWO file, but don't ask me how you could set the transition
between a MDD node and a Morph node...
http://pagesperso-orange.fr/dpont/plugins/MDD_Pointer.html#Particle_Scan


Denis.

Edit: You would need also a different way to link objects
to points instead of particles...

erikals
02-02-2010, 08:26 AM
yes, it sounds tricky, this was the idea,...

http://www.newtek.com/forums/attachment.php?attachmentid=81717&d=1265111404
http://www.newtek.com/forums/showthread.php?p=981282#post981282

serge
02-02-2010, 09:23 AM
Denis,

Quick question. We don't have an option now to get 'spot info' from another object. For example, could there be a possibility to open the node editor for object#1, and have 'spot info' from object#2. This way we could measure for example the distance between object#1 and the nearest spot of object #2. Does this make sense?

erikals
02-02-2010, 03:10 PM
allright, i'll have to try this later on... heh, weird theory... http://erikalstad.com/backup/anims.php_files/chicken.gif

adk
02-02-2010, 04:42 PM
Denis,

Quick question. We don't have an option now to get 'spot info' from another object. For example, could there be a possibility to open the node editor for object#1, and have 'spot info' from object#2. This way we could measure for example the distance between object#1 and the nearest spot of object #2. Does this make sense?

Yeah that would be very handy (as per that surface difference analysis slide in my very first post in that other thread) as it might possibly produce better results than doing it via the nearest point node. I just ran another quick test & yeah there are issues with trying to make objects stick in this way & I did notice that in the above example they do not stick 100%. Shame cause it comes very close.

Not sure what the issue is but I noticed that if I use the pivot up option in the part move node the tops of these pegs stick quite well to the surface of the terrain but if I use the pivot down option there's a discrepancy on the pegs that need to displace the most (in the ridges). Which probably means (to my simple brain) that the vector evaluation between the bottoms of those pegs & nearest points on the terrain are giving those results. That's where surface distance would theoretically help perhaps.

...hope that makes sense.

dpont
02-03-2010, 01:21 AM
Not sure to understand what you mean with the
spot info of another object, Spot infos are a part
of the Nodal System structure delivered by LW
while previewing or rendering, shortly the infos
of the spot hit by a ray.

As I know "not 100% sticking" to a position
is a preview problem, not solved yet.

Denis.

serge
02-03-2010, 09:30 AM
Not sure to understand what you mean...
Yes, I was afraid I wouldn't make sense :). As you said, "spot info" as we know it has a relation with raytracing. This is not the kind of spot info that I mean.

I'll explain better. See image. Could there be a way to calculate this distance in the "Displacement node editor"? It's the distance between the surface of the ball and the nearest 'spot' on the surface of the other object.

I was thinking our dynamics engines have some way to calculate this (collision detection), so shouldn't there be a way to code this for the Displacement node editor with the SDK?

dpont
02-03-2010, 09:57 AM
In the SDK, no,
There's one in Boolean node but limited
to the bounding box of the target object,
in the direction of the point normal.
A collision detection has a cost, that's
why it need often to be calculated before
preview.

Denis.

serge
02-03-2010, 10:29 AM
...A collision detection has a cost, that's
why it need often to be calculated before
preview.
Would it be possible to implement a dynamics engine inside the Displacement node editor? Just a very simple engine which calculates the distance between surfaces; no forces or anything. I understand it would be slow, but is it possible?

erikals
02-03-2010, 10:55 AM
would that be needed though?
couldn't some kind of AO algorithm be used instead?
cool, but sounds like a though task...

dpont
02-03-2010, 01:50 PM
Added a Ray Intersect node in the x32 version of DPKit
this tool returns the distance to the point of a given object,
if it is cast by the ray, works in the Surface, Displacement
and Item Motion node editors.

Denis.

adk
02-03-2010, 03:48 PM
Added a Ray Intersect node in the x32 version of DPKit
this tool returns the distance to the point of a given object,
if it is cast by the ray, works in the Surface, Displacement
and Item Motion node editors.

Denis.

Thank you a bunch Denis :thumbsup: I'm off to test this new addition

serge
02-03-2010, 06:40 PM
Denis, fantastic! Thank you so much for working on this.

Question: I did some quick tests. What should happen when you don't specify a direction? It seems that it casts a ray in a random direction, is this correct? (I've used displacement node editor) And is there a way to get the distance to "nearest surface spot" as I mentioned earlier? I'll continue experimenting tomorrow and see what is possible with this node. :)

@ adk:
This node setup (see image) would work well with your buildings project (http://www.newtek.com/forums/showthread.php?t=105308).
> Make Vector is set to Y = -1. When you plug this in the direction of "Ray Intersect" the ray will be cast from the object (which is above the ground) in negative Y direction (towards the ground).
> Ray Intersect target = ground object.
> Multiply = -1, into Make vector Y, so that the part (object) will be moved in negative Y direction.

adk
02-03-2010, 06:51 PM
... thank you Denis, this is fricken awesome !

& thanks a million for your help serge :thumbsup: you beat me to the testing. Here's a quick test I just ran off. They stick perfectly & I'm rapped. Now to something more complex :D


... more testing, this time with your setup serge & bigger horde :) all pegs/buildings/walkers are at different heights in 1 layer ( in the beginning & ending frames they are not over the terrain so you can see how spread out they are) .... & presto !

This is a seriously wicked addition.

adk
02-03-2010, 11:38 PM
... here's top view with a bit of obstacle avoidance action :) cyan ovals are actual geometry that the orange squares are "loosely" avoiding. As with most things I post of late :D it doesn't work 100% & could definitely do with some love from someone with more math / node skills than I possess.

It's a looping mov & looks better backwards.

I'm sure someone will be able to get this to go much further & beyond my crappy attempt.

erikals
02-04-2010, 01:18 AM
Awesome! http://erikalstad.com/backup/anims.php_files/035.gif
DPont is becoming a rock star... http://erikalstad.com/backup/anims.php_files/smile.gif

adk, looks great, does it look/animate the same when rendered?
and how many boxes can you push it to use before the computer jams...
2000? 200000?

adk
02-04-2010, 05:11 PM
erikals ... yep renders same as it looks/animates. I've got an old box here (6-7 year old battleaxe) and tried this with about 2500 of those boxes. It's pretty damn slow calculating the displacements (takes about a second between frames), but when you consider what it's doing, as in all the boxes are at random y positions (shows in the last few frames) & it sticks them perfectly to the terrain as separate parts without the need to generate greyscale displacement maps, I think it's pretty stellar :)

The obstacle avoidance tests are promising altho as I said, the math + nodes are a little beyond me at this stage & not working 100%. But I figure if I can come close someone else will definitely be able to get it closer, if not 100% spot on.

Also, I'm not sure if this is a stupid question & if at all possible, but do we need more logic / specific nodes in order to be able create something akin to steering / AI behaviour ? Or is most of it there & just needs the right wiring?

UnCommonGrafx
02-04-2010, 06:04 PM
This has been a great thread to lurk on.
http://www.newtek.com/forums/showthread.php?t=106021&highlight=lights
Check out that thread and the tute splinegod mentions for some ideas in using the nodes.

Thanks for sharing.

adk
02-04-2010, 08:39 PM
cheers UnCommonGrafx. I've watched most of bryphi's nodal tutes (I think) & they are very informative. Learned a few cool things there.

Here's another little test ... back to those pesky ants crawling up a trunk mesh. There are obvious issues when trying to wrap the ring of ants around the trunk but I reckon if you selectively split the ants into a few layers that are better handled by the way the rays intersections are calculated (atm it's just shooting rays in the +/- x/z directions) you might get them to stick 100%. Or there might be a much better way to calculate that distance that I'm aware of.

...animated gif shows how the ant ring gets displaced a quadrant at a time, and how a few get left behind or displaced incorrectly.