A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by roryo, Jun 4, 2015.
nice, will look into that
Archimatix has been selected as a Finalist in the Tools category for the Unity Awards!
You can help push AX over the finish line: cast your votes here!
SO EXCITING…. I voted!
So I've been working to integrate parametric models with DunGen by using a system to apply randomized values to the model.
However, my testing always results in the model in its default format.
This is the code I use to instantiate the model and randomly assign the values.
The BoxRoomAxController is generated using the Runtime controller generator provided by AX models when you expose variables.
I'm not sure what I'm doing wrong here, and the runtime guides on the Archimatix site don't reflect this Runtime controller, so perhaps I'm approaching this using the wrong tools, but I wanted to check with the community first.
var axModel = UnityEngine.Object.Instantiate(model.axModel);
var doorCount = model.doors.GetRandom(random);
var controller = axModel.gameObject.GetComponent<BoxRoomAxController>();
controller.BosRoom_Length = model.roomLength.GetRandom(random);
controller.BosRoom_Width = model.roomWidth.GetRandom(random);
var doors = Math.Max(model.doors.GetRandom(random), 1);
var openDoors = new List<int>();
while (openDoors.Count != doors)
var door = random.Next(0, 3);
for (int i = 0; i < 4; i++)
if (openDoors.Contains(i)) continue;
controller.BosRoom_NXDoor = false;
controller.BosRoom_XDoor = false;
controller.BosRoom_NZDoor = false;
controller.BosRoom_ZDoor = false;
Here are some screenshots of the system in Unity;
As you can see, the models are all in their default format. If I hand edit the values I'm changing at design time, everyone responds as expected.
This solution isn't quite accurate for how dungeon works, but I would at least expect a different shape for each gen run.
If I set instances to greater than 1, right now this locks up and fails to generate, but it would be expected that setting instances to greater than 1 would generate multiple different shapes/layouts of this tile.
Any tips on what I'm doing wrong would be greatly appreciated.
You are creating an instance of the axModel. You are also referencing the controller script on the same axModel.
If you want to change the instance of the axModel you will need to reference the controller script on the instances, not the original, or you will need to alter the original, then instantiate it after making your changes.
I also wanted to say VERY VERY cool idea! I thought of something like that myself but just have not had the time to get to it. Glad to see other people doing creative mashups with AX and other plugins!
So are you saying I should Stamp it and modify the controller on the stamp?
Actually i misread your code. I thought you were instantiating a copy of the model, while still editing the original, which would be why you were seeing no changes. But i do not think that is the case, i think i misread.
The only i can think now is that you are creating instances and manipulating them immediately after. I'm not sure exactly when an axmodel sets it default values, so it could be that by creating the instance and using the controller in the same frame is causing the issue because the axmodel has not fully loaded and is over-writing your values with its default values, maybe...
I was recently thinking about if and how integrating these two would be possible. Very neat. Good luck!
My approach is to generate tiles from models, and inject those tiles into the runtime generator.
The tile injection is actually fairly simple overall, I've used this approach with other procedurally generated tiles utilizing SabreCSG and ProBuilder and it worked well, the mesh generation was overall too costly which is why I continued to try again with Archimatix, which has some really awesomely fast mesh generation.
I think this will work great if I can get the parametric model gen working as needed. I think I'm close I'll show a few shots once I got it working.
Just wanted to let you know that my latest free package for Archimatix is now available on the asset store. If you use Playmaker you will want to check out Archimatix Playmaker Actions. It features several Archimatix specific playmaker actions that allows you to access to the runtime capabilities of AX.
And for all of you who are new to Archimatix since the sale and may have missed my previous posts, don't forget to check out my other great packages.
A few free sample nodes that are very handy all on there own.
Nodes that deal with shapes, and give you the ability to "program" in the ability to create list of shapes, and dynamically select shapes from those lists.
Mesh & Material Nodes
Nodes that deal with mesh's and materials. These nodes currently primarily focus on giving you the ability to create list, and list of list of both mesh's and materials allowing you to program in dynamic choices in to your models.
Pro Tools & Nodes
Oh man, there is lots of cool stuff in this one. I'm actually going to leave describing this one up to the review left by @wetcircuit as she did a better job describing this package then myself.
Spoiler: Wetcircuit's Review
ARCHIMATIX PRO TOOLS & NODES is different because it adds "box breaking" nodes to Archimatix. Ax models use internal node logic but node wiring is silo'd. Pro Tools & Nodes get different Ax models communicating with each other, either sharing variables pier-to-pier with the Instance Node, or across all models using the Scene Parameter Node. Ax models can now have nested inter-communicating prefabs, or instances can be updated across a scene. It's runtime Ax on steroids!
Command Node makes conditional logic possible by switching on/off blocks of code. It's the script equivalent of 630Studio's Shape Logic and Mesh & Materials plugins.
SVG-to-Turtle Node makes importing line art as simple as a few clicks. Vector logos and text, or CAD artwork (floorplans!!!) imports as a 2D shape node. You can break up the SVG and extract the lines for compound shapes separately, giving you more control in the Ax graph.
For me the SVG import was a long-anticipated must-have, but the potential for even smarter-er runtime models using nested prefabs could make Archimatix rival dungeon generators and city planners.
Hope everyone enjoys the nodes. Feedback is always appreciated.
I was going to ask about your Ax Playmaker package today… LOL! Glad they are available for everyone!!!!
(Someday I will be remembered for my long-winded Asset Store reviews….)
So I was able to get this working, there was a series of bugs and I do think that the script execution order / initialization issue was part of it. Once i got into the details I found some other bugs which were causing unexpected infinite loops in places they shouldn't have been.
Now I have the parametric models generating randomized tiles for injection into DunGen, it works great.
Next I actually need to turn the whole thing on its head an do Doorway generation first, and fill in the art with Archimatix after DunGen has built the layout.
The reason for this is that I would like to have Archimatix build full walls, rather than have dungen fill in unused doors. Simpler Geometry, means less costly rendering, and the more level I generate the more that will matter!
In my mind what I really want to be able to do is integrate DunGeon into my Archimatix models, but after some experimentation, the design of Archimatix really doesn't lend itself to that.
It would ideally need to do multiple passes on generation, or have steps like , generate a set of tile bounds and the Doorways for DunGen, have DunGen do its layout, hand back off to Archimatix to fill the tiles with floor plans and meshes, and then finally send off handling to a populator to fill the dungeon with content.
After I get home from work tonight i'm going to attempt to do this flip on the head maneuver, and hopefully not break my neck in the process!
I'll toss up some screenshots for everyone once I make it look like I'm not completely artistically challenged ^.^
I think something similar is on the long term roadmap of archimatix, along with organic mesh. But if you can turn that into an asset I'll buy it.
That's a cool plug in . there are two questions want to consult from you :
Does currently Archimatix support measure function as Attachment "Furniture" below ?
Has Archimatix has ability to Animate , such as "Furniture" Picture below , you can see the door can Animate to move away from main part , so that's let us to see the inner structure of the furniture and also let us see the measure length of some important edges.
Hope from your answer , if currently Archimatix can support these two features, any tutorials ? if not , does there any plan to support these features ? i think from some architect perspective , these two features are so important from design.
@PassivePicasso - this projects sounds really cool! Looking forward to screenshots!
Hi @xj1982xj - AX does not currently feature dimension lines, but this is a great idea. Per the operable door, coming very soon is the ability to add any behavior you have scripted to any node. For the node that creates the door, you could add an "OpenDoor" behavior so that each time the model is regenerated, the door will have this behavior added. In the case of animating parameters, e.g., the door size changes over time, you can now connect playmaker actions to Archimatix parameters, an effort eased with @RuinsOfFeyrin's plugin (noted above). Also, @wetcircuit did some mesmerizing experiments of animating Archimatix using Playmaker.
Hi Archimatix , thank you for your quick reply , hope to see the dimension lines measure function in further version. ( i think it's so important for architecture design , it's even better if the measure line can display at runtime just as the picture show) .
@roryo Would it be at all possible for me to do a multi-pass setup with Archimatix and DunGen?
What I'm thinking is it would be really great to be able to have something like this;
First I create a series of Tiles for DunGen, which are blank GameObjects with a few Doorway GameObjects inside them to establish the bounds and connections.
Second after DunGen has created a layout, I feed this information into Archimatix to create a 2D Shape, for example creating a Rectangle for each Tile, and merging them into one large Shape.
After that it'd be business as usual for Archimatix, but can I get to this step at all?
With runtime scripting, proxies, and "smart" models…, yeah. You can do just about anything.
DunGen works on a grid and has a set number of allowable doors per tile, so you are talking about providing a way for your "door" proxies to tell a smart Ax room where to position it's door markers, and which edges get a wall, where are stairs, etc….
How exactly you breakdown which controls what, is up to you.
I think dungeon architect do but not dungen, the latter spawn room from connector until they don't overlap, so room can be freeform ... I think.
DunGen doesn't actually work on a grid. The way DunGen works is you create a GameObject and inside that GameObject you place any number of GameObjects with a Doorway Component attached.
As long as those Doorways are on the edge of the bounding box, DunGen can use them to connect tiles together.
DunGen will then attempt to build a dungeon using sets of TileSets you've created and will add a tile, then attempt to add an additional tile, aligning to one of the doorways already available. If any bounding box intersects the new tile, its abandoned and it tries again.
I'm sure its a little more sophisticated than that, but that's the basic idea.
Oh sorry, you are correct! DunGen also works on doors but no tile grid. My bad.
Anyway it's the same gist. The dungeon randomizer places proxy objects, Ax reads them and adjusts in some way (or vice versa)…. Just about anything in an Ax runtime model can be switched on/off or repositioned or scaled… Both can instantiate prefabs…. I'd imagine you'd use the dungeon to create the big picture layout while Ax handles the structures on a room-by-room basis, but it could also be the reverse, with Ax placing the doors….
But is it possible to build a Shape (I specifically mean a Ax Shape for a model) from a resulting DunGen Layout?
To me that is the ideal option, as then Ax can do a single pass construction of the geometry, rather than many smaller passes.
Break it down into variables. Make a list of what DunGen places (ie: doors, etc). In your Runtime Ax you will have the same ideas represented, ie: not just a door mesh, but the door cutout, the wall frame for the door, the AI for the door, etc etc…. The info will be passed as Vector2, boolean, float, etc…. Your Ax model will have extra nodes that sometimes don't instantiate because they aren't activated….
Your "big" Ax model can also instantiate other prefabs., so for example, within city walls are various sections of the village, within this section are several types of building, etc etc….
Yes, it can be done. As you get further along, you will decide if you really want one ginormous self-contained Ax model or (metaphor) something like a "tea tray" that holds many prefabs.
Yes, you could in theory do this assuming you had all the data and dimensions about the dungeon gen layout. However, I dont think this is the route you want to go. If you created one giant shape the game would have no way of not rending meshes it couldnt see because they are all part of one giant mesh.
Most dungeon generators, and tiles for building dungeons are built out of smaller sections 1) to allow customization but also 2) to allow the game engine to properly ignore parts of things that are not visible and not waste time rendering something that you cant see.
That is an excellent point, I didn't think about the ramifications of generating a model like that.
I'll continue with the path that I'm on then, I think I'm making good progress but each time I've made it work, I go and make a big change and make everything fall apart... My code is very brittle at the moment it seems.
Don't forget to post progress for the curious like me
@PassivePicasso - if you would like to join the slack.com site for AX, could you post your asset store invoiced and an email address to me in a private conversation here?
Hi, I just recently bought AX on sale and boy am I'm glad I did
Super super awesome asset!
I'm currently trying out different things and I stumbled across some artifacts when baking light. I am not sure if I am doing something wrong or it's a bug coming from Unity or Archimatix. The artifacts appear when baking Mixed Lighting. This example is lit by two point lights for each room, they are set to Mixed.
The first picture with the artifacts shows a stamped room, the second shows the same stamped room after exporting to FBX and dragging it back into the scene. The reimported FBX has "Generate Lightmap UVs" checked in the import settings and that seems to fix the problem completely. Both versions are in the scene side by side and baked at the same time. Both are set to static including child objects.
Does AX generate lightmap UVs in the second channel? I could only look at the regular UVs in Blender because the exporter I used only writes one UV map. The islands of the first channel extend far beyond the 0-1 UV space, but I don't know if that would be a problem. Am I doing something wrong or is that a bug? Thank you!
Hi @mbbmbbmm - Welcome aboard!
In the model Inspector, once you click "Lightmap Flags Enabled", a second option appears to Create Secondary UVs. Since generating secondary UVs is relatively expensive, it does not happen automatically. So each time you regenerate the model, you need to check this again before baking your lighting.
Wow, how did I not see that
Works fine now! Thanks again
Soo... I have some more questions. In your example with the two circles and their radii
ARCHIMATIX PRO: Node-based Parametri Modeling for Unity [Unity Awards Finalist]
how would I achieve a variable total width, i.e. how can I replace the 10 with the width of an Extrusion they sit on top of? It couldn't figure out how to get "third party" parameters into the reciprocal relation. Just using them in the expression gives an error. Do I have to set up some additonal parameters in a grouper or something like that?
My second question is somewhat related. What is the easiest way to let objects repeat along another object without gaps and without overlaps? Let me be a little more specific:
Say I have an extruded Rectangle (a box) that is my main object. I also have an extruded RoundedRectangle that is a quarter the width. First part of the question would be: how can I repeat it only along exclusively the front side of the box (positive z I think)? So there should be 4 small boxes in this scenario.
The second part of the question would be how to make sure there are never any gaps or overlaps between the repeated boxes. So that the outer sides of the outermost boxes are aligned with the outer sides of the big box and all of the repeated boxes sit flush against each other at all times.
Then when scaling the big box the desired behaviour would be that the repeated boxes should first scale or stretch a little and then another box should get added. Basically what the repeater does anyway but without gaps or overlaps. So they should have a minimum width and a maximum width and when that is exceeded another box should be added/subtracted.
Sort of like this:
I tried some stuff with cutting plans and PlanRepeaters but I didn't really understand what Bay Width and and Max Segment Length are and how they interact with each other and the Inset value... Also there must be a simpler way than cutting 3 sides off a Rectangle in order to get a line with a parametric length?
Hope that all makes sense, Thank you so much!
Hi @mbbmbbmm - great questions!
The example wit the two disk highlighted the bi-directionality of variable parameters. Relation expressions, for now, can only include the parameters on either side of the connection. For more complex relations, you can use a Grouper and edit custom parameter expressions. A Grouper in this case becomes a kind of module or sub model with its own interface. For example, the Grouper could be called "TwoGears" and become a library item that you use in various games or models. To this Grouper, you add all of the logic of the two gear system and its implementation can happen inside the Grouper (e.g., the Cylinder nodes). But the Grouper can be designed before you actually create the subnodes.
Once you have this interface working, you can relate the radius1 and radius2 to the two cylinder plans. the centerDistance parameter can be related to the TransX of one of the cylinders.
For each custom parameter, you say, what should happen to other parameters when I adjust this one.
For example, when I expand the centerDistance parameter, I see I can add expressions. It is here that I can decide, what happens when the distance between the two gears is modified.
Here the radii increase proportionally when the distance is increased.
If I modify the radius1Percentage parameter, I keep the distance the same, and alter the radii as well.
If I alter radius1, a number of things could happen. The distance between the gears could increase or the percentage could be changed. Here is the latter case:
Because the percentage is changed, its expressions are executed, changing radius2, so you don't have to re-enter that as an expression under radius1.
When any parameter changes, any number of expressions can be executed. Generally speaking, the parameter, whose expression it is is on the right side of the equation.
There is a more about parameter expressions in this in-progress tutorial.
Per your second question, you can relate the ActualBay of A Repeater's RepeaterTool two some parameter in the object being repeated.
Ooh yeah everything is starting to make sense! So that is how you compose more complex relations. And of course the linear repeater is what I was looking for. Thanks a lot!
Is there any chance of a more organized and coherent manual in the near future? There are some fantastic tutorial videos, and also some snippets of useful information on the site, but there also seem to be a lot of blanks (empty section headings or topics that just aren't covered altogether). You and many others in the community are great at answering questions in the forum thread (often with some great examples), but skimming and searching through 40+ pages is challenging.
The manual needs more development, to be sure. The questions asked here at the forum are invaluable for helping me to understand which topics should get treated first. I will make it a point to try to add a bit to the manual each day. I'd also like to put a latest posts widget on the front page of the site, so it is easier to find the newest entries into the manual. Finally, as @RuinsOfFeyrin has reminded me on one or two occasions, ahem, a threaded forum should also help so that people can more easily navigate to answers to questions that have been posted.
I have a package on the asset store, Shape Logic Nodes, which has a node in it called the Shape Splitter. This node takes a shape as an input, and generates an output for each segment in the shape. This allows you to grab any side of a shape that you would like and use it in your graph without having to worry about chopping shapes up, or using parametric relationships which depending on how the shape is setup and how complex it is, isn't the easiest thing to do.
There are a couple other nodes in the package you might find interesting as well.
I was always seeing your posts about your packages and wondering where they were. I know where they are now. I've put all of them into my favorites.
I would second the request for more documentation. As I'm finally getting to trying to implement this into my project I'm finding myself struggling to understand basic nodes that have blank pages on your site. For the non artistic/architect among us much of this is unintuitive in concept and difficult to master. I'll amazed at what it can do but just as amazed at how bad I am at it lol.
From a UI perspective, I'd like to request that the 'About' and 'Node Menu' elements be relocated to the top right (or better, top left) corner of the module. This would be more in keeping with standard UI design for operating systems and applications, and help make Archimatix easier to learn. This has got to be the third time I've learned, forgotten, and then spent a fair amount of time digging around for how to delete modules or save components. Unless you're really well-versed in the finer points of Archimatix, looking for things like drop-down menus or save/delete options below other module UI elements feels counter-intuitive and disorienting. I'd love to be more well-versed in AX, but I only get to spend a little time with it here and there between other projects (and then weeks before I get back to it), and since the UI doesn't really follow conventions and there's no reference manual I keep having to go back to square one. Months after purchase I'm still very excited about the power and possibilities of this great tool, but I still feel very much like a beginner.
Rory is holding out on us. He actually has forums set up already. Ive seen them! That's actually where he has robot kyle locked up so he doesn't want to let us in. (You all have noticed we haven't heard from robot kyle lately right?)
I was lucky enough to be on the original Beta for AX back in May last year, and for some reason I got fascinated with using it to create "non-linear" mazes, kind of inspired by Pacman but with an Alien theme.
Fast forward a year and AX has helped me to create the maze in Chasmic Rush which I think is probably the longest maze in video game history - I could not have done it without Archimatix and I am truly thankful that all of Rory's work has enabled me to create something which I believe is genuinely new.
I believe the Tectonic Chasm (maze) offers players a unique challenge over and above "Infinite Runner” style games, because it is carefully designed in a way that balances out positive and negative space which makes it more interesting to play.
Hope you like the video!
That is so (insert lots of expletives) cool!
I tried a beta of Chasmic Rush this past weekend and I think it is going to go far. Very addictive. Also very beautiful!
Congrats, @puzzlekings and can't wait for this to hit the app store! And keep sending betas!
@christougher and @trilobyteme - thanks for the gentle nudges on the docs. I have already gotten started on my new page-a-day goal with a new node page on ShapeMerger.
Any request for a page to do tomorrow?
@puzzlekings - could you post a video of a bit of game play for Chasmic Rush?
Nice idea on moving the node palette menu, @trilobyteme. I'd also like to add it as a contextual menu for the node palette.
Is there a page dedicated to expressions?
Both between parameters on nodes, and a parameters own sub expression?