brl-cad: an open source perspective

50
Mr. Sean Morrison morrison@arl .army.mil 410-278-6678 BRL-CAD: An Open Source Perspective MIL-OSS Working Group 2, August 2010 Approved for public release; distribution unlimited.

Upload: christopher-sean-morrison

Post on 08-Jul-2015

3.634 views

Category:

Technology


6 download

DESCRIPTION

This presentation was given by Christopher Sean Morrison in Washington, D.C., at the Military Open Source Software (MIL-OSS) second working group (WG2) on August 2010. The talk provides an overview of BRL-CAD, descriptions of ways BRL-CAD is used, an outline of the process employed to release BRL-CAD as open source software, summary statistics on going open source, and it identifies open and common problems with Government Libre Open Source Software (GLOSS).

TRANSCRIPT

Page 1: BRL-CAD: An Open Source Perspective

Mr. Sean [email protected]

BRL-CAD: An Open Source PerspectiveMIL-OSS Working Group 2, August 2010

Approved for public release; distribution unlimited.

Page 2: BRL-CAD: An Open Source Perspective

2

Background on BRL-CADWhat, who, why?

Tools & Techniquesfor Geometry Analysis

Conversion to Open Source

Open Problems & Future Directions

Main Topics

Page 3: BRL-CAD: An Open Source Perspective

3

Screenshots!Screenshots!Screenshots!Screenshots!

Page 4: BRL-CAD: An Open Source Perspective

4

Page 5: BRL-CAD: An Open Source Perspective

5

Page 6: BRL-CAD: An Open Source Perspective

6

Page 7: BRL-CAD: An Open Source Perspective

7

Page 8: BRL-CAD: An Open Source Perspective

8

Background on BRL-CADWhat, who, why?

Tools & Techniquesfor Geometry Analysis

Conversion to Open Source

Open Problems & Future Directions

Main Topics

Page 9: BRL-CAD: An Open Source Perspective

9

• BRL-CAD* is a powerful open source solid modeling system that includesinteractive geometry editing, ray tracing for rendering & geometric analyses, arobust geometric representation, data processing tools, and more than 25 yearsof development history.

• Development of BRL-CAD started in 1979 by departed wizard Mike Muuss, authorof many contributions to computing including the infamous “ping” network tool.

• BRL-CAD was designed to provide tools, techniques, and methodology forrepresenting, visualizing, and analyzing geometry. Particular emphasis is placedon validity, performance, and robustness for vulnerability and lethality analyses.

Background

* BRL-CAD is correctly pronounced as “be are el cad”

Page 10: BRL-CAD: An Open Source Perspective

10

Structured Geometrytank

crewsuspensionturrethull

turret_armor turret_interior gun

bore_evacuatorbreech gun_tube

cylinder_1.s cylinder_2.s cylinder_3.s

Page 11: BRL-CAD: An Open Source Perspective

Vulnerability / LethalityAnalysis

11

Model of vehicle

e.g., damaged components, residualsubsystem capabilities

Results

Specification ofmunitions performance

Shotlines representingpenetrator paths

Vulnerability model

BRL-CAD ray tracer

Page 12: BRL-CAD: An Open Source Perspective

12

Why Develop BRL-CAD?• BRL-CAD is custom-tailored for engineering analysis work providing robust accurate

geometric representation and high-performance geometry evaluation.– There is no conversion necessary which is crucial for ensuring robust, consistent, and correct

analytic results. Data conversions introduce errors and complicate validation & verification.

• Solid modeling and ray tracing are used to represent material interactions anddetermine paths of propagation. Analyses require shooting millions of rays throughhighly detailed target descriptions (with millimeter accuracy).

– This is a niche requirement not strongly supported by other CAD systems.BRL-CAD’s solid ray tracing is designed to significantly outperform commercial ray tracers.

• Extensive model repositories exist at ARL and AFRL of foreign and U.S. assets.– Hundreds of highly detailed target descriptions

represent a major investment in BRL-CADspanning more than two decades.

• BRL-CAD provides scalability, portability,robustness, and verifiable accuracy that canperpetually and independently be adapted.

– This allows the U.S. Government to not favorany CAD vendor, avoids expensive licensing,and protects ARL from corporate restructuring.

• BRL-CAD is highly tuned to DoD needs,more than any other CAD system.

Page 13: BRL-CAD: An Open Source Perspective

13

Background on BRL-CADWhat, who, why?

Tools & Techniquesfor Geometry Analysis

Conversion to Open Source

Open Problems & Future Directions

Main Topics

Page 14: BRL-CAD: An Open Source Perspective

14

Finite Element Analysisof Target Descriptions

Converted from a BRL-CAD CSG representation to an explicit finite element mesh

Page 15: BRL-CAD: An Open Source Perspective

15

Hidden Line Diagrams

Page 16: BRL-CAD: An Open Source Perspective

16

Hybrid Visualizations

Page 17: BRL-CAD: An Open Source Perspective

17

Full Light Simulation

Page 18: BRL-CAD: An Open Source Perspective

18

Geometric Analysis

Presented Area, Volume, Centroid, Weight/Mass,Moments of Inertia, Line-of-sight Equivalence,

