BILT Speaker

BILT Speaker
RevitCat - Revit Consultant

Wednesday 14 August 2013

Mona Lisa's Eyes Follow the Revit Camera Wherever it Goes

Using Adaptive Components to make Mona Lisa's whole face follow you around the room


Have you ever wanted to make all your 2.5d trees or people face the camera in a perspective view in Revit?  No?  Well I'm going to tell you how anyway - maybe it will help someone come up with new ideas of how to use this technique.

  • First create a new "Generic Adaptive Model" family;
  • Place two points along the X axis;
  • Select the points and make them adaptive;
  • Join the points with a reference line;

  • Set the workplane to be the vertical plane of the adaptive point (1) at the start of the reference lin, perpendicular to the line;

  • Alternatively you can pick the end workplane of the reference line itself;
  • Use model (or reference) lines to trace the 2d outline of a person;
  • Select the lines and create a form - an extrusion of the person outline;
 
  •  Select adaptive point 2, move it around to flex the family;
  • The person extrusion should remain perpendicular to the line, and it should rotate around to follow it (providing it was correctly associated with the work plane of point 1;
 

  • Return the adaptive points to the x axis location;
  • Add some model line detail (or more extrusions as desired), making sure that they are either hosted on the same workplane or on the form itself - in this case I have added a Mona Lisa face to make it more fun;
  • Flex the family again by moving adaptive point 2, to check that all geometry is correctly associated - in this case the face rotates but Mona Lisa's eyes will keep looking at you;

  • Now the Mona Lisa family is ready to use;
  • Load her into a project;
  • In this example I have created a series of arch doorways;
  • I have also created an object to represent the camera location - it can be any object, but the best thing would be to create a "camera family"










  • Place a Mona Lisa adaptive family - first point in the middle of an archway, second point snapping onto the camera object (important, it must snap to it)











  • Place a second Mona Lisa in the second archway, but snap its second point to the same camera object;
  • Place as many more Mona Lisas as you need, each sharing the same second point on the camera object;











  • Note how each Mona Lisa is slightly rotated, so that they are all looking at the camera object;
  • Now create a camera view, ensuring that the camera location is approximately the same as the camera object;
  • All the Mona Lisas will be facing the camera;
  • You might argue that her eyes would have been looking at the camera without rotating the whole body - true, but this technique will work for anyone other than Mona Lisa;  or for a tree or any other 2.5d (flat extrusion) entourage family;
















  • Create another camera view from a completely different angle;
  • The Mona Lisas will no longer be facing the camera in this view




















  • Check this out in plan view too - they are all still facing the first camera location;
  • Right-click on the second perspective view in the Project Browser, and select "Show Camera" to see where it is in plan;
  • Place a marker - eg a cross in plan;
  • Move the camera object to the new camera location;
  • All the Mona Lisas should rotate together to face the new camera position

This may seem like a clunky workflow, but once it is set up all it requires is a single move of the camera object to each view location - so its not going to work if you have several views on one sheet.

Of course all the people don't have to look the same - they just need two adaptive points to work.  Each person could have a parameter for a small rotational adjustment within the family to give some variation - each one could face slightly away from the camera, but close enough not to get any side on views of extrusions.  This would ensure that the scene does not look quite so artificial.

There is an alternative method of placing the people - more on that next time.

I hope this helps someone out, or inspires some new method of improving presentation methods in Revit . . . .




Thursday 1 August 2013

Scaling Revit Families Nested in Curtain Panel Patterns

Credits First

This post would not have happened without discussions at RTC or blog posts by the following people:
What I am showing here is a development of all those ideas, combined with a concept that I came up with for my RTC presentation "Fractal Fun with Revit Repeaters" earlier this year - more on that at a later date.

How to trim the edges of a pattern of repeated scaleable Revit families

The image on the left above shows a repeated pattern of complex shapes within a regular rectangular boundary - relatively easy to achieve in Revit!  On the right the boundary has been trimmed, and the pattern gets trimmed with it - not so easy.
Add in the ability to scale the pattern elements and it gets a whole lot trickier. 

Kelvin Tam showed us how to nest a planting category family into another planting family and then nest again into a different category family - this allows us to use the ability of planting category to automatically scale any irregular shape without having to create complex formulas and controlling geometry (see link above).

David Light applied that technique to nesting planting categories into curtain wall panels to create arrays of scaleable science fiction monsters marching across the landscape.

Andy Milburn applied the same technique to creating Musharabiya screens out of curtain walls.  He noted that there was a limitation of not being able to trim the edges of the pattern because curtain wall panels won't be be cut.

To solve that problem I used Marcello Sgambelluri's technique of questioning which similar category or situation does Revit allow you to do what you want?  In this case I knew from my RTC presentation "Fractal Fun" research that Revit will cut the edges of curtain wall panel pattern families when applied to divided surfaces.  So we should be able to apply that principle here - the only limitation being that it must be done in the conceptual modelling or adaptive component environment.

Here is how to do it:
  • First start a new planting category family and create the desired pattern element within it - in this case a simple smiling face within a square (but it could be a complex geometric design).
  • Then start another new planting category family;
  • Load the first family into the second;  this is to make use of Revit's capability of automatically scaling plants and trees - it only works with nested families;
  • Start a new "Curtain Panel Pattern Based" family;
  • Place a dimension between two adjacent points; 
  • Make the dimension an instance reporting parameter 


  • Load the second planting family into it, and place it on the pattern.  You may need to devise a way to control the location of the component by hosting it on specific points
  • Select the planting family and link its "Height" parameter to the new reporting parameter in the pattern family;  you may need to add a formula to scale it up or down to match the size of the pattern grid (depending on the original family size) 
 

  • Create a new mass family or In-Place mass within a project;
  • create an irregular shaped form (can be a flat surface or an extruded shape);
  • Select a surface and divide it
  • Make sure the divided surface pattern is square and orthogonal - you may need to rotate the grid or set the spacing to fixed distance;
 
  • Load the curtain panel pattern family into the mass
  • Select the divided surface and change its type to the pattern family - it should automatically trim the pattern elements around the edges
  • NB. I think this did not work in the first version of the new conceptual massing in v2010?  but it seems to have been changed at some point since.
 
  • Depending on the grid spacing and location, Revit sometimes misses out small pieces or fails to trim elements that are hanging over the edge by only a small amount.

  • Occasionally it gets it quite wrong - in this example it was an in-place mass, which looked ok until the mass was "finished".



All this was done without tricky formulas - just by using the tools that Revit developers gave us, albeit not in ways that they expected us to use them.  There are obvious limitations of not being able to apply this to a normal curtain wall, so you have to use the massing tools to create a divided surface.

Obviously you aren't going to make smiley face patterns, but you should be able to apply these principles to real architectural design solutions.