Saturday, July 17, 2010

Get Rendering

I have a number of posts about my own experiences rendering inside ACA.  I held off using 2007,8 and 9 because I had a quick and efficient system with ADT2006 but I have been enjoying using ACA2009 for almost a year now.  If you are not rendering then you are missing out on the fun.  I thought it would become a slow labourious process with overnight renders and the nightmares to go with it but I've found it almost as quick and efficient as it was in 6 and of course the new Mental Ray rendering engine can produce a higher quality finish.

As a side issue I have discovered that a number of OOTB practises of ACA are detrimental to an efficient process, namely the overuse of MassElements within styles, the overuse and underuse of Render materials and of course the use of the Project Navigator or even X-ref's.  Not that I don't use X-ref's but if you do you have a number of extra steps to go thru to edit files in preparation for rendering.  At best it's clumsy and verbose (but maybe necessary for larger projects) hence my development of multilevels in one file.
So..with the acceptance that I'm no expert renderer and that there are few that are on rendering inside ACA I would like to offer the tips I've learned to get a little something out of this baby.  If you are after the highest quality renders, then Max may be your gig but if you would just like to get a basic good quality render out quickly and efficiently without paying the premium in time and upgrades for another program then you can get there with AutoCAD and ACA.  You also have the advantage of being able to alter the file and re-render without having to learn & link to another separate program.

In ACA assigning materials is a step sideways from the direct approach in Acad which assigns materials directly to an object or bylayer.  With the styles manager and it's matrix it can be a little more complicated.  But that's ok.  Unlike Max which is a dedicated renderer and not much else, you can use the same file for preparing your Development Application and rendering and still rip off quantities so changes need to be only done once.  You could progress the same file to construction drawings and even still use it for rendering at a moments notice!

Here's some links which may be helpful on learning about Acad rendering but also try google.'s%20e-book%20%22creating%20render%20materials%22/
Archidigm article on Materials
Archidigm's Development Guide (look up materials (P1) and the appendix at the end for render/materials)

Firstly it's good to get your head around the use of aecMaterial definitions.  That's not just for rendering though they contain the link for any render materials as a part.  aecMats are used to describe how a material when applied to an aecObject will display in any of the display reps (Presentation, Medium Detail, Reflected etc) and in any view (plan, elevation, model etc).  This would generally be understood as a hatch pattern, line thickness and possibly colour shading.  However within this definition set you can also assign a render material (RMAT).  Here I have developed my own thoughts apart from the OOTB system to reduce the number of RMATs used which will quickly bring your system to a crawl, especially if you are still using a 32bit OS.  I also work on more low end stuff and have no time to fiddle and tweak too much so I need a system that will allow rapid development and render.  It's not uncommon for me to start a design in the morning and finish the day with a set of presentation drawings (site,floor plans, elevations) together with a smart render for the cover sheet.  With my multistorey in 1 file approach this has become much easier to achieve.

As for the overuse of MassElements I have discussed that here but in case you didn't get it I'll say it again here.  You don't always need to use a ME for an object (block) that you embed into a style.  I used the example of the aecDoorPanel that's OOTB but here's another example. 

My young partner who is new at ACA created a letterbox MultiViewBlock.  He created a model and 4 views (Plan,Side,Front,Rear).  For the model he used MassElements and for each material created an ME style and then created seperate render materials that were captured in aecMaterial definitions.  Now he did a great job and followed ACA methodology but adding this letterbox into a file added a swag of render materials, aecmaterial and ME style definitions that quite frankly we didn't need.  This letterbox comes in a series of colours but apart from that there are no choices and it's going to look the same in every instance.  So here is what I did to make this object a much more friendly object. 

Editing the 3D model I turned every ME into a 3DSolid using the Right Click option.  I edited the Render Materials so I only had RMats I would typically have in my file (and is on the limited list of materials required).  The cast concrete letterbox can use the same render material that's used for rendered walls (a sand finish render).  The steel letter recepticle can use Paint-SemiGloss though really do you really need to see shine on a letterbox (and add the associated render time).  In the Style manager, using the 'Broom' button sweeps away the no longer required ME styles and aecMaterial styles.  Purging the file removed the unwanted RMats.  I make sure there are no layers in the file and all is on layer 0.  The command "SETNESTEDOBJECTSBYBLOCK" (alias'd by me to FB) rids all layers,colours, plot styles, linetypes, and pen thickness's but leaves the render material assignment assigned.  LAYDEL will remove unwanted layers that won't go.
Now both 'Paint-SemiGloss' and 'Render' do NOT have any colour assigned.  That comes from the object being set to 'ByObject'.  This means that when placed in the drawing I can pick the MVB and without exploding set a colour if need be. (I use aec Standard.stb plot style where colour is meaningless unless told otherwise).  
So now my letterbox can be dropped into my drawing on a layer of my choosing, coloured if required, rendered, all with a light touch and minimum fuss.  Any item that is a specific colour like the backplate is given that colour in the original block (after using FB of course).  You can see you get one selection for colour so it won't work where you need two.

