Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,245
    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,245
    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
     
    P_Jong, Flurgle, gferrari and 6 others like this.
  3. Nevercallmebyname

    Nevercallmebyname

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

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    655
    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:
    171
    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:
    13
    Last edited: Jan 1, 2019
  7. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    16
    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:
    132
    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:
    111
    @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
    awesomedata and wetcircuit like this.
  10. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    655
    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:
    655
    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:
    18
    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,245
    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,245
    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
     
    Flurgle likes this.
  15. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    16
    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:
    655
    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:
    853
    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.
     
  18. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    308
    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:
    18
    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,245
    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
     
    ArneStudio, awesomedata, JLO and 2 others like this.
  21. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    655
    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,245
    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:
    308
    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,245
    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 at 3:43 AM
    wetcircuit likes this.
  25. roryo

    roryo

    Joined:
    May 21, 2009
    Posts:
    1,245
    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:
    308
    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 at 7:34 PM
    roryo likes this.