News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Spooky Shadows

Started by kevin, July 17, 2009, 03:00:56 AM

Previous topic - Next topic

kevin

    Spooky Shadows V0.01

      This is a little example shows of how one can achieve a simple overhead light source with shadow effect.    In the demo the mouse represents the light sources  position.  The hard environment is a vector world, there's no clipping, so the light source can move through the solid space.. Use the mouse button to change the light colour.


 Demo Controls:

                  Mouse  = Control Light Source
        Mouse Button  = Change Light Colour
                      ESC = EXIT DEMO
 

 Download:

  Spooky Shadows


  YouTube

  Watch Demo On YouTube


 



   

kevin


    Spooky Projectiles

      Here's a little extension of the previous concept.  This one renders some projectiles moving through the vector environment. The main difference to the previous example, is that each object has a light associated with it and is clipped to hard world.  So you can fire down hallways and perhaps reveal a way though.   The main character light has been removed  so you can see this better.   Will post a demo later. 



kevin

#2
    Spooky Shadows V0.03

       This little update adds a stand in player in with firing (look familiar :) ).   It uses the arrow keys for 8way digital movement and the mouse for targeting..   To dress it up, this time i've used a screen grab of Alien Breed with some quick vector mappings as the collision walls.  So the lights & movement are clipped to whatever area you're in.    That combined with some blurring of the light map and gives a better feel to the scene.  Even though it's just thrown together.



  Demo Controls:

             Arrow Keys = Control Player (the circle thing :))
                Mouse  =  Aim
         Mouse Button  = Fire towards mouse
                     ESC = EXIT DEMO
   

  Download:

   Spooky Shadows



   

ATLUS


LBFN


Makeii Runoru

That looks damn nice : )
This signature is boring, and could be improved. However, the user of this signature doesn't need a fancy signature because he or she doesn't really care for one.

micky4fun

Looks a very nice effect , any code yet?

mick :)

kevin

#7
 The method is described in the developer blog (login required)



kevin

Howdy,

Does anybody have some Alien Breed styled character artwork sitting around ?

I'm just throwing together a tech demo and would like a player,  a bullet (or two) and perhaps an Alien (or two) also.   

The perspective needs to be overhead to fit into what i have in mind.

The demo is running in 800*600.  So it'd be nice if the images were suitably proportioned.


Reference Pictures

Alien Breed Screen Shots

micky4fun

http://images.google.co.uk/imgres?imgurl=http://walen.se/sprites/thumbs/265-alienbreed_towerassault_sprites_maintowerlevel7.png&imgrefurl=http://sprites.walen.se/%3Flevel%3Dcollection%26id%3D1&usg=__D9J0ipRPxNCw4qC76G2W5HQL_Dk=&h=50&w=50&sz=2&hl=en&start=2&sig2=_VcscfmWHeS4QhsdZzdXxw&um=1&tbnid=mXZBiiHYkItorM:&tbnh=50&tbnw=50&prev=/images%3Fq%3Dalien%2Bbreed%2Bsprites%26hl%3Den%26rlz%3D1T4ADBR_enGB294GB294%26sa%3DN%26um%3D1&ei=P25lSrDxLtKLjAe4zvSZAQ


you may just getway with theses sprites , or maybe not

mick :)

kevin


  Thanks, i might just use those for some stand in's so there's something to look at.     But, I'd much rather use our own media than rips in the actual tech demo though.    Ultimately, i'd like to grow this into a game later on.


kevin

#11
   Spooky Shadows V0.04

      This is another little update, this time adding some graphics for the player.


 Demo Controls:

            Arrow Keys = Control Player
                 Mouse  =  Aim
        Mouse Button  = Fire towards mouse
                    ESC = EXIT DEMO
 

 Download:

  Spooky Shadows V0.04b (login required)



 YouTube

 Watch Demo On YouTube


 



cybermind

WOW! Awesome! Do you have the source code for Spooky Shadows still? I would like to put in a light effect in my current project. I tried with a fullscreen alpha blended sprite that was modified with holes for full light and grey colors for light edges. Slow as hell :-P

kevin

#13
Quote from: cybermind on March 21, 2015, 07:00:21 AM
I tried with a fullscreen alpha blended sprite that was modified with holes for full light and grey colors for light edges. Slow as hell :-P

 That's a workable solution, but i suspect you're not as familiar as you need be with image formats and draw mode correctly.       This project and a few others were written for a 3rd party, who unfortunately they've done anything with them.    All you do is draw triangles from a point to make the lights.   Lights are drawn to a separate light map image of the same size of the screen (or area you want to map), then all you do is use the BlitImageAlphaMultImage from blitimage to combine the the two images (screen & lightmap) together.

 You can find all the code you need by looking in the PlayBASIC projects pack.   There's a few spot light/lighting demos in the demos folder and the occlusion is ray to world intersection.    Which I think is called Ray Intersect World or something similar.


cybermind

Thank you Kevin :-) You are most helpful! No, useually I do not have a clue of what I am doing, I just try different approaches :-P I read, I try, read some more, try again :-) This is good stuff! I will study it :-) Your optimization tips and guides were really useful by the way :-)