Shape Factors, … (and much more)

Page 19: BRL-CAD: An Open Source Perspective

19

Comparing Area Exposure

Helmet presented areacoverage comparisons

Page 20: BRL-CAD: An Open Source Perspective

20

AutomaticDetailed

TireModeling

Page 21: BRL-CAD: An Open Source Perspective

21

Page 22: BRL-CAD: An Open Source Perspective

22

Metaballs for Blast Volumes

Truck with BlastEnvelope Glass Truck

Centers ofDamage

• The engineer traditionally:– Specifies a center of damage

and lethal miss distance– Interpolates a 2D curve by hand– Extrapolates the 2D curves back

into a 3D surface

• With metaballs, the 3D surfaceis automatically generatedbased on centers and lethalmiss distances

Page 23: BRL-CAD: An Open Source Perspective

23

Metaballs for Blast Volumes

Page 24: BRL-CAD: An Open Source Perspective

24

BRL-CAD in a Nutshell

* Open Source Initiative http://opensource.org

• Extensively cross-platform:• Windows,• Mac,• Linux,• UNIX,• … from desktops to

supercomputers

• Became Open Sourcesoftware in 2004

• Open code,

• Open access,

• Open standards

• … It’s free!

• BRL-CAD became the firstOpen Source solid modelingsystem in production useunder OSI*-approvedlicense terms

• More than one million lines of code• More than 400 binary

applications• More than a dozen

libraries

Page 25: BRL-CAD: An Open Source Perspective

25

BRL-CAD Community• SLAD V/L analysts and target describers• MUVES and AJEM users throughout U.S. DoD

– Army, Air Force, Navy• International collaborations:

Senior National RepresentativeV/L Assessment Methodology(VLAM) working group– United Kingdom, Germany,

Netherlands, …• Extensive international ties throughout

the Open Source community,academia, and commercial industry– University of Utah– University of North Carolina

at Chapel Hill– Johns Hopkins University– Texas A&M University… and many others …

• Google Summer of Code– Exclusive Open Source opportunity

Page 26: BRL-CAD: An Open Source Perspective

26

Background on BRL-CADWhat, who, why?

Tools & Techniquesfor Geometry Analysis

Conversion to Open Source

Open Problems & Future Directions

Main Topics

Page 27: BRL-CAD: An Open Source Perspective

Towards Open Source

… the long, manpower-intensive way …

• Lots of playing “Devil’s Advocate”• Obtain common understanding• Continually dismay fears• Quantify benefits• Obtain buy-in• Keep going

27

The journey tomake BRL-CADOpen Sourcebegan in 1998.*

*Fortunately much has changed since then.

Page 28: BRL-CAD: An Open Source Perspective

• Garner support withindevelopment team

They think it’s impossible, but okay.They were almost right.

28

Page 29: BRL-CAD: An Open Source Perspective

• Obtain initial support frommanagement

They didn’t entirely understand, but didn’t seecause to stop the effort either..

Lots of questions.

29

Page 30: BRL-CAD: An Open Source Perspective

• Become an open source legal expertMany, many questions and FUD to dispel. Requiredconstant shepherding, even amongst the dev team, tokeep support going and fears at bay. Nobodyknowledgeable to help navigate the issues.

Had to have answers ready for all of the worst possible“what if” scenarios.. Many licenses to read in detail.

This was the most meticulously tedious step.

30

(This is much better now thanks to persistent efforts from folks like Risacher and Wheeler, but still an open issue.)

Page 31: BRL-CAD: An Open Source Perspective

• Talk to Tech Transfer

They really didn’t understand, but were willingto listen. Their focus was the worst casepossible. They wanted to see evidence ofothers releasing as Open Source.

We seemed to be the first within the Army …(maybe first within DoD)So we were stuck.

31

Page 32: BRL-CAD: An Open Source Perspective

• Talk to Security / Public Affairs

Fortunately, BRL-CAD was designed from thebeginning to be devoid of sensitive data.Without analysis codes or military dataembedded, there were no objections.

In fact, this would mean substantially lessoverhead for them! (No more licenses toreview and file.)

32

Page 33: BRL-CAD: An Open Source Perspective

• Talk to Information Assurance

They didn’t really understand nor haveauthority to halt the effort, but wereconsulted for blessing regardless.

They had the usual questions and fears thatwe had heard and answered many times overby this point. They didn’t have objections.

33

Page 34: BRL-CAD: An Open Source Perspective

• Talk to Legal

It took months to get a sit down.Persistence!

Finally, we got to meet with patent counseland former NSA Secure Linux legal guru,Steve Bloor. (woot!)

He understood everything.

34

Page 35: BRL-CAD: An Open Source Perspective

• Consider the legalities of licensing

Bloor made our options clear. Public domainwas downright trivial but had major risks.NOSA-style was also easy but had manylimitations (less than ideal).

Everything else required full rights.Copyright was even better.

35

Page 36: BRL-CAD: An Open Source Perspective

• Make it happen, acquire rights

The U.S. Government has no default copyright.At least, not nationally… BUT, copyright can beestablished and assigned.

