Hey all, wondering if anyone has some guidance getting this shape with a tile or brick generator:
Currently I am using a tile generator with an SVG node to connect the tiles together. It works, but if I want to change any of the tile generator functions, i would have to manually adjust the SVG, which isn't that efficient.
Ideas?
Replies
sbs package here
Thank you
You can't get the variable anywhere anytime: you can set/get variables only within the same node and in a specific order. The node parameters function are executed on after the other, that's why I made the Set in the color/luminosity function because it's the first function to be evaluated.
The sequence node is used to execute multiple function branches in a specific order: the branch connected to the first input is executed first. Also it allows to execute function branch that has no link to the current function. n my case I compute position, size, rotation but I still have to output the color (using a constant float1) because i'm in the color/luminosity function.
Hope it helps!
I still have to try it, but sequences and sets should solve the problem I had where in one function I used a "random" node and in another one, in the same FX-Map, I needed the result of that very same calculation.
Thank you
The thing is, you can Set variables in any function in any parameter in any node in the fx-map graph. The way we use it in this example is one of the many possibilities: we could set a variable in the iterate node and get it in a quadrant below, so should we add this function to be computed first also in the iterate ?
At the end it does not make much difference to put the main function in the color/luminosity for this usage.
I see your point. If Sets are accessible by all the nodes in the FX-Map, it means you could put the "first evaluated function" slot, at the FX-Map level, rather than in the Quadrant or in the Iterate.
A variable set at FX-Map level could be used in any Quadrant, for example, but each Quadrant could define its own variable with the same name and shadow the one from the outer scope, like in normal programming. This behaviour would require at least some debugging info about conflicting/shadowing variable names.
It would be nice to have the "Set" variable names to automatically appear in the "Get" node list of matching variable types, like the Input Parameters, maybe prefixed by their own symbol like #name to tell them apart from the Input Parameters.
Thank you
This would set the variable only once, whereas in this example, the variable is set at each iteration
Agreed.
kwshipman sorry we are a bit off topic now I hope you find the pattern usefull
You're right Nicolas, it wouldn't take into account the actual iterations... It is tricky indeed, and I am sure you've given the matter a lot of thought, considering all the implications.
The only possible solution I see, like you said earlier, would be to add this special "first evaluated" slot, to all the scopes, which means the FX-Map, the Quadrant, the Iterate and the Switch, with the shadowing rules I mentioned. But at that point it would be just a "cosmetics", meaning that you would use it rather than the actual first parameter in each node type, but wouldn't make any practical difference. (I would probably like it better though, but it is purely a matter of personal taste).
Thank you for the exchange!
Life has distracted me from this material, but with your help this is what I've got going on, some old linoleum tiles:
Just gotta add some puddles and maybe some grime/dirt