View Full Version : Finding Item ID in Displacement Node Editor

11-10-2014, 10:24 AM
Got a list of items with MDDs applied. I want them offset in time so thought that adding MDD Pointer would be a good way to go using each Items ID to offset the Speed, multiplied by a null value so I can speed up/down with time.

Works well with Scalars but finding a Node that outputs the Item ID is proving harder than I thought. I've tried DPs Item Info/Item ID and TrueArts but nothing seems to return the correct value. The best I've found to work is db&w's Extended Spot Info using Object Number.

If I open the Classic SE, I'm right in thinking the item ID should be as listed there - with the top object having an item ID of 0, 2nd object having an Item ID of 1......

Are Item IDs returned in the displacement editor? I'm probably using it wrong! What's a good node to use?

11-10-2014, 10:40 AM
See other thread screen-shot - Extended Spot Info on the left..

It's raw LWItemID as is returned by LWSDK. So for objects it's starting at 0x10000000 (decimal 268435456)

The first part of it: 0x1
is type of item, 1 is object, 2 light, 4 bone, 3 camera.

DB&W Object Number is probably LWItemID with cleared type. itemid & 0xFFFFFFF (binary and operator)

11-10-2014, 10:52 AM
Thanks Sensei. Ah - excellent - so it's a two step operation that I was missing - Extended Spot Info/Item into Extended Item Info. Lovely!

Still got to copy/paste Displacements to 60 objects - bloody 'ell, LW desperately needs some batch capability. Got another 60 objects using Silhouette/Unshared Edges with nodes - no easy way to copy paste those buggers :(

11-10-2014, 10:59 AM
If it would be just motion editor, you could make one null, edit nodes, clone it as many time as you need, and assign each object to its null could be automatic.

But there is no way to make it automatic ATM.
I asked for it many years ago.
Currently when user didn't click "Edit Nodes" NodeEditorID returned is always NULL, so there is no way to copy/load something to it using plugin.
And there is no way to make NodeEditorID in such places in LWSDK.

Got another 60 objects using Silhouette/Unshared Edges

They can be automatically set by plugin.

11-10-2014, 11:14 AM
Make sure you watched the latest video tutorial

11-10-2014, 02:59 PM
They can be automatically set by plugin.

What do you mean here, Sensei.

That vid you posted will be super useful in the future!

11-10-2014, 03:22 PM
What do you mean here, Sensei.

Silhouette/Unshared Edges options can be set by 3rd party plugin, so it's possible to write plugin which would do it for multiple selected items.
Everything except copying and pasting Edge's Node Editor.

11-10-2014, 06:00 PM
We have a tool that allows us to apply MDD-Displacement nodes en masse using namematching (it parses the LW-scenefile from within LW). We also have another tool that allows us to apply MDD Pointer (DPont MDD reader) en masse (again, parsing done from withing LW). Not sure if I am allowed to share those two scripts though. I'll have to check that.

11-12-2014, 08:38 AM
Hi Cageman - sounds v interesting!

11-14-2014, 07:06 AM
This was my solution, for those interested.

Item Info is pointing the the Y of a node and multiplied with the Item ID to get an offset.
In the Classic Scene Editor, objects are dragged into the desired order to be replayed.
MDD Pointer also allows me to reposition my objects, so I used the built in Distribute script to offset my objects in 3d space - when using Distribute, remember to select your item one at a time in the order you want them distributed in the Classic Scene Editor.

Think that's it. Down side - no way to batch/copy/paste Displacement Nodes, you have to open each node and connect the Displacement input manually so check your setup is working on a few items first before going through the mind numbing tedium of adding to each object - hope you're listening LW3dG!!