Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

ARCHIMATIX PRO Node-based Parametric Modeling for Unity [Unity Awards Finalist]

Discussion in 'Assets and Asset Store' started by roryo, Jun 4, 2015.

  1. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Hello,
    I try to disable handle on linear repeater.
    Does anyone know how do that ?
     
    wetcircuit likes this.
  2. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Hello,
    Another three questions:
    -Can i make min/max value of parameters an expression ?
    -Can i write complex expression like if/else ?
    -Can i use ShapeChanneler node for multiplex parameters relations ?

    Thanks,
     
  3. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    502
    AX is the main feature on the asset store home page! Warms my heart. Hope this translates into many (wise imho) purchases of one of the coolest assets around and may AX be supported til the end of time. :) *looks around expecting a chorus of fellow AX fans shouting "Dilly, dilly!"*
     
    wetcircuit likes this.
  4. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    I made a video tutorial about Expressions and math functions.


    For ShapeChanneler, you can set all the channels to ON, then activate and deactivate individual node-chains routed into the channeler. I don't think it's possible to adjust the channeler itself by script…, but... 6 of one/half-dozen of the other… If your script can toggle a parameter on, then it can also toggle off the other parameters that conflict.
     
    dualite2 likes this.
  5. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    I totally miss out the set command in turtle script.
    It literally changes everything.
    Thank you, great tutorials!

    By the way do you know if i can acess char in a string parameters with turtle script ?
     
  6. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    Glad it helped ! ;)

    Not sure… not that I am aware.
     
  7. wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    Joined:
    Jan 20, 2020
    Posts:
    5
    Hello,
    Can i build a bridge whose pier height changes with the ground, like this
     
  8. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    502
    What do you mean by ground? Do you mean bona fide terrain? And is the bridge adjusting to the terrain or do you want to deform the terrain to fit the bridge?
     
    wetcircuit likes this.
  9. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    I would build a smart pylon as a stand-alone prefab. The top of the pylon is at 0 (ground level). It has a script that raycasts down to the terrain (same idea as IK foot placement). The script raycasts then sets the pylon height on an AX parameter.

    Individual meshes can be made (on the AX node) to drop to terrain, so you can build ground details (if needed)
    I'd build the arch-section as its own prefab. That's going to be some math (or an elaborate set of inter-connected 2D shape nodes).

    Placing the pylons and the arch-span… that's going to depend on how flexible you need the bridge to be, how the roadway transitions to the bridge, if the approach to the arch needs to curve…. but, basically it's all plan repeaters / PathPlacers, or placing the prefabs by script.

    ALSO, consider that you might fake this part of the terrain with another AX mesh.
     
    Last edited: Jan 20, 2020
  10. PeppersGamer

    PeppersGamer

    Joined:
    Jan 18, 2018
    Posts:
    17
    Any word on the truss tool? I would like to make a truss with shapes like I-Beam.
     

    Attached Files:

  11. wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    Joined:
    Jan 20, 2020
    Posts:
    5
    yes
     
  12. wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    Joined:
    Jan 20, 2020
    Posts:
    5
    Can you give me a simple example ?
     
  13. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    I can show you how I did it, but you will need to write your own raycast script since I use Playmaker.
    Screen Shot 2020-01-21 at 9.33.48 AM.png

    1. Make an AX runtime model for the pylon.

    a. Expose the parameter on the pylon that controls the height.
    Screen Shot 2020-01-21 at 9.40.38 AM.png
    b. set the mesh(es) on the Pylon to Align with Top
    Screen Shot 2020-01-21 at 9.38.40 AM.png
    c. Create a Runtime Controller script and drag it onto the RuntimeController gameobject (Unity doesn't attach the component automatically for some reason)
    Screen Shot 2020-01-21 at 9.44.14 AM.png

    2. create your raycast script (mine is Playmaker)
    a. cast a ray down (direction -Y)
    b. get the distance to the terrain
    c. set the height parameter on the pylon
    d. in the script, use Call Method on the runtime model to rebuild the pylon
    e. attach the script to the AX model
    f. drag the AX model into the Project to save as a Unity Prefab – this is the 'smart' pylon (smart because it is self-adjusting).

    Test the prefab by positioning the pylon above a terrain (or any mesh that can be hit by the raycast), and press PLAY on Unity. The runtime model will rebuild using the Height parameter. Because we aligned the mesh with the "top" of the model (step 1b), the "top" of the pylon is where you placed the prefab and the pylon grows down to the terrain.

    3. Create the bridge/causeway
    I used a PlanRepeater to place the Prefab (Pylon set on the Prefab node).

    Screen Shot 2020-01-21 at 10.08.17 AM.png
     
    Last edited: Jan 21, 2020
    Eva-Dragonflame and BCFEGAmes like this.
  14. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
  15. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Hello,
    i have a little issue with Turtle script logic.
    I want to detect if a boolean is false for setting another boolean.

    first try :
    if face NE true
    set echo 1
    endif

    second try :
    if face EQ false
    set echo 1
    endif

    What i expect : set echo to 1 when is toggle off "face" == false

    Can anybody enlighten me ?
    Thank you
     
  16. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    To test for the face boolean=true, all you need to do is:

    if face
    … (conditional stuff)
    endif


    there is no else statement, so to prevent the logic running again I write a second if block for false:

    if !face
    … (different stuff)
    endif


    use the ! for "not" or "false" on bools… and to test "true" is essentially testing if the bool exists.

    NE, GT, LT, EQ are for int and float in the turtle logic only…

    you can also comment out lines with the standard:

    // everything on this line is a comment, helpful to prevent the logic accidentally refreshing
    // if AX goes blank, hit UNDO and you can usually recover


    it's safe to have a dozen unfinished and half-edited versions of the same node in an AX graph. You can save the scene without effecting any nodes in the library.
     
    Last edited: Jan 22, 2020
    dualite2 likes this.
  17. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23

    Thank you, you save my day another time ;)
     
    wetcircuit likes this.
  18. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    I dug through the AX code… all the math functions that can be parsed (in logic and behavior expressions) are:

    greater(a,b)
    lesser(a.b)
    range(var,a,b)

    IsEven(var)
    isEven(f)
    iseven(f)

    modulo(int,float) ?

    Epsilon
    epsilon

    PI
    pi

    Abs(var)
    abs(f)

    Acos(var)
    acos(f)

    Asin(var)
    asin(f)

    Atan(var)
    atan(f)

    Atan2(height,width)
    atan2(a,b)
    arctan(a,b)

    Ceil(var,a)
    ceil(a,b)

    CeilToInt(var)
    ceilToInt(f)

    Clamp01(var)
    clamp01(f)

    Cos(var)
    cos(f)

    Exp(var)
    exp(f)

    Floor(var)
    floor(f)

    FloorToInt(var)
    floorToInt(f)

    Lerp(a,b,time)
    lerp(a,b,t)

    Max(var,a)
    max(a,b)

    Min(var,a)
    min(a,b)

    MoveTowards(var,a,b)
    moveTowards(a,b,c)

    MoveTowardsAngle(var,a,b)
    moveTowardsAngle(a,b,c)

    Pow(var,a)
    pow(a,b)

    Repeat(var,a)
    repeat(a,b)

    Round(var)
    round(f)

    Sign(var)
    sign(f)

    Sin(var)
    sin(f)

    Sqrt(var)
    sqrt(f)

    Tan(var)
    tan(f)

    int(var)


    I have not tried all of them (tbh I don't understand all of them)
     
    photonic likes this.
  19. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    I think roryo really need to update the manual page on the web site, notably Turtle script page adding usable logical/mathematics operators.
     
    ledbetterman and wetcircuit like this.
  20. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Well, I try to make a master switch like a breaker for a house.
    In the example below i1 is a switch, master the breaker.
    The interesting part is the turtle script where we try to update si1 (out for i1) state.

    The part with constants (aka true/false) work (green)
    Not so much for the part with parameters (orange).
    That a shame because the example is a simple switch and mine need many switches and that make many useless IF/ENDIF.

    So, bug or not ?

    master switch.png
     
    wetcircuit likes this.
  21. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    yeah, lots and lots of nested if/endif… :eek:
    There's a limit to what we can do with turtle script

    A more advanced level is to write your own node with some dedicated code inside (above my level, but probably not that hard if you are a coder…). It's the next page of the manual, after the turtle script…

    – but you can always move the brain 'off graph' into a scene script. There's a delay as the behaviors propagate through the graph, so imho it will always be faster to move the brains into an external manager script that can set all exposed parameters… Essentially, your Master Node becomes an external script that explicitly controls each node's parameters. Models are 'dumb', but fallback to their presets.

    Jumping to a design philosophy, I think there are limits to making every decision a bool, one possible alternative is to make int state machines…. Were talking super-specific nodes controlling groups of features on a model, but each int number is a state:

    int: 0 is all off
    1 is A on B off
    2 is A off B on
    3 is A on B on
    etc.

    of course the receiving node needs to be 'smart' too, but at some point (imho) the AX graph becomes complex and eventually it's just about routing entire node chains or Groupers, so the 'smart' receivers are probably hubs switching whole sections of a model on/off. Bools can be routed to another node's Enabled setting – so, really easy to have a bool switch that disables the last node in a chain or a Grouper.
     
    dualite2 likes this.
  22. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Well, I agree for the brain.
    I do some complicate thing in C# but that part where I need to expose a little switch is no, no for me.
    However I try to minimize the node number with Turtle script like coding repeater loop because I can't kill the handle.

    The problem is more like discovering the little things slowly than knowing it at the start.

    That it's, I return coding ;)
    One more time, thank you.
     
    wetcircuit likes this.
  23. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Hello,
    I use the channeler to choose one of 2 graphs.
    Now, I want to use a grouper for grouping all this mess (channeler include).
    Therefore I need to pilot the parameters "Channel" then...

    Any way to do that with nodes, parameters or Turtle script ?
     
  24. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    Turn all channels ON… then disable the node chains that route into the channeler (last node before the channeler?) – you can create a bool on the grouper that switches on/off internal nodes.
     
    dualite2 likes this.
  25. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Ho, that an interesting idea!
    I try that!
     
    wetcircuit likes this.
  26. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Hello,
    I probably found a graphic bug in the graph editor.
    I have one node connected to four groupers and one... is not visible.
    In the pictures below you can see where the grouper is normally with the relations wires in the void.

    Capture d’écran 2020-01-28 à 09.26.03.png

    Do anybody know how correct that?
    if not, do I need to PM roryo for that ?
     
    wetcircuit likes this.
  27. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Ho, i found where the missing node gone.
    It went one level ahead in the "main" graph.

    However :
    1. i not move it here
    2. that doesn't explain the relation wire in the void.
    3. The relations don't seem to be cut BUT are visible only in the grouper node.
    I try to move back the node in the grouper, but the relations shift on another node (same parameters name however).

    Capture d’écran 2020-01-28 à 09.50.03.png

    Do anybody else experience that "curious" thing ?
     
    wetcircuit likes this.
  28. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    Sounds like a bug… I would send the scene to Rory.
    Which version of Unity?

    And possibly, can you find that node in the hierarchy under generated objects? Is it under the Grouper it belongs to, or has it "fallen outside" into the main list of nodes?
     
  29. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    I repair manually but, i make a zip of the scene before.

    Unity version : 2019.1.3f1
    Hierarchy side the "lost" node seems under the "correct" grouper :
    Capture d’écran 2020-01-28 à 14.12.19.png

    I keep the zip archive if Rory need to investigate.
    If the same issue reappears, i come crying. :)

    By the way i also have some misplacement with GUI label / tooltip but well it's another story....
     
    wetcircuit likes this.
  30. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,231
    NEW NODE! XY Curve



    When you know the width and height values (XY), but want to play with the curve… I was making a node for fascia (the trim under the eaves of a roof), and decided it could do a lot more.

    Good for compound shapes where you need to link multiple curves point-to-point
    (ie: brass candlesticks, balusters, spires, finials, pagodas…)

    The curve can be positive or negative. 0 is a straight line.
    'Overdriving' the curve past -1 and +1 will create a loop that crosses over itself – might be useful when PlanDeforming another model

    http://community.archimatix.com/axshare/xy_curve/
     
    Eva-Dragonflame and iddqd like this.
  31. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    How would I go about editing archimatrix so that shape controls when used with an extrude node align to the align parameter on the extrude node?

    Right now the shape controls are on the footprint of the object regardless of the alignment being set to 'Top' on the extrude nod, I'd like to align the controls with the top of the object.

    Screen Shot 2020-02-10 at 12.32.50 PM.png
     
  32. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,402
    There is no way to do that currently, but that would make a lot of sense! I'll look into it. ;)
     
  33. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    Thanks, I tried looking into it myself, but there's a lot of code :eek:
     
  34. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    Hey all,

    I've making this mini golf game and i'm a bit stuck on how to best implement elevation into my levels. I'm just looking for some general advice about different methods i could use to implement ramps, mounds and other mini golf related elevation things.

    As you can see my levels are platforms and can have walls around them. I use AX to generate these platforms using both free curve and shapes and shape merger nodes etc.

    Screen Shot 2020-02-11 at 1.11.44 PM.png Screen Shot 2020-02-11 at 1.10.46 PM.png

    Preferably I'd like to not have to manually model anything in pro builder or otherwise. I'm the only developer on this project so it's important that level building time is kept to a minimum. I also like the levels at the moment how they can be easily adjusted without much issue using AX, I'd like to be able to keep that attribute.

    I'm just looking for some general ideas about how i might do this.

    Cheers in advance.
     
  35. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    I successfully modified AX to spawn prefab instances rather than clones of objects! It's actually pretty simple. Here's the code if you want to integrate it into the AX properly.

    First make a GameObject Instantiate helper function which either instantiates a prefab instance or if it can't a game object:

    Code (CSharp):
    1.  
    2. public class GameObjectInstanceHelper
    3.     {
    4.         public static GameObject Instantiate( GameObject prefabOrGameObject )
    5.         {
    6.             return Instantiate( prefabOrGameObject, Vector3.zero, Quaternion.identity );
    7.         }
    8.  
    9.         public static GameObject Instantiate( GameObject prefabOrGameObject, Vector3 position, Quaternion rotation )
    10.         {
    11.             GameObject instance;
    12. #if UNITY_EDITOR
    13.             instance = PrefabUtility.InstantiatePrefab( prefabOrGameObject ) as GameObject;
    14.             if( instance == null )
    15.             {
    16.                 if( PrefabUtility.IsPartOfPrefabInstance( prefabOrGameObject ) )
    17.                 {
    18.                     instance = PrefabUtility.InstantiatePrefab( PrefabUtility.GetCorrespondingObjectFromSource( prefabOrGameObject ) ) as GameObject;
    19.                 }
    20.             }
    21. #else
    22.             instance = GameObject.Instantiate( prefabOrGameObject );
    23. #endif
    24.             if( instance == null )
    25.             {
    26.                 Debug.Log( prefabOrGameObject.name );
    27.                 instance = GameObject.Instantiate( prefabOrGameObject );
    28.             }
    29.             if( instance == null )
    30.             {
    31.                 return null;
    32.             }
    33.             instance.transform.position = position;
    34.             instance.transform.rotation = rotation;
    35.  
    36.             return instance;
    37.         }
    38.     }
    39.  
    Here's the hardest bit:
    Find all instances of Instantiate() inside of AX and replace them with the GameObjectInstanceHelper.Instantiate();

    I found I had to search a few times to find them all, they look like this mostly:
    (GameObject) Instantiate();



    And then finally if you want you can also modify the stamp function so that it stamps with prefab references intact.

    replace the AXModel.stamp() function with this code:
    Code (CSharp):
    1.      
    2. public GameObject stamp()
    3.         {
    4.             if (generatedGameObjects != null)
    5.             {
    6.                 GameObject go = AX.GameObjectInstanceHelper.Instantiate(generatedGameObjects, generatedGameObjects.transform.position, generatedGameObjects.transform.rotation);
    7.  
    8.                 string _name = generatedGameObjects.transform.parent.gameObject.name;
    9.                 _name = _name.Replace(" (AX)", String.Empty);
    10.  
    11.                 go.name = _name + " (Stamp)";
    12.  
    13.  
    14.              
    15.  
    16.                 Transform[] originalTransforms = generatedGameObjects.GetComponentsInChildren<Transform>();
    17.                 Transform[] transforms = go.GetComponentsInChildren<Transform>();
    18.                 for( int i = 0; i < transforms.Length; ++i )
    19.                 {
    20.                     if( transforms[i] == null )
    21.                     {
    22.                         continue;
    23.                     }
    24.  
    25.                     AXGameObject axgo = transforms[i].gameObject.GetComponent<AXGameObject>() as AXGameObject;
    26.                     DestroyImmediate(axgo);
    27.  
    28. #if UNITY_EDITOR
    29.                     if( PrefabUtility.IsAnyPrefabInstanceRoot( originalTransforms[i].gameObject ) )
    30.                     {
    31.                         GameObject prefabObject = PrefabUtility.GetCorrespondingObjectFromSource( originalTransforms[i].gameObject );
    32.                         if( prefabObject != null )
    33.                         {
    34.                             GameObject newInstance = PrefabUtility.InstantiatePrefab( prefabObject ) as GameObject;
    35.                             newInstance.transform.SetParent( transforms[i].parent );
    36.                             newInstance.transform.localPosition = transforms[i].localPosition;
    37.                             newInstance.transform.localRotation = transforms[i].localRotation;
    38.                             newInstance.transform.localScale = transforms[i].localScale;
    39.                             newInstance.name = transforms[i].gameObject.name;
    40.                             DestroyImmediate( transforms[i].gameObject );
    41.                             transforms[i] = newInstance.transform;
    42.                             newInstance.transform.SetSiblingIndex( i );
    43.                         }
    44.                     }
    45. #endif
    46.                 }
    47.  
    48.                 deselectAll();
    49.  
    50. #if UNITY_EDITOR
    51.                 Selection.activeGameObject = go;
    52. #endif
    53.                 return go;
    54.  
    55.             }
    56.             return null;
    57.  
    58.         }
    59.  
    60.  

    And you're done! If you find that some prefab references are being broken you've probably not found and replaced all the instances of Instantiate inside of AX. I left a Debug.Log() in there that can help you track it down.


    Enjoy.
     
  36. MicCode

    MicCode

    Joined:
    Nov 19, 2018
    Posts:
    17
    Hi,

    When will archimatix be updated for 2019.3?
    Looks like the inspector is broken when using the 2019.3

    Thanks
     
    dualite2 and Antony-Blackett like this.
  37. wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    wechat_os_Qy05-9G7_hdfeAIJoX2K28jWg

    Joined:
    Jan 20, 2020
    Posts:
    5

    I designed according to this method and found some bugs.

    1. Many of the same components have been cloned in the editor.
    QQ图片20200219165755.png
    2. The running efficiency is very low, resulting in the editor stuck.
     
  38. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,402
    Ok, just updated the Turtle script page (see the bottom).

    Thanks for compiling that list, @wetcircuit!
     
    dualite2 and wetcircuit like this.
  39. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,402
    Hi @MicCode - could you be more specific or maybe include a screenshot of what you are seeing?

    When testing in 2019.3.2f, this is what I see:

    Screen Shot 2020-02-25 at 10.27.15 PM.png


    Screen Shot 2020-02-25 at 10.26.53 PM.png
     
    Last edited: Feb 26, 2020
  40. MicCode

    MicCode

    Joined:
    Nov 19, 2018
    Posts:
    17
    Thanks for checking, last time I tried it with 19.3 beta
    Opened in 19.3.2 just now, it's working, many thanks
     
  41. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Can you please also update the script documentation page because "closed" not work.
    You can see more of that here : http://community.archimatix.com/bugs/turtle-script-closed/

    It probably interesting to add some sequence for that too :

     
    wetcircuit likes this.
  42. dualite2

    dualite2

    Joined:
    Feb 21, 2012
    Posts:
    23
    Can you also edit this section and add the multiple missing "let" before :

    Code (CSharp):
    1. loop teeth
    2.     arcl degs radius segs
    3.     right tooth
    4.     arcl degs radius+tooth segs
    5.     left tooth
    6. endloop
    I know i can find that on the 2D node now.
    But when i learn that the first time and try a copy paste this thing turn me crazy.

    Thanks you.
     
  43. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    424
    Hi @roryo

    Regarding Runtime generation, are there any plans for performance improvements, such as:
    • pooling generated Prefabs
    • using the new Mesh API and/or Jobs System
    Thanks
     
  44. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,402
    I am very excited about the additions to the Mesh API. I am starting to contemplate a rewrite of AX, which will be AX2. There are other unannounced Unity improvements on the way that AX could really benefit from, but will make more sense to go from the ground up again. I would include the job system basis of MeshData as part of that.

    Per runtime optimizations with pooling, do you mean Prefabs or GameObjects that are generated?
     
    iddqd, AthrunVLokiz and wetcircuit like this.
  45. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    424
    Hi @roryo

    AX2 would be amazing and I would gladly pay an upgrade price.

    Regarding pooling I mean runtime generated/destroyed GameObjects from the PrefabInstancer.

    I'm procedurally generating long bridges at runtime and destroying them again and creating new ones as the terrain is modified. So all my planks on the bridge use the same plank (with some Jitter) generated with the "PrefabInstancer". So instead of using GameObject.Instantiate and then Destroy on each plank, they could be pooled/reused since GameObject.Instantiate is too heavy when creating a long bridge in one frame.

    For the rest of my game I use https://assetstore.unity.com/packages/tools/utilities/lean-pool-35666 for pooling.

    I thought there might be a way to generate all planks in one GO using CombineMeshes or similar, but when I enable CombineMeshes on the Repeater, then the Planks just disappear.

    It could be something like a "Use Pooling" Checkbox on the PrefabInstancer and some method of preloading x objects when the game starts (so the first bridge doesn't lag) or leaving the preloading entirely to the dev.

    Overall pooling is relatively simple to implement and leads to great performance improvement

    Let me know if you need more info or screenshots.
    Thank you
     
  46. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    Is anyone else using mac and Archimatrix?

    I think it's hard crashing my mac, i'm not exactly sure what is doing it, I can't track it down but I've noticed that when I'm building levels using Archimatrix I get about 6 hard resets a day... It's possible it's not archimatrix at all though.
     
  47. Sajid_farooq

    Sajid_farooq

    Joined:
    May 23, 2012
    Posts:
    238
    Im on a mac and it works fine so far.
     
  48. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    Yeah... it’s too infrequent to figure out what is doing it... all I know is it was fine when I was building levels that didn’t involve archimatrix but now it has been crashing since switching to archimatrix levels. However there are a few other things that also differ, like shaders etc. I’ll keep digging
     
  49. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,402
    I am developing AX on a mac, and so Mac OS is its home base. ;)

    I have not experienced any crashes thus far. :) Are you using a beta of Unity?
     
  50. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,553
    No, I'm on 2019.3.6f1

    I've installed windows on my mac and so far there haven't been any crashes, i was hoping it might show some obvious errors somewhere but it's not so far.
     
unityunity