Oh the ME's?  Well if my letterbox was an ME I would have to dive into styles and search thru menu's to find which style was assigned and if ByMaterial, then trace thru the material settings to find the colour.  Now for a wall or roof I use this 'style' process (not always) but for peripheral items (props) like letterboxes it's just so much overkill and takes 10x as long to manipulate.  Dump the ME's and just use plan ol' 3DSolids.

Have you downloaded a block and found lots of weird colours?  I downloaded a speed boat that I've never used.  This one had lots of render materials for seats, chrome, engine parts and nice colours assigned for the paint and the flames.  However the acad model itself was all green!  Now making an entity a colour is simple but years ago we might have followed an office assignment.  Colour 151 = chrome and Colour 204 = red leather etc.  But we don't need to follow such an indirect scheme.  Make the object the desired colour and the chrome silver and then assign RMAT's that have colour ByObject.  I also removed all the layers (no need to assign material ByLayer either).  Now if I ever use that speed boat in an image it won't add any layers, (new) RMATs, plot styles or, linetypes  If I make the body ByBlock I can even colour it when added to the drawing without exploding the block and it has Paint-HighGloss applied so I get a great spray job as well.

It's a prop!  Who wants to spend time fiddling with a boat? You just want to drop it in your drawing and it behaves and stays quiet!  I've used this technique for the car in this image. The car is dropped in (the body is white or whatever the layer 0 colour is) and a colour selected).Now it ain't going to win me any rendering awards but it has won the client over.

If you've had a chance to check out the even newer Mental Ray rendering engine update in 2010 and 11 it may have a high drool factor - the new materials look lovely, but it's going to slow you down and weigh down your system and prevent you from an efficient process.  Check out the paint colours.  Each colour has it's own RMat !! That's a lot of Rmats.  Ditch the colour, make it ByObject and then you can use the same RMat where-ever you use that same gloss level.  And remember unless you are trying to create a high image level, then many of the subtle variations in paint are lost on a simple quick rendering.  Is gloss plastic that much different from Gloss paint.  If you think so then you shouldn't be reading this article.   If you require a specific material like brickwork then yes you will need a RMAT for each different one though for something like concrete pavers you can simply use a bump map and colour ByObject again.

Odin Cary of Archidigm is doing some great investigation articles of ACA2011's new rendering and materials and it seems he's having better luck.  He also has explained the 'jump to perspective' bug that had me in frustration.  Odin has also started renaming the complex and longwinded material names so I am not alone here.

Also be aware I am talking exteriors here.  For interiors the game changes alot.  Rather than the one light source (sun) you need the reflective values of many surfaces to realistically light an interor but to be efficient you can still greatly reduce the number of RMat's used by using the above techniques.

Get in and render!  (or simply!!  then render :-)

Friday, July 9, 2010

Multiple Levels in a single Drawing File? Part 2

Ok so are you interested enough to read further on this idea?
I can promise a productivity boost on residential and small commercial projects.  Following the OOTB processes can at times lead to a lot of the confusion attributed to ACA/ADT when simpler processes could have been put in place.  The OOTB processes are also detrimental to efficient production especially when you want to turn (churn) out fast renders as well.

Here is the recipe on how I achieved it and it was much simpler than I thought it would be. So simple that I ponder why Autodesk hadn't provided this as an option.  Oh and this is just background of how it works.  You don't have to understand or recreate this.

Let's go to the the list of the items I posted in Part 1 in more detail.

A Layer Key Style that holds a Layer designator.
We all work differently and we need to have the items required for our environment. For very large projects, you may have multi disciplinary drawing files but for the most part, I would complete my set of architectural drawings and a structural engineer would complete his own set of drawings. Maybe a hydraulic engineer would be required or perhaps a civil engineer but they would also complete their own set of separate drawings (& CAD files). So there is no need for me to preface a layer with an A.  I preferred the level indicator to be first and I use a simple number. '1'. It's great to open the layer dropdown and type S and go straight to the Site-* layers. But it doesn't really matter because as long as your level indicator is in the same place you can use the '-layer' command to find and manipulate your layers. So 'A-Wall-L1' or 'A-Wall-FLR2' is ok. Because the layer manager dropdown display is so narrow and only shows a limited number of letters I try to keep mine simple. You cannot mix A-Wall-L1 and A-Wall-Blow-L2 though as the level indicator is in 2 different places (3rd and 4th along) (In my system anyway).

(Odin Cary of Archidigm has excellant explanations on all things ADT/ACA in his Development Guide.  Check out under section 2 for Layer Key Styles.)

As an explanation;
From the command line I can issue -layer , select 'OFF' and then using a wildcard such as 1-* have all the layers starting with 1- turning off. (The * being a wildcard for those not familiar). I could also issue *-*-FL1* but of course it will fail if the level is not in a consistent position in your layer names. If the level is always in the 3rd position it should work. Therefore I chose to put it in the first position and also allow me to sort my layers naturally by level.
(I've seen a wish list item posted several times to allow layer groupings, but this is not available at this time).

However this does not prevent me from sorting via major item either. Issuing the -layer command again and OFF and *-Wall* would turn all wall layers off regardless of their level.
So from this basis we can turn all layers off using the * wildcard and then turn back on those we want to work with. Therefore in lisp fashion the following lines...

(command "-LAYER" "m" "0" "F" "1-Elec*" "OFF" "*" "N" "ON" "1-*,1+*" "")

...sets layer 0 as the current layer, freezes the electrical layer (as I only want that one on when doing electrical layouts), turns all else off, then turns on the level 1 (and 1+) levels (except the frozen electrical layer).

My system uses the difference between freeze and off for layers. Frozen layers do not regenerate and reduce the load on the display system. Off layers are generated though not displayed and are quickly turned off & on. So by freezing layers I don't want to see for a while and turning off layers I might want to edit quickly in my next move, I can have a fast responsive system.

I used the 1+ Stair for items that would span more than one level so they would show also on the 2nd floor as well (but with a different cut plane and display rep - more on that one later).

So if we tie the above lisp line to a simple command, say 'L1', then we have created a new command to show us all the layers on level 1 only. More on this

I also use other 'level' indicators to sort layers such as Site-, 3D- for info only used for modelling or elevations and not required in plan views. Your Layer Key Standard will set whether your layer names have to follow a strict or loose convention. Some LKS's have strict 1--4-4-4 numbers of alphanumerics generally with the last 2 places being optional. Mine has no restriction on the number of each. I find the AIA layering system, designed to organise a hospital complex way overkill for simple residential so don't feel tied to such a system if it's not needed. 

Hey try this. If you have an x-ref in your drawing, use the layer command to freeze all it's layers like this -layer F X-RefName|* The | symbol is shown in the layer name itself in the Layer Manager between the x-ref name and the layer name (inside the x-ref).   I have my survey as an x-ref named 'Survey' and using this info I can freeze all survey info in my drawing using lisp.

All new to you? Open your Layer Manager and click on the 4 buttons top right. I'll try to add some good links here for simple tutorials on these great and powerful tools.

Can you see why I have dropped the A- from my layer names. Layers are sorted alphabetically (of course) and you can use this fact to your advantage in your layer scheme. Even keeping your A-, what comes after will determine the sorting order.  In the layer box you can type say 2 and it will scroll to all my 2nd floor layers.

Place to hold your elevation floor level heights.
If you want to switch to the 2nd floor, you need to be able to draw a wall at the 2nd floor height. This height needs to be entered and available to the drawing. I did want to use Fields but as yet I don't know of a way to access them in lisp (strange!). It needs to be saved with the drawing but it's not a drawn entity.  So for the moment I have elected to use Autocad variables (thanks David Koch)  Acad has 10 user set variables available that are stored in the drawing when closed that I can enter and access.  I chose the interger based as I work in mm and won't be requiring any decimal places. If you have decimal places in your floor heights, you will need to use the USERR1-5 system variables as the R stands for REAL.  I assume level 1 at z=0 but level 2 is set in 'USERI2" and level 3 in "USERI3" etc (the 'I' here is an i). My loaded custom autolisp file reads this variable when I open the drawing and assigns the variables FL2 and FL3. These variables (FL2/3) will be lost once the drawing is closed hence the use of the system variables to hold the values over.  An easy way to access these is thru the 'System Variable Editor" available under the 'Express Tools' under 'Tools'.

Now don't worry if this is all confusing to you. I am just trying to give some background info on my method of madness. I can send a template or sample file to you that has these items set up already and I have followed OOTB methodology as much as possible so that I have minimised my customisation. My overriding rule is to Keep It Simple so I assure you it's not complicated.

Next .... Cutplanes, Zplanes and switching Display Representations.

Tuesday, July 6, 2010

Free ADT teaching vid's and other news.

Daryl Gregoire of CadClips has just released his ADT and Autocad video's for free viewing.  Looks like he stopped teaching at version 2008. Not too much has changed since then anyway.   I have had CadClips link on my page for some time so you may have already visited but if not pop over and you can get an online video review of that difficult to grasp concept. 

Perhaps watching someone do it will be the thing that gets it to sink in!  Watch them here

(pssst  you will even see some Revit video's too but you won't here it from me!

Matt Stachoni is a heavy weight in the installation and setup of AutoCAD Architecture and it you have some questions on how to install and where, his guide, available at his new web site aecblog will make a good night time read.  (At the time of posting this it was off-line but come back to it).  I only do single installations so all the network stuff was more than I needed but I enjoyed his hints at how to hack the dialogue boxes.  You know when you have to keep enlarging them EVERYtime and it gets old.

and in some interesting news Dell Not so Swell

Is there any company that's reliable and trustworthy to deliver and full working product anymore?