3D%20graphics%20in%20Erlang - PowerPoint PPT Presentation

About This Presentation
Title:

3D%20graphics%20in%20Erlang

Description:

Cross platform (Wintel, Linux, Sun, Mac) Widespread support from ... Example inset. Extrude. Scale. Wings - examples. Rendered in Bryce, composited in PhotoShop ... – PowerPoint PPT presentation

Number of Views:100
Avg rating:3.0/5.0
Slides: 16
Provided by: jak99
Category:

less

Transcript and Presenter's Notes

Title: 3D%20graphics%20in%20Erlang


1
3D graphics in Erlang
  • Jakob Cederlund - jakob_at_gnodata.se
  • Björn Gustavsson - bjorn_at_erix.ericsson.se
  • Dan Gudmundsson - dgud_at_erix.ericsson.se

2
3D graphics in erlang
  • 3D graphics with hardware acceleration
  • OpenGL - an open version of SGIs 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/
Write a Comment
User Comments (0)
About PowerShow.com