MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-4  …  1545-1564  1565-1584  1585-1604  1605-1624  1625-1644  1645-1664  1665-1684  …  1845-1859

Thread Split: Some posts in this thread have been moved here

From: James (JFH)
28 Aug 2019   [#1605] In reply to [#1604]
Brian,

I don't see much advantage in making the output label editable, after-all the colours indicate the type of data outputted and the nodes themselves have editable titles which could serve any explanatory role. In instances where the outputs require specific labelling, these should most definitely be retained (& IMHO should remain un-editable)

However, I think the idea would have great merit for inputs.

Often I find myself translating equations so that they have alphabetised variables. It can be a quite counterintuitive process of letter substitution. It would be ideal if the "maths" and "mathsPts" nodes allowed editing of the inputs, like shown:



Also adding new inputs ATM is a 2 step process: first RMB clicking "Inputs" then selecting submenu button denoting next letter. This second step could be removed.

Getting back to "Out" labels. Perhaps we could do an experiment. I could post an alternative nodeEditor folder with all unnecessary labels removed, and those that want to trial it could then report back whether or not they thought the removal of labels had an impact on their user experience.

James
https://www.instagram.com/nodeology/

Image Attachments:
Screen Shot 2019-08-29 at 7.46.gif 


From: James (JFH)
28 Aug 2019   [#1606] In reply to [#1604]
Brian,

Although as I said before, that the colour of the output dot indicates the data type, there are a few nodes with more than 1 output of a particular datatype. These cases may require labelling to distinguish between them, but often, as in the case of your "Centroid" node, an extra object output is the same as the object input. This output is useful because it means that a "Clone" node can be avoided. However if nodes could have multiple Obj outputs (similar to Num & Pt datatypes), these extra outputs would then be superfluous. The node may then be like this:



I'm not suggesting you alter your "Centroid" node, I'm only reinforcing the point that node title itself often has all the descriptive content needed to explain the nature of outputs.

James
https://www.instagram.com/nodeology/

PS Switch node is a beautifully elegant node that demonstrates that the absence of I/O labelling is not necessarily an impediment to comprehension and usage.....quite the opposite!

Image Attachments:
Screen Shot 2019-08-30 at 7.39.20 am.png  _centroid.gif 


From: James (JFH)
24 Sep 2019   [#1607]
Hi All,

It has been a while since I've posted an experiment in NE here,
though I have been regularly posting them to my instagram gallery of node play.

I thought I might post this, (see below) because it was a real labour of love.
It took hours & hours to finally get it to work.

James
https://www.instagram.com/nodeology/

Image Attachments:
STARFISHBALL.jpg 


From: Frenchy Pilou (PILOU)
24 Sep 2019   [#1608] In reply to [#1607]
Cool result!

Was only minutes in TopMod! ;)


From: James (JFH)
24 Sep 2019   [#1609] In reply to [#1608]
Thanks Pilou,

>> only minutes in TopMod. <<

Yes I watched similar youtube video, to work out the procedure to articulate in NE:
https://www.youtube.com/watch?v=8SUjZITJIOw

& although it took a long time to create, once done it is possible to adjust thickness, tapers and
even move the 5 way connectors to the interior, so that 3 way junctions are on the exterior.
Unlimited variation: as is the nature of parametric design.

Thanks again,
James
https://www.instagram.com/nodeology/
From: Frenchy Pilou (PILOU)
24 Sep 2019   [#1610] In reply to [#1609]
Yes i just seen something about real spiraling Shells : it uses only Scale, Rotation, Twist! :)


From: Ken (OKURO)
24 Sep 2019   [#1611] In reply to [#1610]
Math + Nature: what a fantastic source of inspiration !
Big thanks for this info !
regards
O.
From: Frenchy Pilou (PILOU)
6 Oct 2019   [#1612]
Does it possible to have some nodes by default on the screen at start of Elephant like the Output ?
From: bemfarmer
6 Oct 2019   [#1613] In reply to [#1612]
For function loadDefaultNodes(), see lines 21 through 26 of the file init.js, located in core subdirectory of nodeeditor.

function loadDefaultNodes()
{
var node_output = LiteGraph.createNode("Basic/Output");
node_output.pos = [800,100];
graph.add(node_output);
}

- Brian
From: Frenchy Pilou (PILOU)
6 Oct 2019   [#1614] In reply to [#1613]
Many thanks!
Cool : works like a charm! Will added in few times http://moiscript.weebly.com/node.html#addanodeselected

function loadDefaultNodes()
{
var node_output = LiteGraph.createNode("Basic/Output");
node_output.pos = [800,100];
graph.add(node_output);
var node_selected = LiteGraph.createNode("Objects/Selected");
node_selected.pos = [400,100];
graph.add(node_selected);
}


From: Frenchy Pilou (PILOU)
6 Oct 2019   [#1615]
Ok i haved finished the Section Not Native Construct2 all English ;) Next will be Curve2
http://moiscript.weebly.com/construct2.html

...except these 2 little things where i am sucked! :(

if you have some ideas ?


From: James (JFH)
19 Oct 2019   [#1616]
Hi All,

I am getting an error message when using curveLength node. (see below)

code:
TypeError: undefined is not an object (evaluating 'this.outputs[1].label = len[0].toFixed(2)')

moi://appdata/nodeeditor/nodes/extensions/infonodes.js   line 74

70:               out.addObject(inObj.item(i).clone());
71:               } 
72:             }
73:             this.setOutputData(0, out);
74: >>          if(len.length>0) this.outputs[1].label = len[0].toFixed(2);
75:             this.setOutputData(1, len);
76:         }
77:         crv_length.prototype.onPropertyChange = function ()
78:         {


I have attached a simple .nod file. Can someone please run it to see if problem is universal or specific to my setup. I have already tried reloading both my v4beta & nodeEditor folder without fixing this issue.

I would greatly appreciate any assistance
Have a great weekend
James
https://www.instagram.com/nodeology/

Attachments:
crvLenTest.nod


From: Frenchy Pilou (PILOU)
19 Oct 2019   [#1617]
You ask a curve's length of a Point ?


From: bemfarmer
19 Oct 2019   [#1618] In reply to [#1616]
Hi James,
How did you get a gold output to connect to a green input?
Once detached, I cannot get this incorrect connection to reconnect.

The green output hooked to the green input shows the length as 57.38.

Gold output to an Output node draws the curve.
Its MoI length with unwrap curve script is 57.3800598.

- Brian
From: James (JFH)
19 Oct 2019   [#1619] In reply to [#1618]
Thanks Brian & Pilou,

Is is apparent now that my fiddling with the code is the issue.
I will overwrite with original code.

Thanks again
James
From: Michael Gibson
19 Oct 2019   [#1620] In reply to [#1619]
Hi James, also the new v4 beta has the arrowheads that rotate towards the viewer that you were asking about a while ago for showing directions.

They can be created like this:

code:
	var startpt = moi.vectorMath.createPoint(5,5,5);
	var endpt = moi.vectorMath.createPoint(10,10,10);
	var f = moi.command.createFactory( 'arrow3d' );
	f.setInput( 0, startpt );
	f.setInput( 1, endpt );
	var arrow = f.calculate().item(0);
	moi.geometryDatabase.addObject( arrow );
	f.cancel();


That creates a Leader with its plane perpendicular to the arrow direction and sets the .rotateArrowheadPlaneTowardsViewer property on it.

- Michael
From: wayne hill (WAYNEHILL5202)
20 Oct 2019   [#1621] In reply to [#1619]
@James,

Create a test directory for the Node Editor and call it with a shortcut. This way you keep the original directory and have a test area for playing with nodes.

moi.ui.createDialog( 'moi://appdata/nodeeditortest/index.html?scheme=Light', 'resizeable,defaultWidth:1000,defaultHeight:1000', moi.ui.mainWindow );

The original and test area node editor use the same MOI instance so the nodes are viewable in both the original and test area editors.

You can cut and paste nodes between the node editors and run them separately. How cool is that?

Wayne
From: James (JFH)
20 Oct 2019   [#1622] In reply to [#1620]
Michael

Yes, thank you for the code to address new arrowheads. This will be a real boon for future development of vector nodes.



Wayne

Thanks for the tip of parallel NE for testing coding. This is indeed a "cool" technique.



Thanks again,
James
https://www.instagram.com/nodeology/
From: bemfarmer
22 Oct 2019   [#1623]
Question about writing a new node.

The scripts in MoI often have Functions{} in their code.

The node programs do not seem to use such Functions{} very much.
Instead they use ...prototype...function().
So to use a function from a script, in a node, should they be written as ...prototype...function()?

Or,
I see that in the Lib folder under nodeeditor\nodes\extensions, there is a file called basicFunctions.js,
which is full of miscellaneous functions.

So when writing a node which uses a MoI script with functions, can or should I put the needed functions in a new lib file called, for example, basicFunctions2.js?

- Brian

It seems that the functions in basicFunctions.js can be (re-)used in any new node?
From: Karsten (KMRQUS)
22 Oct 2019   [#1624] In reply to [#1623]
Hello, Brian,

the prototype function gives the objects created by using the nodeeditor a uniform interface for the processing. Same method names for the various
Knots. So every code of the node creates a type. Later by using the node editor you create objects of these types with a uniform interface of functions.
You can of course use the functions in basicFunctions.js and also create a basicFunctions2.js. You can also write your functions to the same file as your nodes.
For more frequently used functions, it makes sense to store them in a library.

Have a nice day
Karsten

Show messages:  1-4  …  1545-1564  1565-1584  1585-1604  1605-1624  1625-1644  1645-1664  1665-1684  …  1845-1859