Itoo Software Forum

Author Topic: Circular Pattern and Embedded Items  (Read 1952 times)

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Circular Pattern and Embedded Items
« on: March 15, 2023, 09:07:45 PM »
I know I`ve asked those several times but I like to be persistent  ::)

During this beta, I`m creating a Macro for the setup of parametric tables. Now I want to have circular distribution and missing some kind of circular pattern in A2S.
I can easily do it with an extra Circular Spline but this Spline needs to exist both in the Scene and in the Top Level of the Style. It would be really great if we could embed Segments, Splines inside Macros.

One more important question:
I love the new random option resetting on different states but I`m still not sure about the hierarchy of Generators. On what level of Generator restart applied when nesting?

Thanks


 
« Last Edit: March 15, 2023, 09:20:12 PM by Dragan »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Circular Pattern and Embedded Items
« Reply #1 on: March 17, 2023, 01:46:07 PM »
I'm afraid it's not possible to embed Segment or Splines in macros.

These are special objects, linked with the Max parameters, where we store a reference to the object, scene node, material and more.
Instead macros (really the full style) are handled as text (in XML format). That lets us to copy/export/import macros easily. There is no a simple way to embed a Max object in that format.
Also there are other reasons to keep these special objects in the main style only.

Quote
I love the new random option resetting on different states but I`m still not sure about the hierarchy of Generators. On what level of Generator restart applied when nesting?

Interesting question. Everything works by events: when a generator is going to be evaluated, a 'Generator' event is triggered, and propagated to all child nodes.
When Random node receives this event, its internal random generator is reset.

In case of nested generators, there are multiple events. For example, with 'Random->Gen1->Gen2':

1. A 'Generator' event is sent at start of Gen2 evaluation.
2. Since Gen2 uses Gen1, Gen1 is evaluated, triggering other 'Generator' event.

If Gen1 is used multiple times by Gen2 (for example, when connected to 'Default'), Gen1 is evaluated multiple times, triggering its own 'Generator' for each iteration.

Carlos Quintero
iToo Software

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Circular Pattern and Embedded Items
« Reply #2 on: March 17, 2023, 02:24:39 PM »
Tnx Carlos.
So, are the "Reset on" and "Genarate on" on the same "Level"?
I'm playing around with different states and it seems I'm missing one level more to get what I want.  ;D

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Circular Pattern and Embedded Items
« Reply #3 on: March 18, 2023, 08:23:46 AM »
Quote
So, are the "Reset on" and "Genarate on" on the same "Level"?

Yes. In fact, checking the code now, i see both have same behaviour. The only difference is that "Reset on" has effect only when "Seed" is enabled.

I will check if we can unify both, which is more logical.
As usual, the problem is to keep compatibility with existing scenes which used the old "Sync between Generator" (now renamed to "Reset On").

Carlos Quintero
iToo Software

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Circular Pattern and Embedded Items
« Reply #4 on: March 18, 2023, 11:59:25 AM »
It would be great if "reset on" and "generate on" could be on the different "Level" when nesting or to have "reset on" locked on the Master Generator.
Maybe even to have two options for "reset on":
1. Float - on Generators Evaluations
2. Master - Locked to the Master Generator

tnx


iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Circular Pattern and Embedded Items
« Reply #5 on: March 20, 2023, 09:28:52 AM »
It would be great if "reset on" and "generate on" could be on the different "Level" when nesting or to have "reset on" locked on the Master Generator.
Maybe even to have two options for "reset on":
1. Float - on Generators Evaluations
2. Master - Locked to the Master Generator

We'll think on that. Added to the wishlist.

Regarding the circular pattern, please find attached a solution which don't require embedded splines.
It modifies the position/rotation of segments using trigonometry.
This version works as an Evenly distribution, but you can create other variations (i.e. connecting to Default), or create a macro from that.

Carlos Quintero
iToo Software

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Circular Pattern and Embedded Items
« Reply #6 on: March 20, 2023, 09:58:20 AM »
tnx for the solution, I think Paul uses a similar approach when solving circular patterns problems.
It would be nice to add this in a Macro Library.

For "reset on" it would be extra useful for nesting if we could target Generators by name. (we get the generators name in the drop-down list)
But I know this depends on evaluation and needs to be a dynamic list so this is probably out of the road.