PDA

View Full Version : >>POLYGONS<< targeting an object? DPKit? A puzzle



jeric_synergy
06-23-2012, 02:40 PM
In this thread:
http://forums.newtek.com/showthread.php?p=1252252#post1252252

The OP decided to use billboards to depict a complex object (smart move). It's desirable in such situations to have the billboards target the camera so as to always remain perpendicular to the camera's view.

While one COULD implement the billboards as multiple separate objects and simply have them use Heading Rotation Controller set to POINT AT TARGET, this clutters up the LWS and Layout something terrible (we're talking like a 1000 objects here), and brings in the bother of cloning and distributing.

IMO it would be better/simpler to build the billboards as integral parts of the model, i.e individual polygons. This would require a method that would allow a polygon (or better, a polygon group) to be displaced such that the polygon (or group) pointed at the target, the camera in this case, but only in the Heading channel.

(This would seem to be a useful network to pick apart to get units like "group of nodes that point at things")


Is DPKit capable of such a task?

One polygon should be relatively straightforward, but what about a group of polys? If the billboard must have more than one quad, how would one group them?

stiff paper
06-23-2012, 02:55 PM
This might work:

http://www.lwplugindb.com/Plugin.aspx?id=41f3c539

dpont
06-23-2012, 03:15 PM
With the Align To node, given a direction (from ..to inputs)
you get a rotation vector or separate Heading and Pitch angles,

using the Part Move node,
the Part Info give the 'from' or source position of each part
and an Item Info node the 'to' or target position.

Like every other kind of direction converted
in Heading/Pitch rotation, the parts should be oriented
toward the Z+ axis in Modeler.

Denis.

jeric_synergy
06-23-2012, 03:22 PM
With the Align To node, given a direction (from ..to inputs)
you get a rotation vector or separate Heading and Pitch angles,

using the Part Move node,
the Part Info give the 'from' or source position of each part
and an Item Info node the 'to' or target position.

Like every other kind of direction converted
in Heading/Pitch rotation, the parts should be oriented
toward the Z+ axis in Modeler.

Denis.
And one would designate the polys with a weight map, I suppose? (Could it be done via a Surface?)

Thanks to all!

SplineGod
06-23-2012, 07:42 PM
If the polys were in the same layer Ie theyre part of the same object you an make each face point at a target.

jeric_synergy
06-23-2012, 07:54 PM
If the polys were in the same layer Ie theyre part of the same object you an make each face point at a target.
Via the method Denis outlines above?

I'm going to try and wrap my head around this one, but right now heading out to a party. I know that designating which poly will be my sticking point, since the displacement should happen around the center (centroid?) of the polygon. And this would be enhanced in any flat group of polys could be addressed the same way, with the entire group rotating as one piece.

SplineGod
06-23-2012, 11:17 PM
I forget the exact name of the node without looking it up but it works on polys in the same object.

dpont
06-23-2012, 11:58 PM
And one would designate the polys with a weight map, I suppose? (Could it be done via a Surface?)...

No need weight map in my setup,
the Part Info node is synchronized with the Part Move node
until they belong to the same nodal chain,
so the correct part position is input in the Align To node
and you directly connect the rotation in Part Move
or rebuild a vector with just Heading if you want.

In the surface node editor you can't retrieve
the Part Info generated from displacement,
for setting surfaces per part,
I would use the index output of the Part Move
without any input, exactly like an ObjectID.

Denis.

jeric_synergy
06-24-2012, 03:04 AM
But, I'd only want a very few parts in the entire model (a ballroom) to be affected.

Wouldn't the described setup affect all the parts??

dpont
06-24-2012, 03:51 AM
But, I'd only want a very few parts in the entire model (a ballroom) to be affected.

Wouldn't the described setup affect all the parts??

Of course, Part Move is for moving, for a fixed part
you need weighting or filtering the part index if you know it.

Denis.