1 / 15

3D graphics in Erlang

3D graphics in Erlang. Jakob Cederlund - jakob@gnodata.se Björn Gustavsson - bjorn@erix.ericsson.se Dan Gudmundsson - dgud@erix.ericsson.se. 3D graphics in erlang. 3D graphics with hardware acceleration OpenGL - an open version of SGI’s GL Reasonable API Open standard

marlee
Download Presentation

3D graphics in Erlang

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3D graphics in Erlang Jakob Cederlund - jakob@gnodata.se Björn Gustavsson - bjorn@erix.ericsson.se Dan Gudmundsson - dgud@erix.ericsson.se

  2. 3D graphics in erlang • 3D graphics with hardware acceleration • OpenGL - an open version of SGI’s GL • Reasonable API • Open standard • Cross platform (Wintel, Linux, Sun, Mac) • Widespread support from hardware • SDL - a library supplementing OpenGL with interaction, 2D graphics and more

  3. erlang and 3D graphics • erlang high level language • 3D graphics needs symbolic language • Fast development • Performance critical code mostly in 3D hardware and drivers

  4. ESDL • An erlang driver that interfaces with SDL • Supports most OpenGL calls • Fast • Optimized C driver • Uses binary syntax • Available as download from contrib area • Written by Dan Gudmundsson

  5. ESDL erlang 3D program esdl-driver esdl SDL lib OpenGL 3D hardware

  6. Wings - a 3D modeller in erlang • Uses erlang as functional language • Fast development • Good performance • Powerful • Innovative user interface • Inspired by Nendo • Written by Björn Gustavsson • Some inspiration from Jakob Cederlund

  7. Wings • Most of the erlang code not performance critical • Some functions optimized • Winged-edge structure for 3D objects • Uses gb_trees and gb_sets (included in OTP R8)

  8. Wings - features • Powerful modelling • Every operation applicable to several objects at the same time • Imports and exports to different formats • Wavefront • 3D studio • Easy to do easy things • As opposed to other 3D modellers

  9. Wings - development • Functional • Only one process • Process dictionary used in for GUI state • Some things suprisingly easy to do • Multiple undo, with shared data • Only updates appriopriate parts of the model • Continues after crash, e.g. to save work • Just a catch, saves dump to file • Library functions used • gb_sets and gb_trees (R8) • sofs - Sets OF Sets (R8) • digraph and digraph_utils

  10. Wings - development cont. • Funs used a lot • special fold operations to iterate over model elements • Optimization after implementation and testing • Data structures hidden, used via functions • Most user commands uses primitive commands • Example inset • Extrude • Scale

  11. Wings - examples • Rendered in Bryce, composited in PhotoShop

  12. Wings - examples cont. • Modelled in only 5 minutes! • Rendered afterwards in Bryce

  13. Wings - performance • Most things fast enough • Optimized floating point in R8 • Some things take time • Smooth • Dissolve • Used as primitive by many commands • erlang fast enough, even for interactive tasks

  14. Wings - future • Long to-do list • Ongoing development, bugfixing and new features • Future features • Plug-ins, both in erlang and C • More export formats, e.g. renderman • Cameras, multiple views • Materials, textures • New platforms (MacOSX)

  15. Wings - availability • Open source • Full source on sourceforge • Compiled versions • Currently requires otp, esdl and SDL • Stand-alone erlang version with installer will be available shortly • Documentation and examples • Home page http://www.erlang.org/project/wings/

More Related