Welcome, Guest. Please login or register.

What openbor you prefer: Double dragon,battletoads or final fight !? by lirexpatrio
[December 07, 2012, 07:15:27 pm]


what are your favorite games OpenBOR?! by lirexpatrio
[December 07, 2012, 07:09:46 pm]


Post Some Awesome Videos by maxman
[December 07, 2012, 05:51:39 pm]


Can @cmd playmusic "aaaa" 1 also increse music sound ? by BeasTie
[December 07, 2012, 05:24:38 pm]


Streets of Rage: Silent Storm by mtrain
[December 07, 2012, 03:45:05 pm]


Site will be down for maintenance on 12/8/2012 thru 12/10/2012 by Damon Caskey
[December 07, 2012, 07:42:42 am]


Cancelled SOR 3d Remake by riccochet
[December 07, 2012, 03:58:33 am]


Dungeon Fighter: B.O.R. by msmalik681
[December 07, 2012, 03:24:27 am]


[TUTORIAL] How to create 4 Games of OpenBOR in 1 CD (650 MB) by magggas
[December 06, 2012, 09:46:25 pm]


custknife by Bloodbane
[December 06, 2012, 09:34:09 pm]


blockfx help by B.Kardi
[December 06, 2012, 04:09:14 pm]


street of age 4 hd by corradlo
[December 06, 2012, 01:41:36 pm]


ClaFan - Classic Fantasy ver 1.17 by soniczxblade
[December 06, 2012, 05:01:20 am]


Bug Archive by Bloodbane
[December 06, 2012, 02:00:44 am]


"Bio-Doom" and "Gears of Doom" by BulletBob
[December 05, 2012, 10:07:21 pm]


Contra Locked 'N' Loaded v2 by Bloodbane
[December 05, 2012, 09:39:43 pm]


Downloadable OpenBoR Manual by BeasTie
[December 05, 2012, 08:31:24 pm]


Having trouble testing changes by B.Kardi
[December 05, 2012, 03:05:53 pm]


DragonBall Absalon by msmalik681
[December 05, 2012, 02:52:13 pm]


[Hi-Res] Swamp by Vibrant
[December 05, 2012, 10:47:14 am]


  • Dot Guests: 140
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: Pixel distortion/offset  (Read 1173 times)

0 Members and 1 Guest are viewing this topic.

Offline Damon Caskey

  • Hero Member
  • *****
  • Posts: 5335
    • The Gorge
Pixel distortion/offset
« on: August 07, 2011, 11:13:56 am »
One effect I have noticed a lot of games use or have used is to simulate transparency by distorting or offsetting the background layer behind target sprite. For example, in SOR3 Yamoto has a very convincing invisibility effect by making the spirte fully transparent and then shifting the background behind him a single pixel. It's clever workaround for a system that couldn't hope to process a transparency mask. Older PC screen savers often worked by warping random portions of the desktop, and newer 3D games use a similar effect for motion blurs.

How difficult would it be I wonder to add something like this to the drawmethod functionality?

DC
OpenBOR Wiki.

Coming Soon:
Spoiler
Fatal Fury Chronicals


Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Pixel distortion/offset
« Reply #1 on: August 07, 2011, 05:07:55 pm »
That sounds good.
I was thinking about a clipping/alpha masking feature lately, but found it would be too complex due to  multitudinous sprite/screen functions.

Pixel Distortion alone should be easy, unless you want to use it with other draw methods.


Offline Damon Caskey

  • Hero Member
  • *****
  • Posts: 5335
    • The Gorge
Re: Pixel distortion/offset
« Reply #2 on: August 07, 2011, 08:10:19 pm »
That sounds good.
I was thinking about a clipping/alpha masking feature lately, but found it would be too complex due to  multitudinous sprite/screen functions.

Actually Plombo already added alpha masking support in revision 2852. Unfortunately I can't find the post that documents how to use it. Should have been kept even through the wipe, but it might have been deleted by mistake.

Quote
Pixel Distortion alone should be easy, unless you want to use it with other draw methods.

Sweet. I can think of several occasions when it would work better then a transparency.

DC
OpenBOR Wiki.

Coming Soon:
Spoiler
Fatal Fury Chronicals


Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Pixel distortion/offset
« Reply #3 on: August 07, 2011, 08:28:56 pm »
Quote from: DC
Actually Plombo already added alpha masking support in revision 2852. Unfortunately I can't find the post that documents how to use it. Should have been kept even through the wipe, but it might have been deleted by mistake.
I knew that. But if I'm not mistaken, the alpha mask is part of the sprite and can't be used separately.

What I mean is a clipping feature (either use alpha masking trick or just a simple rectangle) many game engine might have. For example, you set a clipping area in current screen/viewport, then all shapes and sprites will be restricted in this area, extra parts will be cropped.

This feature is not that important,  I just happened to recall it when I saw this topic.



Another related idea is the ability to set transparency, but that also needs a lot of modification in current sprite code, so I leave it alone.



Despite the easiness of the logic, there are several difficulties.

1. The effect in the video showed some waving effect, which means there should be one or more time based parameters.

2. If the sprite is by any of the edges of the screen, the distorted pixels may fall outside the display area. Though this little glitch can be ignored if the modder always put the sprite at the center of the screen.

3. Duplicate functions for 8bit and 16bit screen, flip and non-flip version of the sprites.
« Last Edit: August 07, 2011, 10:18:05 pm by utunnels »

Offline Plombo

  • Hero Member
  • *****
  • Posts: 1724
  • Your source for useful modding tools!
Re: Pixel distortion/offset
« Reply #4 on: August 09, 2011, 10:28:39 am »
That sounds good.
I was thinking about a clipping/alpha masking feature lately, but found it would be too complex due to  multitudinous sprite/screen functions.

Actually Plombo already added alpha masking support in revision 2852. Unfortunately I can't find the post that documents how to use it. Should have been kept even through the wipe, but it might have been deleted by mistake.

It should still be on the wiki.
« Last Edit: August 09, 2011, 06:06:59 pm by Plombo »

Offline Damon Caskey

  • Hero Member
  • *****
  • Posts: 5335
    • The Gorge
Re: Pixel distortion/offset
« Reply #5 on: August 09, 2011, 11:23:10 am »
OpenBOR Wiki.

Coming Soon:
Spoiler
Fatal Fury Chronicals


Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Pixel distortion/offset
« Reply #6 on: December 28, 2011, 09:57:55 am »
Just noticed an interesting thing.
While playing Ninja Warriors, I found a certain boss had a similar effect.
Though the distortion might be a bit more complex, like a standard water transform, but only within limited area.

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal