Wednesday, September 01, 2010

Visualization Boundaries

One of the problems with doing visualizations is needing to mask out or hide the portion of the existing surface which is above the proposed surface. I’m working on a quick way to accomplish the task that doesn’t include manually extracting the surface border of the proposed surface and adding it to the existing surface. The code below is a start, it only works with one proposed surface boundary. Maybe if I get ambitious I’ll look at adding the ability to account for more than one boundary. The code does do multiple boundaries, but it doesn’t do it correctly in all cases.

Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.Civil.Roadway.DatabaseServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.ApplicationServices
Imports AeccLandLib = Autodesk.AECC.Interop.Land
Imports Autodesk.AECC.Interop.UiLand
Imports Quux.C3DUtilities
Imports Autodesk.AutoCAD.Interop.Common
Imports Autodesk.Civil.Land.DatabaseServices

<Assembly: CommandClass(GetType(UpdatePolylineMaskBoundary))>

Public Class UpdatePolylineMaskBoundary

<CommandMethod("C3DRUpdatePolylineMaskBoundary")> _
Public Sub UpdatePolylineMask()
Try
Dim oUtil As New Utilities
Dim oType(0) As Type
oType(
0) = GetType(TinSurface)
Dim oSurfSourceObjId As ObjectId = oUtil.GetEntityWithOptions("Select Proposed Surface: ", "Not a surface", oType)
Dim oSurfExistObjId As ObjectId = oUtil.GetEntityWithOptions("Select Existing Surface: ", "Not a surface", oType)
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager = db.TransactionManager
Using myT As Transaction = tm.StartTransaction

'Get Civil 3D application, document and database
Dim oCivil As New AeccAppConnection

Dim obj As Object = oCivil.AeccDoc.ObjectIdToObject(CType(oSurfSourceObjId.OldIdPtr, Long))

If TypeOf obj Is Autodesk.AECC.Interop.Land.AeccSurface Then
Dim oSurface As AeccLandLib.AeccSurface = obj
Dim oSurfExist As AeccLandLib.AeccSurface = oCivil.AeccDoc.ObjectIdToObject(CType(oSurfExistObjId.OldIdPtr, Long))
Dim objs() As Object = Nothing
objs
= oSurface.ExtractBorder(Autodesk.AECC.Interop.Land.AeccDisplayOrientation.aeccDisplayOrientationPlan)
Dim i As Integer = 1
For Each obj In objs
Dim oBoundary As AcadEntity = obj
oSurfExist.Boundaries.Add(oBoundary,
"C3DRBoundary-" & i, Autodesk.AECC.Interop.Land.AeccBoundaryType.aeccBoundaryHide, True, 0.1)
i
= +1
Next

End If
myT.Commit()
End Using


Catch ex As Exception
Dim oUtil As New Utilities
oUtil.MessageWriter(
"Error in UpdatePolylineMask Sub")
End Try
End Sub

End Class


The program utilizes other code contained in the free version of the Sincpac and the Civil 3D Reminders Pack.

Monday, August 30, 2010

SteelDay at CONTECH

Have you ever wanted to know how steel pipe or other type of steel product is made? Well here’s your chance to find out. CONTECH is opening up there plants for tours across the country for SteelDay on September 24, 2010. Here’s a link for more information. You might see me at the Adelanto, CA plant if I can find a way to get there.

Friday, August 20, 2010

Jelly Belly Factory Tour – Fairfield, CA

I was going to try to tie this into Civil 3D, but I couldn’t come up with anything good, but if you do visit the source of some of the AU Beer you may want to also check out the Jelly Belly factory. You now the expensive bulk candy found in some stores. At the Jelly Belly Factory you can buy some Belly Flops at a fraction of the price. The only problem is you can’t pick the flavors you want. But if you visit the factory tour you can visit the sample bar and get a sample of the plethora (a word I learned about in the Three Amigos!) of flavors and types of candies available. The tour is also informative on how to make Jelly Bellys.

2010-06-10 055 2010-06-10 056 2010-06-10 057 2010-06-10 058

Wednesday, August 18, 2010

Autodesk 3ds Max Design Training - Day Three

US CAD, Steve Bennett Instructor

  • Use mr Photographic Exposure Control with Mental Ray rendering engine.
  • Gamma - Star Trek reference
  • Recommended "gamma pipeline" (Search Term in help), workflow in help. Gamma correction is applied to images to make them look correct. The program applies another one if it already has one which can make the images look incorrect. Have to apply to material before it gets rendered. Setting may be turned on/off per style.
  • Usually adopt the file's gamma and LUT settings, if the warning box comes up. May cause rendering problems.
  • Light lister to manage multiple lights from one place.
  • FG - Final Gather
  • Add lighting to a material can then be applied to an object.
  • Make sure to set the exposure control when using Mental Ray, can make the rendered image look dark.
  • Background images require the Physical Scale needs to be Unitless, a value of around 80,000 may be used (Page 4-67).
  • RAM Player (under Rendering Menu) can compare images side by slide by sliding triangles top and bottom to compare. Can also show a sequence of photos.
  • http://www.gsd.harvard.edu/research/gsdsquare/Publications/BuildingSimulation2009.3dsMaxAndDaysim.pdf
  • Create exterior lighting in the Settings button from the Create tab.
  • Always choose yes to create a 'mr Sky' environmental map.
  • The sun does not need to be actual distance from earth to the sun, just needs to be above the scene.
  • Outdoor scenes don't get much reflection or refractions, change values to 3 in the Render dialog box below the render window.
  • Ambient Occlusion (AO), shadows at corners or light bouncing between surfaces.
    • For materials, don't use for items far away or not needed. Mostly for walls and ceilings.
    • Makes rendering take longer, use where needed not in every material.
  • I suck at remembering vocabulary terms, but am good at remembering the concepts.
  • Only ray trace shadows are applicable to ray trace rendering, the others are not applicable.
  • Some good render settings, Diffuse Bounces should be 2 instead of 8.
  • Look on page 5-14 if dots show up. Change Final Gather Settings in Render Setup.
  • Image Precision (Antialiasing, keep values divisible by 4 usually). Controls how crisp edges appear.
  • Creating a Render Farm
    • Get the IP address of computer
    • Enter it into the dialog box

    • Make sure the computers are selected when rendering for them to be included.
  • Create mental proxy graphics to export it out to a file and then improve performance. Kind of like datashortcuts in Civil 3D without the object living in a drawing, but an external file.
  • Sky Portal - Light covering a window, raised light level for the scene. Primarily for interior shots.
  • Use photometric lights with mental ray.
  • Can do iterative rendering by selecting the object, then the icon to the right and then rerun and it just does the selected item.
  • If doing a large project, Render Output to external file to create images.
  • You are the key person.
  • EPW file source: http://apps1.eere.energy.gov/buildings/energyplus/cfm/weather_data.cfm
  • Autodesk University Class DV310-1 Creative Animation Techniques Used to Reveal Models in Advanced Visualization Projects

The video may take some time to load.


Find What You Want
Custom Search
Blog Widget by LinkWithin