Thread: Is this possible with DPont's part/poly move node?

1. Is this possible with DPont's part/poly move node?

Greetings node gurus

I got a bit of a dilemma of whether or not I should do this the long way - a painstaking move on about 400+ buildings one by one to a correct height, or if I should even attempt to do this some other way.

Basically I have all these buildings that were constructed externally, to their correct respective footprints but for some reason they are all over the place in terms of their respective heights.

I managed to obtain some aerial survey data (ladar scan of non ground as well as ground points ) which I brought into LW & triangulated, & from that one can pluck out quite easily a point/poly on the roof's surface of the buildings in question & then raise their respective externally constructed counterpart to the correct height. Ok for 1-50 of those, but I'm a slacker & want to automate as much of this as possible.

I can kind of get close to achieving this by using KO-Pointfit & the zoom-polygon option but that also involves a bit more manual labour that I'm willing to sacrifice at this stage so I'm here seeing if anyone has done something similar or if this is even remotely possible with DPont's part/poly move node.

One thing I can think of is that one can rig a surface node to shoot a ray and evaluate the distance between two surfaces .... refer to 1st pic below, and I'm wondering if that discrete distance could somehow be translated and plugged into a part/poly move node in order to accomplish something like the animated gif below?

Any help / ideas would be greatly appreciated. In the meantime I'll continue to tinker away. Cheers a bunch

2. Not nodal, but what will (should) work is the following: place your buildings object above the ground object. Apply HardFX, give it some Y-gravity, and check "StopByEvent". Add 'collision' to the ground object (set mode to "Event"). The parts (buildings) should stop on collision with the ground.

I fiddled around with 'Part Move' but couldn't find a working nodal setup for this situation. What you want more or less is this (I think): the Y-position of the part (building) should be equal to the Y-position of the spot/point/poly(?) of the ground object at the X/Z coordinates of the part. Perhaps somebody can still come up with a nodal solution for this, I'd be very interested.

3. Cheers serge
I'll give HardFX a go and report back on progress.

I twiddled a bit with part_move as well but could not get to what I was after.

4. ... unfortunately HardFX doesn't quite cut the mustard in this case as the moved polys don't quite stick perfectly to the background collision ones (see pic). Not in a consistent way that I could figure out anyway which is a pain.
It's most likely to do with their respective size & I can't for the life of me figure out how to control for that.

Damn shame cause apart from that it seems to work fairly well.

5. Bummer. Yeah, HardFX isn't exactly 100% reliable.

Something else that should work better. Are you familiar with Hardlink? You could grab the polys from the floors from the buildings, morph them to the position of the ground object for example by using Background Conform, and then Hardlink the buildings to these polys.

If you don't know what the heck I'm talking about I'll give a step by step explanation tomorrow, as I need to get some sleep now .

6. I'll give it a shot serge
I got a general gist of what's happening there so I should be right figuring it out. If not I'll give you a holler thanks a lot for your help & suggestions.

Just wish I could understand nodes a bit better so I could at least know if it's possible/doable or not.

7. I found a nodal way after all. The parts will be moved with Dpont's Part Move based on the Y-value of the nearest ground point (with Dpont's "Nearest Point" node).
I thought of this before, but dismissed the idea because it would only work well on a near flat ground. The reason is that the nearest ground point to a part could very well be on a hill next to the part instead of a point straight down. But, since you've come very close with HardFX this should work. You save the transformed buildings object after the HardFX simulation, and then reload it with this nodal setup (see attachment).

Setup explanation:

> The 'Distance' node measures the Y-distance between the part (Part Info) and its nearest point (Dpont's Nearest Point node).

> The 'Vector Scalar' nodes and 'Make Vector' nodes in between are necessary to extract the Y-value of the coordinates. The Vector Scalar 'Mode' needs to be set to "Y channel". (If the Part Info and Nearest Point nodes would have had a Y-output they could be directly plugged into the Distance node.)

> The measured Y-distance is turned into a vector (Make Vector node) to move the parts (Part Move node).

> It's very well possible that after the HardFX simulation some parts are above and some below the ground plane. Since the measured Y-distance is a positive value, the above setup only works for parts that are lower than the groundplane since they need to be moved up. The parts that are above the ground need to be moved in negative Y-direction, and for that I used the 'Logic' and 'Multiply' nodes. The Logic node says: "A is greater than B, if True: -1.0, if False: 1.0. If you multiply this with the measured Y-distance the parts higher than the ground will be moved in negative Y-direction.

Hope this makes sense. It's really fun to experiment with nodes (that is if you don't have a close deadline).

8. That's really great serge and thanks a heap for the explanations. Believe me I need them

Can't wait to try it as I started moving them by hand (only did about 40 of them ) before going a bit nuts

The deadline is somewhat extended so might still squeeze all that nodal goodness in. Thanks a bunch mate, I owe you one.

... I owe you one...
"Someday, and that day may never come, I will call upon you to do a service for me. But until that day, accept this as a gift..."

No problem. It was a good exercise for me.

10. Forgot to add: in the Part Move node, "Pivot" needs to be set to "Down", so the bottom (instead of the default "center") of the part will be aligned to the ground object.

11. You saying you want to be the Godfather of my kids serge

Sorry for the late testing of this, which works like a charm btw, but I've been away from the office for 3 days. Once again thanks for the explanations, they saved the day. I'll post up a pic as soon as I'm done with the sucker.

I've needed something like this, which works across parts rather than points (where KO_Pointfit works most of the time), for so long that now I'm kicking myself for not posting it sooner.

I remember posting a request at the now extinct LW-developers/plugin forum (don't remember it's name) about creating something like this before DP Kit made it onto the scene. Amazing what's possible with nodes.

Originally Posted by serge
"Someday, and that day may never come, I will call upon you to do a service for me. But until that day, accept this as a gift..."

No problem. It was a good exercise for me.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•