Node Wish List
 1-7  …  248-267  268-287  288-307  308-327  328-347  …  408-425

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.288 
You have an another cellular Automate with a very simple rule!
Turmites : If it's Black turn on the right!
if it's white turn on the left!
Amazing that after some repetition a striah line apaers from the chaos! :)

Maybe with Moi adtapt it in 3D...



And the top of the must free prog about all the 2D Cellular Automates Golly
http://golly.sourceforge.net

Here with the game of life rules!

EDITED: 26 Mar 2022 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.289 
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.290 
Lsystem New Node!

https://en.wikipedia.org/wiki/L-system

The dropdown menu has several demo patterns.

Select 'Custom' menu to make your own custom pattern based on the previous selection.

Start with a low iteration number when making a custom demo. The calculations can easily overwhelm
the MOI graphic processor.

Thank you to James for the testing and recommendations.

Wayne


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.291 In reply to 9581.290 
The famous Penrose tilling! The double flying kite! :)

EDITED: 1 Apr 2022 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.292 
PS There is no .nod file for the Lsystem ? Only a js file ?

Edit : ok Found! :) Just put the JS file inside the folder (for PC) ...\Moi\nodeeditor\nodes\extensions\lsystem.js
Will be in the Node / Objects2 if i am right...
Insert 3 nodes "sliders" a an "OutPut" et voilĂ !

And so the .nod! ;) https://moiscript.weebly.com/uploads/3/9/3/8/3938813/lsystem_pil.nod
and the site ;) https://moiscript.weebly.com/objects2.html#lsystem

Absolutly terrific! Bravo! Another infinite toy!





EDITED: 3 Apr 2022 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  coi (MARCO)
9581.293 
quote:
Lsystem New Node!

eureka, i was asking for something like this 9 years ago

https://moi3d.com/forum/index.php?webtag=MOI&msg=6148.17

tnx
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.294 
Marco / Pilou ,

Very happy you like it.

Wayne
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.295 In reply to 9581.294 
Used for my hundred of the day! ;) https://imgbox.com/g/tSQCUyur6z







  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.296 
A modification to the Node Editor to allow multiple object connections.

It is as simple as commenting out one line on the 'main.js' program.

code:
// >>>  if ( this.outputs[slot].type === "objectlist" ) this.disconnectOutput(slot);