How? Contract modification, substantialderivative work, copyright claim on derivative,assignment.

(There’s even standard clauses!)

36

Page 37: BRL-CAD: An Open Source Perspective

• Get the okay from ManagementOnce copyright was acquired, it finally became a“simple” matter of release approval frommanagement.

We showed a substantial quantifiable processsavings in addition to numerous “hypothetical”potential benefits. We’d done our homework.The code was ready.

After more than five years of persistent effort, wegot the okay to release as Open Source inDecember 2004.

37

Page 38: BRL-CAD: An Open Source Perspective

Academic

Industrial

Individual

Government

ArmyAir Force

Navy

Non-DoD

0 500500

DomesticTotal = 1,233

ForeignTotal = 871

Before Open SourceBRL-CAD world-wide sitelicenses: about 2000

Page 39: BRL-CAD: An Open Source Perspective

39

After Open Source

• More than 200,000 downloads and 2,000,000 website hits per year (as of 2010)

• Activity (both interest and development) is increasing year over year• Presently receiving about three-to-five staff-years of contributed effort

from the Open Source community including source code enhancements, bugfixes, documentation, website development, and more…

• Received roughly an additional staff-year of effort in 2008 and 2009 bybeing accepted into the Google Summer of Code

Incompletemonth

“the world’s oldestsource code repository”

– August 2007,Robin Luckey, Ohloh Inc.

BRL-CAD downloads in firstmonth: more than 2000

Page 40: BRL-CAD: An Open Source Perspective

40

ARL

AirForce

Navy

Academia Industry

ForeignIndividuals

BRL-CAD

ARL

AirForce

Navy

Academia

IndustryForeign

IndividualsBRL-CAD

The OLD way

The NEW way

Open SourceCommunity

BRL-CAD

Page 41: BRL-CAD: An Open Source Perspective

41

Background on BRL-CADWhat, who, why?

Tools & Techniquesfor Geometry Analysis

Conversion to Open Source

Open Problems & Future Directions

Main Topics

Page 42: BRL-CAD: An Open Source Perspective

Open Problems

• NIH: “Not Invented Here”• Perceptions of government code• Open communication with the community• Avoiding the

waterfallswith agility

• Collaboration• Meritocracy• Diversity• “GLOSS”

42

Page 43: BRL-CAD: An Open Source Perspective

Blatant Solicitation(er, Potential for Collaboration)

The BRL-CAD Geometry Service is an interface for accessing revision-controlled geometryfrom a data repository. Sitting on top of an embeddable geometry engine, the serviceprovides and stores geometry data similar to how a web server delivers web pages.

Page 44: BRL-CAD: An Open Source Perspective

44

Thank you!Questions? Comments?

Christopher Sean [email protected]

410-278-6678

Several of the images contained within this presentation were created with the support andefforts of many individuals. The following deserve special recognition and thanks:

Mike Mike MuussMuussLee ButlerLee Butler

Erik GreenwaldErik GreenwaldCliff YappCliff Yapp

Ron BowersRon BowersMike Mike GillichGillich

Justin ShumakerJustin ShumakerStephen KennedyStephen Kennedy

Karel KulhavyKarel KulhavyEdwin Edwin DavissonDavisson

Approved for public release; distribution unlimited.

Page 45: BRL-CAD: An Open Source Perspective

45

Additional Informationabout BRL-CAD

Page 46: BRL-CAD: An Open Source Perspective

46

Geometric Representations

CSGimplicits

BREPNURBS

BREPfacets

GeometricDefinition Applications of Use

4 values•Radius•Position

• Implicit primitives with constructive solidgeometry (CSG) provide a representationformat that is very compact and numericallyrobust (no cracks)―Solidity constraint is guaranteed making it

well-suited for solid modeling and engineeringanalysis purposes

200 values•Surface•Patches•Knot•Values•Weights

• Spline surface boundary representations areprevalent in commercial CAD systems fortheir modeling flexibility―More recently they are also the subject of

real-time ray tracing computer graphicsresearch

1000values ormore(configurable)

•Individual•Polygons•Vertices•Normal values

• Polygonal boundary models are commonlyused by display systems (e.g., OpenGL andDirectX) for interactive rendering and real-time visualization―Many advancements have been made over

the years on high-performance ray tracing oftriangle models

Page 47: BRL-CAD: An Open Source Perspective

47

RepresentationData Implications

Page 48: BRL-CAD: An Open Source Perspective

48

Constructive Solid Geometrywedge

cylinder

block

(wedge ∩ block) − cylinder

wedge − block − cylinder

block − (wedge ∪ cylinder)

Page 49: BRL-CAD: An Open Source Perspective

49

Some ofBRL-CAD’s Primitives

Page 50: BRL-CAD: An Open Source Perspective

Who is this guy?

Morrison is the open source project lead and principalsoftware architect for BRL-CAD. His primary areas ofexpertise are in computer graphics, open source projectmanagement, solid modeling, system administration,information security, human-computer interface andinteraction design, software testing, and computationalgeometry.

He is involved numerous open sourceprojects including BRL-CAD, BZFlag, FTGL,and with ties throughout the open source community.

‘brlcad’ on Freenode IRC

50