• Save
Goal4d
Upcoming SlideShare
Loading in...5
×
 

Goal4d

on

  • 2,743 views

Presentation on Goal4D - a java 3d engine (java1.1-applet compatible) i used to have fun with some 10 years ago

Presentation on Goal4D - a java 3d engine (java1.1-applet compatible) i used to have fun with some 10 years ago

Statistics

Views

Total Views
2,743
Views on SlideShare
1,134
Embed Views
1,609

Actions

Likes
0
Downloads
0
Comments
0

9 Embeds 1,609

http://blog.andyhot.gr 1589
http://www.linkedin.com 7
http://static.slidesharecdn.com 2
http://webcache.googleusercontent.com 2
http://rss2.com 2
http://translate.googleusercontent.com 2
http://cs8qf.x.incapdns.net 2
http://10.70.168.173 2
http://ranksit.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Συνήθως εδώ είναι το bottleneck, επειδή καλείται συνεχώς. Αναφορά σε quake και M. Abrash που έκανε ακριβως αυτό το κομματι σε optimized assembly.

Goal4d Goal4d Presentation Transcript

  • Goal4D: Java Real-time 3D Engine Ανδρέας Ανδρέου http:// andyhot . di . uoa . gr [email_address]
  • Features
    • Java 1.1 compatible
    • Full screen, windowed, applet mode
    • Υποστήριξη πολλών 3 d-format (md2, md3, dff, 3ds, obj, bsp, DM)
    • Υποστήριξη προοδευτικών πλεγμάτων ( VIPM )
    • Keyframe και skeletal based animation
    • Directional και point lights
    • Ambient, diffuse, specular lighting - Χρώμα 24 bit
    • Affine, perspective correct texturing
    • Wireframe, gouraud, environment mapping, light mapping
    • Εξειδικευμένη διαχείριση terrain, bsp, billboard, skybox
    • Bounding volumes
    • Post και pre processing effects
    • Υποσύστημα scripting
    • 3D Studio Max Exporter
  • Screenshots
  • Screenshots
  • Screenshots
  • Screenshots
  • 3D Basics
    • Scene
      • Objects
        • Vertices
        • Faces
        • Textures
      • Lights
      • Cameras
  • 3D Engine
    • Διαχείριση πόρων ( objects, textures, faces, vertices )
    • Προσδιορισμός Ορατότητας ( ανά object και face)
    • Σκιές και άλλα εφέ
    • Πολλαπλοί τρόποι απεικόνισης ( texture, bump, normal mapping )
    • Importers/Exporters
    • Μετασχηματισμοί
      • Model To World
      • World To Camera
      • Camera To Perspective
    • Rasterization
  • Rasterization
    • Διαδικασία απεικόνισης πολυγώνου στην οθόνη με χρήση των vertices που το αποτελούν
    • Γίνεται interpolation των γνωρισμάτων των δεδομένων vertices ( βάθος, φωτισμός, texture, normals, e.t.c.)
  • Goal4D
    • Πρώτη έκδοση (2001)
      • 1 πακέτο
      • 7 κλάσεις
    • Τρέχουσα έκδοση
      • 24 πακέτα !!!
      • 199 κλάσεις !!!
      • 10 διεπαφές
      • 40665 γραμμές κώδικα (35387 SLOC)
      • 2159 γραμμές javadoc
  • Packages 1/2
  • Packages 2/2
  • Sample Code
    • Surface surface = Surface.createSurface(320, 200, this);
    • Scene3D scene = new Scene3D(surface);
    • // create simple camera
    • Camera3D camera3D = new SimpleCamera(80, 45, 45);
    • scene.setCamera(camera3D);
    • // add light
    • Light3D lightOne = new Light3D(0.5, 0.5, 0.7071);
    • scene.addLight(lightOne);
    • // add material
    • Material3D mat = new Material3D();
    • mat.setTexture(img);
    • scene.addMaterial(mat);
    • // create a rasterizer for this scene
    • Rasterizer rast = new WireframeRenderer();
    • rast.setScreen(scene);
    // add object with its own rasterizer Object3D obj = PolygonObjectFactory.createPyramid(); obj.initRelatives(); obj.setMaterial(mat); obj.setRenderer(rast); scene.addObject(obj); // init the scene scene.init(); // and for each iteration of your game, // render and draw the scene scene.render(); getGraphics().drawImage(surface.getImage(), 0, 0, null);
  • Sequence Diagram
  • Pre - Post Process 1/2
    • Υλοποίηση της διεπαφής Filter
      • void setScreen(Screen3D screen);
      • void process(Screen3D screen);
    • Χρήση στην μηχανή με:
      • scene.setPostProcessor(Filter postProcessor)
      • scene.setPreProcessor(Filter preProcessor)
    • 28 έτοιμα φίλτρα:
      • PseudoColorFilter HighPassFilter LowPassFilter StereoFilter EdgeFilter SepiaFilter OilFilter RadialBlurFilter MotionBlurFilter
  • Pre - Post Process 2/2
  • Rasterizers
    • Υλοποίηση της διεπαφής Rasterizer
      • void setScreen(Screen3D screen);
      • void render(Rasterizable object);
    • Χρήση στην μηχανή με:
      • object3D.setRenderer(Rasterizer renderable)
    • 2 9 έτοιμοι rasterizers
    • Άρχειο template σε Velocity ( http://jakarta.apache.org/velocity/ ) για την συγγραφή νέων
  • Scripting 1/2
    • Υλοποίηση της διεπαφής Scriptable
      • String showFolderContents (String extension, String folder);
      • Image getImage(String name);
      • InputStream getStream(String name) throws IOException;
      • MediaTracker getMediaTracker();
    • Δημιουργία αντικειμένου ScriptEngine
      • ScriptEngine(Scene3D sc, Scriptable parent)
  • Scripting 2/2
    • Εντολές:
      • help clear cls quit history for postprocess preprocess usebsp switch save camera rotate scale info gouraudmap nprmap dir test load animate render texture environ skydome cube pyramid tree
    • Παράδειγμα:
      • scriptEngine.parseString(“pyramid”); scriptEngine.parseString(“texture 0 world.jpg”);
  • Development Process
    • Build tools
    • IDE
    • CVS
    • Test
    • Code Coverage
    • Dependencies
    • Obfuscator
    • Profiling
    • OpenGL bindings
    • Εφαρμογές
  • Build Tools
    • Ant
      • http://ant.apache.org/
      • Τα κάνει όλα!
      • compile, copy, backup, javadoc, zip, jar, war, ftp, cvs
      • IDE integration
      • Tools integration
  • IDE
    • Intellij IDEA
      • http://www.jetbrains.com/
      • Refactorings
  • CVS
    • Server
      • CvsNt ( http://www.cvsnt.com/cvspro/ )
    • Client
      • jCVS ( http://www.jcvs.org/ )
  • Test
    • JUnit ( http://www.junit.org/index. htm )
  • Code Coverage
    • Clover ( http://www.cenqua.com/clover/ )
    • Emma ( http://emma.sourceforge.net/ )
      • java -cp emma.jar emmarun -r html –jar goal4d.jar
  • Dependencies
    • JDepend ( http://www.clarkware.com/software/JDepend.html )
      • Number of Classes and Interfaces
      • Afferent Couplings (Ca)
      • Efferent Couplings (Ce)
      • Abstractness (A)
      • Instability (I) : I = Ce / (Ce + Ca)
      • Distance from the Main Sequence (D) : A + I = 1
      • Package Dependency Cycles
  • Obfuscators
    • yguard ( www.yworks.com/en/products_yguard_about.htm )
      • <obfuscate mainclass=&quot;andyhot.chess.pgnview.PgnView&quot; logfile=&quot;${dist.pgnviewer.dest.dir}/obf.log&quot; replaceclassnamestrings=&quot;true&quot;> <inoutpair in=&quot;${dist.dir}/pgnView.jar“ out=&quot;${dist.dir}/pgnViewO.jar&quot;/> <expose> <class> <patternset> <include name=&quot;andyhot.chess.pgnview.PgnView&quot;/> </patternset> </class> </expose> </obfuscate>
  • Profiling
    • JProfiler ( http://www.ej-technologies.com/ )
      • Memory Views
        • Class monitor
        • Allocations monitor
      • CPU Views
        • Invocation tree
        • Hot spots
  • JProfiler 1/4
  • JProfiler 2/4
  • JProfiler 3/4
  • JProfiler 4/4
  • OpenGL Java Bindings
    • GL4Java ( http://www.jausoft.com/gl4java.html )
    • YAJOGLB ( http://home.earthlink.net/%7erzeh/YAJOGLB/doc/YAJOGLB.html )
    • JOGL ( https://jogl.dev.java.net/ )
    • Άλλα ( http://www.opengl.org/resources/java/ )
  • Εφαρμογές
    • Terrain Editor ( http://andyhot.di.uoa.gr:8080/Java/terrain/terrain.html )
    • Chess Viewer ( http://andyhot.di.uoa.gr:8080/Java/pgnViewer3D/index.html )