Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Dynamic 2D Shadows

  1. #1

    Dynamic 2D Shadows

    Here the third party module for ZenGL, that provide $subj

    developed by: Vadim Burenkov aka Vad
    Graphic API: OpenGL
    Cross-platform: Yes
    Required version of ZenGL: 0.2 RC6

    Preview version can be downloaded here. Inside you can find LightEngine2D.pas, examples for FreePascal, Lazarus, Delphi 7 and Delphi 2010. Also there is an executable for Windows. For now required version of ZenGL can be found only in svn. Version with render based on Direct3D and direct lights added to TODO list


    (so small FPS because of Radeon HD 4200...)
    Last edited by Andru; 05-12-2010 at 08:39 PM.

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Wow that's really cool.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3
    Just 1 thing, are the circles and squares meant to be colored by the light too? As walls it looks a bit weird. But nice start.

  4. #4
    Wow that's really cool.
    Thanks.
    Just 1 thing, are the circles and squares meant to be colored by the light too?
    Yes. Its because of color blending. Objects in demo absolutely white, and they get light color.
    For example color blending of a box and purpure light:

  5. #5
    interesting , thats for sure a great addition to ZenGl
    Last edited by virtual; 05-12-2010 at 06:48 PM.

  6. #6
    This is really nice. But I have to agree with user137. Sometimes the shadows are rendered at the wrong place.

    You say that this is a ZenGL extension. Does ZenGL have some kind of plugin architecture or is this just an addition to the engine codebase?
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  7. #7
    Quote Originally Posted by chronozphere
    Sometimes the shadows are rendered at the wrong place.
    "Wrong place" because all walls placed in different layers and this is create quite a mess with shadows

    Quote Originally Posted by chronozphere
    Does ZenGL have some kind of plugin architecture or is this just an addition to the engine codebase?
    this is something like "just an addition to the engine codebase" in separate unit For writing plugins, I think, there is no need in some special architecture. You can register new graphic and sound format through zgl_Reg, or get OpenGL context/Direct3D device through zgl_Get, and so on. Maybe later I will add some other specific functions.
    Last edited by Andru; 05-12-2010 at 09:03 PM.

  8. #8
    Quote Originally Posted by Vad View Post
    Yes. Its because of color blending. Objects in demo absolutely white, and they get light color.
    I can now understand what you mean. The lights themselves are the only way to make any objects come visible. It's pretty cool idea and looks to be working well.

  9. #9

    Post Last updates of LightEngine2D

    Last updates of LightEngine2D.

    You can download source code and demos here.

    New in 1.1 version:
    - Added 3 demos.
    - You can create any shapes using le_GetNewGroup:

    (it means that you can combine convex polygones and circles to create shape that you need)
    - Chipmunk physics support (demo3).
    - English comments.
    - uObjectsManager.pas for saving objects in files (demo4).

  10. #10
    LightEngine2D was updated and placed on extras-page

    New in version 1.30:
    -Soft shadows added.
    -Sector lights looks better now.
    -Render optimizations:
    Demo2 with 450 objects (150 circles and 300 boxes) on Radeon 4890HD
    v1.20 - 965fps (render time - 0.91; update time - 0.48 )
    v1.30 - 1148fps (render time - 0.72; update time - 0.49)
    v1.30 (soft shadows) - 834fps (render time - 0.97; update time - 0.81)

    What was new in version v1.20:
    -Updated to ZenGL revision 1045 (camera fixed).
    -Dynamic compilation fixed.
    -Render and processing optimization:
    Demo2 with 450 objects (150 circles and 300 boxes) on Radeon 4890HD
    v1.10 - 425fps (render time - 2.17; update time - 0.70)
    v1.15 - 965fps (render time - 0.91; update time - 0.48 )
    -Direct lights added.
    -Some changes in syntax of API.

    Last edited by Andru; 16-02-2011 at 10:02 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •