Collecting an Array of Xforms using 3dXformByTime

 
 
 
Posted by:hotknife
Data created:18 December 2013

Overall aim - taking the spline creation tutorial a little further and producing a trail behind or in front of a Node.

As the title suggests. I'm struggling to collect an array of XformsByTime.

In the attached file I'm following a sphere by 'manually' offsetting the Eval input.

What I want to do is allow the user to extend the length of this spline by Dynamically increasing the amount of lengths/samples in the Spline. So collect a variable array of Node positions over time.

I expected to be able to pass the Eval input a Series array node and generate the Xforms that way - this seems to work - I extract the Translates/Positions and send that to the PolySplineMesh, which all evaluates correctly but Bugs Max out.

To see the difference connect the stray Output of the attached file to the "Extract translation" input.

So in short "how can you collect an array of Node positions over time and send that to the Polyline. It all works as expected until I try to do it as an Array.

 


Attached Files:

>followB.max (282624 bytes),

Andrew, thank you for the original usage example.

First of all, your scene exposed a bug - when a component input port gets removed and the scene is saved, it won't load. I had to fix the bug to be able to load your scene. So we'll have to release a new build.

The problem turned out to be caused by the multi-threaded evaluation of arrays in Lab. The Xform gets evaluated in parallel, which Max doesn't support. This is a special case that we'll have to figure out a proper solution for.

To make your example work before we come up with a fix, open a MaxScript listener and enter the following line:

(dotNetClass "Ephere.Modeling.Dependency.Library").IsSingleThreaded = true

This will disable *all* multi-threaded evaluations in Lab, so you may want to return it back to false if you move on to other stuff (that is, unless you restart Max, when it will be re-initialized from the number of CPUs on your machine).

BTW, you also need to fix the number of vertex indices of your polyline to match the number of vertices (10 instead of 3). This brings up the idea about a PolylineMesh3 constructor that takes just a list of vertices and creates a single polyline out of them, in the order they come.

 

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Hi and thanks for the reply - glad it's a bug and not my logic - shall try the fix when I get time.

 

 ...polyline to match the number of vertices (10 instead of 3)

I had the number of Verts linked to a length input originally - that also linked to the polyline - s0 the user could grow the length of line.

Stripped it out to 'bug hunt' though - while I have your attention though -- 

What doos the Input Range and Output Range of the XformTime do ? 

Is there somewhere to readup/reference what these and other items do ?

Finally - I've installed the plugin on my Home Laptop as that's where I get most of my spare time to learn as opposed to work - is there anyway to transport the license ? 

Other than that hope you and your team have a great Xmas.

The time function nodes currently implement our generic interface Ephere.Math.IFunction<TInputType, TOutputType> which offers these read-only properties. They are not used for now.

In general, you should get tooltips when hovering the mouse over nodes or their ports. These tooltips show the name and type of the node or port, along with its built-in documentation (as generated by comments in the C# code). If you are not seeing these, there is some problem. However, the time function nodes are an exception, their documentation is not shown in the tooltips. We plan to change their implementation and will take these issues into account.

As for discovering all the tools that are available in the Ephere libraries - what we provide currently is the Library panel on the left of the Lab editor, and the ability to  search metanodes by name when you right-click on an empty space in the graph view. We are going to improve this, both by writing more documentation and adding better ways to find it. In general, the libraries are .NET assemblies and any tools that work on these can be used. For example, a .NET assembly can be opened in the Object Browser in Visual Studio (Express), and the names of classes and methods can be searched for.

About transfering the license - I'm not sure, Marsel will have to answer that.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

hotknife wrote:

Finally - I've installed the plugin on my Home Laptop as that's where I get most of my spare time to learn as opposed to work - is there anyway to transport the license ?

Yes, you will need to release the hardware lock for your license. Please email me at marsel.khadiyev (at) ephere.com and I'll send you the link to do that.

Happy holidays to you.

Marsel Khadiyev (Software Developer, EPHERE Inc.)