code:
LGraphNode.prototype.connect = function (slot, node, target_slot) {
.
.
.
//special case: -1 means node-connection, used for triggers
var output = this.outputs[slot];
if (target_slot === -1) {
	if (output.links == null) output.links = [];
	output.links.push({
		id: node.id,
		slot: -1
	});
} else if (!output.type || //generic output
	!node.inputs[target_slot].type || //generic input
	output.type.toLowerCase() == node.inputs[target_slot].type.toLowerCase()) //same type

	{ // 4-12-2022 wjh
    //  >>>  if ( this.outputs[slot].type === "objectlist" ) this.disconnectOutput(slot);

Image Attachments:
Size: 37.8 KB, Downloaded: 34 times, Dimensions: 403x290px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
9581.297 In reply to 9581.296 
Hi
Thank you wayne. With this modification, we can say goodbye to the "clone" node ! :D

Sometimes an indestructible Object appears in the scene.
The problem will solve after saving the scene and restarting moi.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.298 
Thank you MO!

Here is another one you might like.


Modification to the Node Editor to allow the program name to always appear at the bottom of the display.

Program file 'main.js'

Modify this location:
code:
	//rendering
	if (this.onRender) this.onRender(canvas, ctx);

	//info widget
	if (this.show_info) this.renderInfo(ctx);


Add the five lines to the info widget area:
code:
	//rendering
	if (this.onRender) this.onRender(canvas, ctx);

	//info widget
	if (this.show_info) this.renderInfo(ctx);

	///////////// 4-17-2022 wjh
	ctx.clearRect(0, canvas.height - 20, canvas.width, canvas.height); 
	var dpir = this.pixelRatio * this.uiRatio;
	ctx.font = "bold " + 14 * dpir + "px Arial";
	ctx.fillStyle = LiteGraph.NODE_INFO;
	ctx.fillText(this.graph.filename, 5, this.bgcanvas.height - 3 * dpir);
	///////////



Comment out this line. It is a part of a different routine not required.
code:
//  >>> ctx.fillText(this.graph.filename, 5, this.bgcanvas.height - 3 * dpir); // 4-17-2022 wjh


From this location:

code:
LGraphCanvas.prototype.renderInfo = function (ctx, x, y) {
	x = x || 0;
	y = y || 0;

	ctx.save();
	ctx.translate(x, y);

	var dpir = this.pixelRatio * this.uiRatio;
	ctx.font = 12 * dpir + "px Arial";
	ctx.fillStyle = LiteGraph.NODE_INFO;
	if (this.graph) {
		ctx.fillText("Total: " + this.graph.elapsed_time.toFixed(0) + " ms", 5, dpir * 15 * 1);
		ctx.fillText("FPS:" + this.fps.toFixed(0), 5, dpir * 15 * 2);
		ctx.fillText("F: " + this.frame, 5, dpir * 15 * 3);
		ctx.fillText(this.graph.blocked ? "Graph blocked" : "", 5, dpir * 15 * 4);
		//  >>> ctx.fillText(this.graph.filename, 5, this.bgcanvas.height - 3 * dpir); // 4-17-2022 wjh
	} else ctx.fillText("No graph selected", 5, 13 * 1);
	ctx.restore();
}

Image Attachments:
Size: 75.5 KB, Downloaded: 31 times, Dimensions: 603x529px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
9581.299 In reply to 9581.298 
Hi Wayne

I couldn't find the second part of your modification in my "main.js" file:
"LGraphCanvas.prototype.renderInfo = function (ctx, x, y)"

So I just added the first part and it worked.
Thank you
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.300 In reply to 9581.299 
Hi Mo,

It is located about line 3891 in the original source code. No real need to comment it out, but good practice to eliminate duplicates.

Here is another modification to try out:

On the Node Editor:

To have the Save function use the current file as the save file instead of typing it in everytime:

On the 'editor.js' file location:

code:
Editor.prototype.onSaveButton = function ()
{
	if (this.graph.blocked) return;
	var saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..',  lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );
	if ( !saveFilePath ) return false;
	if ( this.graph.status !== LGraph.STATUS_STOPPED ) this.onPlayButton();
	var file = moi.filesystem.openFileStream( saveFilePath, 'w' );
	file.writeLine(LiteGraph.JSONprettify(this.graph.serialize(), {"indent":"	", 'maxLength':150}));
	file.close();
	this.graph.filename = saveFilePath;
	this.graph.setDirtyCanvas(true,true);
}


Change the second line:

code:
	var saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..',  lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );


To:

code:

Editor.prototype.onSaveButton = function () {
.
  // wjh 4-19-2022
	var saveFilePath = moi.filesystem.getSaveFileName(lang.getTranslation('Save as') + '..', lang.getTranslation('MoI Nodeeditor files') + ' (*.nod)|*.nod',lang.getTranslation(this.graph.filename));
.
.
}

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
9581.301 In reply to 9581.300 
Thank you for these cool modifications.

You are right.
search didn't work because of extra whitespaces .
LGraphCanvas.prototype.renderInfo = function (ctx, x, y)
LGraphCanvas.prototype.renderInfo = function( ctx, x, y )

Now I find it. :)

I usually prefer to have different versions of same node, But I gave it a try.
I added your modification as you showed, but couldn't see any difference.("save as" window pops up with empty name field)


Anyways, I change your code a bit.
Now if you press the save button and alt key , it saves on existing node file without confirmation.
otherwise works like before.
code:
Editor.prototype.onSaveButton = function (e)
{
	if (this.graph.blocked) return;
	var saveFilePath="";
	// var saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..',  lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );
	// if (e.altKey) {saveFilePath = moi.filesystem.getSaveFileName(lang.getTranslation('Save as') + '..', lang.getTranslation('MoI Nodeeditor files') + ' (*.nod)|*.nod',lang.getTranslation(this.graph.filename));}
	
	if (e.altKey) {saveFilePath = lang.getTranslation(this.graph.filename);}
	else {saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..',  lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );}

	if ( !saveFilePath ) return false;
	if ( this.graph.status !== LGraph.STATUS_STOPPED ) this.onPlayButton();
	var file = moi.filesystem.openFileStream( saveFilePath, 'w' );
	file.writeLine(LiteGraph.JSONprettify(this.graph.serialize(), {"indent":"	", 'maxLength':150}));
	file.close();
	this.graph.filename = saveFilePath;
	this.graph.setDirtyCanvas(true,true);
}
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
9581.302 In reply to 9581.299 
MO,

Your Curves2/ConnectPoints node is very similar to Wayne's Points2/PtsInRange.
Indeed the output is identical with a "Max Links" setting of 4 or greater & "DistRange" minimum of 0. See below

The facility to generate lines within a range could be added with a dropdown selection as shown above so on "DistRange (min, max)" the "Distance" input would read 2 comma separated numbers.

Perhaps a better, more logical alternative would be to have instead 2 distance inputs: "distMin" & "distMax" with defaults of 0 & 1 respectively. In that way it would operate exactly as it does presently if no connection is made to "distMin" input.

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

PS I have replied here, in this thread, because the thread " things about MOI3D that you learn by teaching it." seems a peculiar location for submitting new node contributions. In the interest of accessibility of new nodes to latecomers & infrequent visitor to the forum, we should probably avoid scattering new node submissions across various different threads. This thread & "Nodebundle for playing with nodes" are the 2 established repositories of NE's expanding library of new nodes

EDITED: 1 Apr 2023 by JFH

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
9581.303 In reply to 9581.302 
Hi James
It seems once again I've reinvented the wheel. :)
Although I don't have the "Points2/PtsInRange" node in my NE package.
I changed the "ConnectPoints" node, now it has a range mode.

I get your point about threads.
I'll try to post in related threads.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
9581.304 
NODE PROPOSAL: srfNormals

The means of illustrating the surface orientation by displaying normals would offer great utility when working with nodes.
For instance extruding can sometimes give unexpected results due to false assumption of the orientation of faces.

Michael introduced functions for evaluating surface normals by scripts with v4 beta:
face.evaluateNormal( uv ) : Function that evaluates a uv parameter value and returns a normal vector.
I'm not sure whether Michael has builtin a normal vector display or whether it needs to be displayed as per existing vector nodes

See the full list of surface evaluation functions here:
http://moi3d.com/forum/lmessages.php?webtag=MOI&msg=9547.21

Another useful feature would be the inclusion of the facility to unify normals across a polysurface.
Disregard sentence above. Also see link suggested by Michael below:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1620

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

EDITED: 4 Apr 2023 by JFH

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9581.305 In reply to 9581.304 
Hi James, for the display check out here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1620

That 'arrow3d' factory will make an annotation leader object with the property set on it for rotating the arrowhead plane so it's always facing the viewer. Should be good for a vector direction display.

re:
> Another useful feature would be the inclusion of the facility to unify normals across a polysurface.

This should happen automatically - when surfaces are joined together they should evaluate normals on a consistent side which will be to the exterior if it's a solid.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
9581.306 In reply to 9581.305 
Michael, thank you for your reply.
quote:
This should happen automatically - when surfaces are joined together

Yes I misspoke, I should have said selected surfaces from separated polysurfaces.

Is there a way to ensure that faces remain unified after separating a solid object?
If you look at example below: the half the faces flip after Dodecahedron is separated as demonstrated by the direction of extrusions.


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

EDITED: 4 Apr 2023 by JFH

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9581.307 In reply to 9581.306 
Hi James,

re:
> Is there a way to ensure that faces remain unified after separating a solid object?

I think that is supposed to be happening automatically already, can you please post your Dodecahedron so I can take a look?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-7  …  228-247  248-267  268-287  288-307  308-327  328-347  348-367  …  408-425