Search Unity

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

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

  1. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    I can't seem to reproduce this, @C_p_H - are there any error messages in the console?
     
  2. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Development on the WinWall feature is leading to a new level building tool that will let you edit without using the node graph (it will build a node graph in the background).

    Archimatix 2018-12-20_05-23-28_PM.jpg

    Archimatix 2018-12-20_05-19-40_PM.jpg
     
  3. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    I am really looking forward to using this tool to build my levels.
     
    roryo likes this.
  4. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Does this mean that adding a shape (or grouper) in the scene view that removes/replaces parts of a plan's geometry (with, say, another graph, grouper, or group of nodes?) might become a possibility?

    For example, I might want to chop out a section of a wall and use a different group of nodes for that particular section (for slopes/doors/decorations/etc)...

    This is sounding tasty though... :F
     
    Last edited: Dec 21, 2018
  5. eelstork

    eelstork

    Joined:
    Jun 15, 2014
    Posts:
    221
    Hello! I spent some time looking through the thread but couldn't answer all the questions I have so... here goes.
    1 - On these pages I see mostly architectural models and hard-surface oriented stuff. Looking through the nodes it looks to me that stylized organic stuff should be possible. But can this do things like (a) scattering models on a surface, or (b) use an equivalent to L-systems? In fact I already have a procedural scatter so this may/not be a problem but my scripts are sensitive to the naming of the underlying shapes (without names can still scatter but may need a lot more manual input to work out)
    2 - How do these models get into builds? Ideally I'd like our builds to just contain the procedural graphs (small executable footprint) and generate the actual models right after loading a scene (the main concern is actually not exe size although that's a thing; loading time is the bigger issue... see my example below)
    3 - Is the source included? Can we tweak and change things?
    4 - What's the recommended hardware spec to edit comfortably for scenes around 200,000k tris?

    Coral.png

    Above I put an example showing exactly the kind of stuff (yes, it's coral) that raises my questions about Archimatix. The architectural stuff sure, I can see it's building it. Now, with this coral stuff I have issues because it's clearly repetitive and procedural in nature so the heavy footprint (level loads in 14 seconds on an iPhone SE, though it is running at 30fps thanks to decent LOD setup) isn't justified. I'm on the fence here as I could end up spending one month extending and tweaking my procedural generators, but I'm hoping to spend one month creating awesome content with Archimatix instead : D

    Thanks for reading! Looking forward to replies!
     
  6. Zoraph

    Zoraph

    Joined:
    Aug 23, 2012
    Posts:
    29
    Last edited: Jan 1, 2019
  7. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    Beep eyeing this asset up for a while - it looks incredible.

    However... is there any way to set the Turtlescript for a node via the runtime API? I basically want to be able to punch an undefined number of holes in a wall based on some information obtained from a script - these holes may all be different sizes, positions, maybe event rotations (though always straight-edged, never rounded). The easiest way to do this seems to be by drawing one big shape manually using the Logic input judging by what I've seen in videos and docs, however if you have another suggestion I'm all ears!

    I keep seeing mention of a WallWindow node as well, which I understand would punch a hole in an already extruded wall - is that still on the table?
     
  8. C_p_H

    C_p_H

    Joined:
    Nov 24, 2014
    Posts:
    153
    No problemo, I've got it working now by uninstalling/reinstalling various other asset plugins. Apparently one of them must've blocked Archimatix from fully loading its GUI panels. The only clue I noticed was upon initial startup when Unity launched it declared in the console that it couldn't load all layout windows because of an error. Strange thing is when I hit clear in the console or play all the errors would clear until the next launch. I suspect it had something to do with the new HDRP because that's the only thing I recall experimenting with prior to the weird behavior.

    Thanks for responding.:oops:
     
  9. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    @roryo I'm currently experiencing a bug where if attempt to move Archimatrix to a special folder such as "Standard Assets", I get a lot of error messages.

    It also makes the editor move extremely slow.

    We are trying to move all of our third party assets and plugins to one of the special folders and or give them Assembly Definition Files in order to reduce script compile time when we edit scripts in our project.

    Here is the error message:

    DirectoryNotFoundException: Could not find a part of the path "D:\DefaultFolders\Documents\UnityProjects\VSTS\JellyBallArena\Assets\Standard Archimatix\Library\data.json".
    System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
    System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool,System.Text.Encoding)
    System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    System.IO.File.WriteAllText (System.String path, System.String contents) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    AX.Library.initDataFile () (at Assets/Standard Assets/Archimatix/Scripts/Editor/Library.cs:428)
    AX.Library..ctor () (at Assets/Standard Assets/Archimatix/Scripts/Editor/Library.cs:108)
    AXEditor.ArchimatixEngine.createLibraryFromJSONFiles () (at Assets/Standard Assets/Archimatix/Scripts/Editor/ArchimatixEngine.cs:632)
    AX.Library.loadLibraryMetadata () (at Assets/Standard Assets/Archimatix/Scripts/Editor/Library.cs:211)
    AXEditor.ArchimatixEngine.Init () (at Assets/Standard Assets/Archimatix/Scripts/Editor/ArchimatixEngine.cs:581)
    AXEditor.ArchimatixEngine.Update () (at Assets/Standard Assets/Archimatix/Scripts/Editor/ArchimatixEngine.cs:848)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:191)

    Edit:

    I fixed the bug!

    The issue was with the "getLibraryPath()" method in Library.cs at line 238. It replaces "Assets" in folder name "Standard Assets" when Archimatrix is placed in that folder. Instead, you need to only replace the first occurrence of "Assets" in the directory. Here is the code that fixes it.

    Code (CSharp):
    1.         public static string getLibraryPath()
    2.         {
    3.             ArchimatixEngine.establishPaths();
    4.  
    5.             return Application.dataPath + "/"+ ReplaceFirst (ArchimatixEngine.ArchimatixAssetPath,"Assets/", "")+"/Library/";
    6.         }
    7.  
    8.         public static string ReplaceFirst(string text, string search, string replace)
    9.         {
    10.             int pos = text.IndexOf(search);
    11.             if (pos < 0)
    12.             {
    13.                 return text;
    14.             }
    15.             return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
    16.         }
     
    Last edited: Dec 31, 2018
    atmuc, awesomedata and wetcircuit like this.
  10. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Yes, he's legit.

    His nodes are advertised on the archimatix official forums. He's been around since the beginning of AX and was the first (and only one) to create and manage custom nodes / plugins for Archimatix.
     
  11. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Aside from deformers, Archimatix is not so adept at organic stuff (maybe lofting + 3d splines could help with that one day), and no scattering models across a surface (though I too wish this was a thing in AX -- I could scatter rock prefabs on a wall, for example, to make it more "textured").

    Archimatix is (sadly) even worse at randomization -- especially of the procedural (or programmable) variety. :(
    To alleviate some of the issues with a lack of randomization, the custom nodes/plugins by the 630Studios author can help to some extent, though the nodes often tend to get broken by subsequent AX updates (their author tends to get them fixed within a day or two though, so it's a non-issue to me), but these can help. Additionally, that author seems quite responsive about feature requests too, so that is a point in his favor in my book..
     
    eelstork likes this.
  12. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    Happy New Year to you all, Are you aware of a way to use a deform tool to taper a mesh (In my case a Lathe operation) but in one axis only? I can use the TaperDeformer but he result is a taper in both X and Y. Any Suggestions welcome. Thanks
     
  13. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Hi @eelstork - thanks for your questions.

    1 - Archimatix leans toward an architectural bias. to be sure. However it can do curved surfaces through PlanSweep and the Deformers. For example, AX could create the green islands depicted in your image, as well as some of the vegetation.

    You can currently scatter items on a Unity Terrain using the Repeaters in combination with the JitterTool. AX cannot currently scatter on meshes, but this should be relatively easy to add to the Repeaters.

    I would like to add rule-based mesh generation and replication at some point, including L-systems.

    2 - If you delete the generatedGameObjects object under the AXModel in the scene Hierarchy, then the models generated by AX will not be in your game distribution. You can force them to be regenerated on Awake in your scene by calling myAXModel.autobuild (); In this way the download will be smaller and all the meshes will be generated on the player's machine.

    3 - Yes, the full source is included, though we still need to publish an API, you are welcome to examine the code. You can also create custom nodes. Check out the SpaceshipShop WebGL runtime example. The source and scene is included with AX in Archimatixs/Scenes Runtime/SpaceshipShop. There is some documentation on runtime AX here and here.

    4 - I am developing AX on a 2015 MacBook Pro and it handles scenes with 200K tris well. If you really meant 200,000K i.e., 2 million, it depends on how many nodes are in the graph. For example, a single Cube node fed into a GridRepeater can generate 2 million tris and perform as well as an imported 2 million try model in Unity. However, if your graph has 300 nodes, then drawing a parameter will be slower, since AX has to process all those nodes in realtime. Once you are done editing, you can Stamp or Prefab the model, which strips all AX out of it and then in that case it would perform like any other model in unity. The auto build is relatively fast so that on scene load and Awake, the model would generate quickly even if it has many nodes, it just might have issues while sliding a parameter value in runtime.
     
  14. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Hi @BenWoodford - yes, you can edit the Turtlescript via script. Alternatively you can have the Turtlescript fixed and alter its parameters via another script.

    You might also consider using the Repeaters2D with the JitterTool node. That makes things like this:

    image.png RandomWindows.jpg
     
    photonic, Eva-Dragonflame and Flurgle like this.
  15. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    Good to know thanks. I assume I can somehow tell Repeaters2D a number to repeat by and then can I somehow hook into the JitterTool to place these holes exactly? As that's what I'm really after - being able to specify the exact positions of the holes and not have them be a fixed quantity, size or rotation.

    On another note, is there at all any way I could have objects react to being near other Archimatix objects? Like say if you had two walls and they ended up touching somehow, they would flow nicely as one wall with a bend. Or is it better to instead draw all the walls out as one big mesh if I want that?
     
  16. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    No, the jitter tool is random. You can set some tweaks, but you can't manage specific values of lots of objects in a group (at least without making tons of nodes). I have suggested this ability multiple times to @roryo (in the form of managing tons of instances of a particular grouper), but he hasn't created an interface for this type of thing. You'll just have to take what the jitter tool gives you. :(

    Regarding the second thing..
    That is traditionally done via bool union of 2d shapes. Without it being 2d first, much of the magic is lost.
    I've suggested a way to better manage wall shapes with complex surfaces and junctions by cutting out sections of a wall via a bool difference operation to grant me the ability to manually insert mesh parts in certain areas of the mesh so I can get the benefits of AX alongside the precision of traditional mesh modeling in particular areas of my AX models (again, by cutting out part of the generated mesh with a 2d difference and inserting a new mesh as a prefab in place of all the 2d Boolean cuts simultaneously -- the ability to tweak the prefabs generated after the fact would allow one to rotate or swap them out if desired, via a channeler node).
    My prayers have yet to be answered. :(
     
    Last edited: Jan 7, 2019
  17. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    A single AX graph can be organized into multiple meshes. I put together a video of "tips for parametric modeling" that talks about some of these concepts – how AX organizes its runtime models, etc.

    Your design can use co-ordinated multiple AX models, controlled through scripting and parameterizing, but the essence of your question is confusing the runtime AX graph with the resulting meshes:

    You can have a single graph that is massively complex, and builds an enormous multi-mesh model.
    ~ OR ~
    you can have small simple graphs that act like tiles with parameters designed to make them "fit" to the adjacent models (all controlled by script).
    ~ OR ~
    you can use AX as a modeller, and build static prefabs that use another Unity system (dungen generator, etc) to place the appropriate game objects.

    In actual use you might resort to all 3, depending on what is convenient and what you need to control.
     
    photonic likes this.
  18. iddqd

    iddqd

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

    I'm digging into Archimatix and I've read several times that it's possible to update the turtle script at runtime, however since there's no "Runtime" checkbox for the turtle script inside a shape and I haven't been able to find an example in your manuals/website, could you please tell me how this can be done?

    Thank you!
     
  19. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    I May have an update, Anyone who would be interested in such a tool pls let me know
     
  20. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    I just added the ability to isolate and edit the TaperDeformer separately in the X and Z axis. This will be in the new AX build submitted to the assetstore in the next couple days. :)

    Taper.gif
     
  21. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Quite useful. Thanks, @roryo.


    This got me thinking -- Is there any way you could offer the option to have the "cap" at the top of the shape take on a seamless UV projection (so that it would account for the taper?)

    I've also been thinking... it would be really useful to scatter prefabs across the surface of the cap or wall randomly too and either let GPU Instancer (or something of the like) do the drawing for them or integrate them into the mesh for a single draw call (whichever the user prefers).
     
    roryo likes this.
  22. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Just submitted version 1.2.0 to the asset store. It has the new TaperDeformer controls and that big optimization I mentioned a while back. It should the store in the next day or two. :)
     
    iddqd and gferrari like this.
  23. iddqd

    iddqd

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

    I noticed the other day that you only show the last release notes on the asset store, I think you should show the full log on the asset store - otherwise prospective clients can think that it's only been updated once since the release. The full log shows that this asset is actively developed.

    Also, do you perhaps have a short line of code for me regarding this one :)
    https://forum.unity.com/threads/arc...y-awards-finalist.330869/page-60#post-4073551

    Thanks
     
  24. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Thanks for the suggestion, @iddqd - I think the asset store only displays the most recent release notes. I checked other assets and this seems to be the case. I think it would be great if the store listed several recent release notes.

    Here is an example of how you might alter a node's TurtleScript at runtime. Let's say you have a Shape named "Rectangle_01" whose TurtleScript you would like to alter at runtime.

    Archimatix 2019-01-14_10-40-36_PM.jpg

    If you create a reference to an AXModel in your script, then you can get any node (AXParametricObject) or AXParameter by name string. Be careful that your node has a unique name, since AX does not require unique names. ;)

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System.Text;
    5.  
    6. using AX;
    7.  
    8. public class ReplaceTurtleScript : MonoBehaviour {
    9.  
    10.     // A reference to the AXModel component
    11.     public AXModel model;
    12.  
    13.     // The name of the node
    14.     public string shapeName = "Rectangle_01";
    15.  
    16.     // the node (or AXParametricObject) that will get the modified TurtleScript.
    17.     AXParametricObject m_shape;
    18.  
    19.     // Use this for initialization
    20.     void Start () {
    21.  
    22.         if (model != null && ! string.IsNullOrEmpty(shapeName))
    23.             m_shape = model.parametricObjects.Find(x => x.Name.Equals(shapeName));
    24.  
    25.     }
    26.  
    27.  
    28.     public void setNewTurtleScript()
    29.     {
    30.         if (m_shape != null)
    31.         {
    32.             // We could grab turtle script from in-game TextField
    33.             // but for this example, let's create a new script here...
    34.  
    35.             StringBuilder sb = new StringBuilder();
    36.  
    37.             sb.Append("mov 0 0");
    38.             sb.Append("dir 0");
    39.             sb.Append("fwd len");
    40.             sb.Append("left hgt");
    41.             sb.Append("back len");
    42.  
    43.             // TurtleScripts are stored in the "code" field of an AXParametric Object (which is a node)
    44.             m_shape.code = sb.ToString();
    45.  
    46.             // Be sure to let AX know the model has been altered...
    47.             model.setAltered(m_shape);
    48.  
    49.             // Re-generate
    50.             model.autobuild();
    51.  
    52.         }
    53.     }
    54. }
    55.  
     
    Last edited: Jan 15, 2019
    wetcircuit likes this.
  25. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Version 1.2.0 has hit the asset store!

    In addition to the mega optimization and the new TaperDeformer feature, at the bottom of the righthand node menu you will see some experimental nodes. None are really worth a look yet, except for the one at the very bottom, which is working for the most part. It is the ShapeDeformer:

    ShapeDeformer.gif

    In order to get the above result, you have to make sure that you open the Input Shape on the ShapeDeformer node and increase the subdivision parameter. ;)
     
    wetcircuit and Flurgle like this.
  26. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Wow, thank you very much for that piece of code!

    I guess you would have to just put all release notes into the field, like Map Magic for example: https://assetstore.unity.com/packages/tools/terrain/mapmagic-world-generator-56762
     
    Last edited: Jan 16, 2019
    roryo likes this.
  27. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Here is an early take on the new Winwall node:

    Winwall1.gif

    Unlike the PlanRepeater, here the openings are automatically cut into each wall segment. This means that the texture is seamless across the length of the wall.

    The next step is to add a variety of ways for one to define the window shapes and patterns. Also to add doors and interior wall material as different from the exterior. :)
     
  28. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Nice!

    I was wondering, is it possible to use a texture (besides an svg) or a rendertexture as parametric input somehow? Such as using black lines on a white background?
     
    chelnok likes this.
  29. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    While playing with the WinWall node, I realized I wanted to change the Plan for the building and almost found myself reconnecting the new Plan Shape to all the downstream nodes that were using it. Then I remembered the ShapeDistributor node and how it inserts itself, automatically grabbing all the original shape's outputs to create a single input for swapping various Plan Shapes in.

    I made a short new tutorial and added it to the ShapeDistribuor's manual page.
     
  30. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    @roryo I have a bug that I've been forgetting to tell you about involving the plan repeater node. :oops:

    This test was done in ver1.1.9
    Plan Repeater Bug.gif

    Interesting enough if the Inset is set to 0 in the plan repeater, the bug should not appear. I still had a copy of AX ver1.1.4
    and I was able to reproduce the bug there too.The bug is still present in the current ver1.2.0b3 of AX.

    Also, ver1.2.0b3 has a new bug when duplicating a grouper node. If you place any nodes that are connected inside a grouper node, then duplicate it, all connections inside are then lost in the new copy. :eek:

    There's a couple more minor bugs I have found, but that'll be for another post. :D :)
     
  31. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Thanks, @JLO - I can reproduce this. Fortunately an easy fix! :)

    Looking into the Grouper bug now...
     
    JLO likes this.
  32. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    Awesome!! :)
     
  33. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    Finally grabbed the asset and so far I'm loving what I can do with it.

    However... how do I set a material from C#? The material field on MaterialTool is the only one I can't expose as a runtime parameter it seems.
     
  34. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Hi @BenWoodford - welcome aboard!

    The Material field on the MaterialTool is not an AXParameter like those listed in Transformations and Controls. Rather, it is a property of an AXParametricObject (a node on the graph). If you get a reference to the MaterialTool node in your C# script, then to can set the it's AXMaterial, which is an object that has references to a Material, a PhysicsMaterial and a couple other items that are inherited through Groupers and upstream nodes, etc. For your purposes, you may just need to set the AXParametricObject's axMat.mat.

    If you give the MaterialTool node a unique name, it is easy to get a reference to it:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System.Text;
    5.  
    6. using AX;
    7.  
    8. public class SetMateriaAtRuntimel : MonoBehaviour
    9. {
    10.     // A reference to the AXModel component
    11.     public AXModel model;
    12.  
    13.     // The name of the node
    14.     public string materialToolName = "MyMaterialTool";
    15.  
    16.     // the node (or AXParametricObject) that will get the modified TurtleScript.
    17.     AXParametricObject m_materialTool;
    18.  
    19.     // Use this for initialization
    20.     void Start()
    21.     {
    22.         // Get a reference to the MaterialTool node (aka AXParametricObject) based on a unique node name string.
    23.         if (model != null && !string.IsNullOrEmpty(materialToolName))
    24.             m_materialTool = model.parametricObjects.Find(x => x.Name.Equals(materialToolName));
    25.     }
    26.  
    27.     public void setMaterial(Material mat)
    28.     {
    29.         if (m_materialTool.axMat == null)
    30.             m_materialTool.axMat = new AXMaterial();
    31.  
    32.         m_materialTool.axMat.mat = mat;
    33.  
    34.         // Reconstruct the inheritance of materials throughout the graph.
    35.         model.remapMaterialTools();
    36.  
    37.         // Be sure to let AX know the model has been altered...
    38.         model.setAltered(m_materialTool);
    39.  
    40.         // Re-generate
    41.         model.autobuild();
    42.     }
    43.  
    44. }
    45.  
     
    Last edited: Jan 22, 2019
    EnriquePage91 likes this.
  35. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    This bug has been fixed. :) The fix will be in the next release.

    Per the copy Grouper bug, this may be expected behavior. Once an object is placed inside a Grouper, it is encapsulated. Although a relation to an outside node is maintained when dragging an object into a Grouper, that copies of that Grouper are not related to the outside object. I could add functionality to allow the relations to be duplicated as well. Perhaps provide a "Duplicate with External Relations"?
     
  36. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    Great!! :)

    Regarding groupers, this is how they behaved in previous versions. This test was done with v1.1.8 and all node connections are maintained. :D

    gif1.gif

    gif2.gif

    In the latest v1.2.0b3 this is whats happening. :eek:

    gif3.gif

    gif5.gif

    gif4.gif

    I don't think this behavior is what should be expected. Also, all test were done in Unity v2018.3.2f1, but the bugs should be reproducible in earlier version too (maybe with slight variations of severity). I hope my examples better illustrate the problems I'm seeing. :)
     
    awesomedata likes this.
  37. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    Also, I just found a bug involving mesh repeaters in v1.2.0b3. Simple setup: extrude a shape plan, connect mesh output into any mesh repeater (and in any mesh input port), then duplicate the mesh repeater. You'll notice that in the new copy the plan shape has been disconnected and this warning appears.

    pic1.PNG
     
  38. eelstork

    eelstork

    Joined:
    Jun 15, 2014
    Posts:
    221
    @roryo I'm sorry for the late reply. I want to thank you for all the useful information provided here and I look forward to trying Archimatix. But for my current project I sensed (as you confirmed) that being biased towards architecture this could be an awkward choice - I would prefer trying Archimatix in a better context so I'll have a good first approach of your asset!

    Just a note, as this would be useful regardless of what I'm trying to accomplish - I see the potential to generate objects at runtime without the storage overhead of pre-generated objects. But having to manually delete objects before each build is a bit clunky, even if that could mean just press a button to invoke a script that will do the clean up before a build.

    So, in your opinion is a pre-build hook missing from Unity, that would allows us to completely automate this?

    On a different note I made significant progress towards organic generation, so if it's something you'd like to push we could talk about it sometimes.

    Keep up the good work! Looking forward to working with Archimatix.
     
    Last edited: Jan 27, 2019
    awesomedata likes this.
  39. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Please don't forget about this one!


    Also, the Winwall feature looks incredibly promising!
    Three questions:
    1) Can the walls use any 2d shape to punch the hole?
    2) Fancy gothic extrusions and tapers for the window sills... Are these possible too?
    3) Window distribution -- Is it possible to ensure windows can be set to a certain number or ratio across a particular wall?
     
    Eva-Dragonflame likes this.
  40. photonic

    photonic

    Joined:
    Dec 29, 2012
    Posts:
    47
    I use those tools and they are really great!
     
    awesomedata likes this.
  41. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Thanks for posting these helpful GIFs, @JLO. I can reproduce this and am working on a cure!
     
    JLO likes this.
  42. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    1) Yes, you will be able to add any 2D shapes.
    2) the hole shapes can be used as the plans for molding extrudes with any crossection shape.
    3) Yes, the repeaters take each wall-segment length as their input to make a unique pattern for each wall.

    When the extension of WinWall, called Roomer, gets going, the doorways between rooms will have a similar behavior with moldings sections defined per Room.
     
    Eva-Dragonflame and awesomedata like this.
  43. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    In the meantime, the workaround is to use the keyboard shortcuts for copy and paste, which works. ;)
     
    JLO likes this.
  44. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Ok - these two bugs have been fixed! They should be in the build posted to the AssetStore in the next couple days. :)
     
    JLO likes this.
  45. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    @roryo Great!! Thanks for the update :)
     
  46. morphinegames

    morphinegames

    Joined:
    Mar 13, 2015
    Posts:
    33
    Hi everyone! I'm new here but I have been following this project since it started and I finally have a game that I can use it on. I wanted to let @roryo know about a few little things that I ran into as well as a tweak I did to improve performance

    Unity 2018.3.0f2
    Beefy rig with 8 core, 32GB ram, and GTX 970 (not the latest granted but has never given me issues with any games/Unity)

    I already had a project setup with my normal core assets (e.g. DOTween, PostProcessing V2, etc.) and had built out a terrain and did some post processing work. I added Archimatix to my project and immediately (before even adding a model to the scene) my startup time when pressing Play went from 1 second to about 4-6 seconds.

    I did a lot of forum digging and basically found that it was due to Archimatix loading the library, the way I solved this was, you guessed it, to basically delete all of the library assets that I didn't want and then Refresh it. This solved the major startup time issue for me and I wish there was a better way to handle this because I iterate a lot and that extra 4 seconds starting up is a pain.

    The second issue I noticed was that there was still an extra 1-1.5 seconds when pressing Play that wasn't there before (still before adding any models to the scene). I was able to solve this by right clicking the root Archimatix asset folder and using Create > Assembly Definition. If you are familiar with Unity you will know that this puts the Archimatix stuff into its own assembly which will only be recompiled if you change Archimatix. This helped but I had to tweak one file in order for it to work:

    In AXUtilities.AXGetType method I had to modify the code adding a check to see if the assembly name contains Archimatix (since it will now be in its own assembly).

    Code (CSharp):
    1. //foreach( var assemblyName in referencedAssemblies )
    2.         foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
    3.         {          
    4.        
    5.             if( assembly != null && (assembly.GetName().ToString().Contains("Assembly-CSharp") || assembly.GetName().ToString().Contains("Archimatix")))
    6.             {
    7.                    
    8.                 foreach (Type t in assembly.GetExportedTypes())
    9.                    {
    10.                     if (t.Name == TypeName)
    11.                     {
    12.                         //Debug.Log("***** ****** *****>>> " +TypeName + " -- " + assembly.GetName());
    13.                             return t;
    14.                         }
    15.                    }
    16.              }
    17.         }
    This solved my major issues and now I can iterate as fast as I need.

    Love the product by the way - the ability to parametrically control objects at runtime is exactly what I needed for this game. I will come back and post a link once the game is on itch

    Have a great day everyone!
     
    awesomedata, eelstork and wetcircuit like this.
  47. eelstork

    eelstork

    Joined:
    Jun 15, 2014
    Posts:
    221
    @morphinegames wouldn't incremental compilation solve some of the issues you encountered? I'm sore with startup delays - so much so that I'll end up scripting at runtime or something.
     
  48. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Robot Kyle isn't sure how livable this thing his, but he is thinking the rent can't be all that high...

    Archimatix 2019-01-29_01-54-40_PM.jpg

    Working on cleaning up some of the Deformers code today. ;)
     
    Hitch42, DasBiot, awesomedata and 2 others like this.
  49. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Thanks for these optimization suggestions, @morphinegames! I will see if I can get AX to stop trying to reload the libraries when entering Play mode. Also, if you don't mind, I will look at adding your modification to AXUtilities.AXGetType. :)
     
    morphinegames likes this.
  50. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,479
    Originally I was thinking scatter would be an option on the the currentRepeaters. While this is still the case, I am also thinking there should be a dedicated ScatterRepeater. ;)
     
    awesomedata and wetcircuit like this.