Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 16,707 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 2 of 3 1 2 3
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: XNASorcerer] #78715
07/03/06 13:31
07/03/06 13:31
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Hmmm, guys I'm having a bit trouble figuring out how to properly set this up. I've added all the code and added the 'If' loop that evaluates the panel's alpha too. (inside the while loop of the camera).

However it gives me a transparent blue on top of my screen, but no blur or not big enough to see. What do I do wrong?? The code is basically the same..

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: PHeMoX] #78716
07/03/06 15:10
07/03/06 15:10
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
Could it be that the tga bitmap isnt the same size as the resolution you are
using?

Try including this blur script, an toggle it with the B key;
Code:

//==================================================
// motion_blur.wdl
//==================================================

// Create a blank black (rgb = 7,7,7) bitmap the same size as the screen resolution to render to:
bmap bitmap_motion_blur="bitmap_motion_blur.tga";

// This is the panel that contains that bitmap:
panel panel_motion_blur
{
bmap = bitmap_motion_blur;
layer = -1;
flags = transparent, filter;
pos_x = 0;
pos_y = 0;
}

var motion_blur;

// This essentially sets the transparency (alpha value) of our view at 100fps. Call with values of 0..100:

function set_motion_blur(newval)
{
motion_blur=newval;

if(newval==0)
{
// No blur; shut off the panel:
while(panel_motion_blur.alpha < 100)
{
panel_motion_blur.alpha += 3*time_step;
wait(1);
}
panel_motion_blur.visible=0;
camera.bmap = 0;
}
else
{
// Blur is positive:
panel_motion_blur.visible=1;
camera.bmap = bitmap_motion_blur;
}
}

starter mot_blur()
{
while(1)
{
if(motion_blur)
{
panel_motion_blur.alpha = 100 - pow( ((100-motion_blur)/100), (time/0.16) )*100 ;
}
wait(1);
}
}

var blur_value;

function toggle_blur
{
if( blur_value > 0){ blur_value = 0;}
else{blur_value = 18;}
set_motion_blur(blur_value);//higher = less blur
}

on_b = toggle_blur;





Not two, not one.
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: PHeMoX] #78717
07/03/06 15:11
07/03/06 15:11
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline OP
User
Ichiro  Offline OP
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
My first guess would be that the camera.bmap isn't taking bitmap_motion_blur for some reason. Try moving panel_motion_blur's pos_x and pos_y around. If the view doesn't move, but the blue overlay does, then that's the culprit.

Of course, that still leaves the question of how to fix it, or why it works differently; I think we're using the same version of A6.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: Ichiro] #78718
07/03/06 16:08
07/03/06 16:08
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Nope, that's not it eiher, my resolution is 1024x768 ...

Could this be the effect of an update gone wrong somehow? The refraction shader of Oliver2, originally released in time of A6.31 and off course for A6pro only, works great here. Also a render-to-texture something, albeit with a shader. I'm not sure if this shader is supposed to still work with A6.40.5 pro, but it does work here.

Do you guys use a skycube or something else as a background? It's remarkable that my background color is 0,0,0 (which shows as blue) and the color that panel looks like is also blue-ish. Take a look at this screenshot:


This time I've totally replaced the code with the one Josiah gave,

Edit:
Quote:

If the view doesn't move, but the blue overlay does, then that's the culprit.




I've added a line that changes the pos_x to -300, but it moved the entire view and on the right there's even more blue visible (fully opague that is :S ),

Edit2: When I try to render the panel none-transparent it doesn't show, so this must mean it doesn't get written at all, just like you thought Ichiro. :s I really wonder how on earth I could fix this though,

Cheers

Last edited by PHeMoX; 07/03/06 16:24.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: PHeMoX] #78719
07/03/06 16:45
07/03/06 16:45
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline OP
User
Ichiro  Offline OP
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
Weird. Anyone else having this problem? I can confirm that it works under 6.40.5 Pro, as that's what I'm using here.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: Ichiro] #78720
07/03/06 16:58
07/03/06 16:58
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
It's getting weirder, because I've just managed to get your other code field depth vision to work. I did changed the layers (from -1,-2 to 19 and 20), but it can't possible be that since it gave a blue layer on top.

I've also changed the tga file a few times, even tried stuff with colored tgas, saved as 24bit. I also added a hollow cube around my level, but I guess I could take that one away again.

Anyways, it must be something I did wrong at some point with this code, or render-to-texture started working properly again somehow, because I got depth field vision working now, I guess all I have to do is strip this code down to get the motion blur,



Cheers

Last edited by PHeMoX; 07/03/06 17:01.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: PHeMoX] #78721
07/03/06 17:40
07/03/06 17:40
Joined: Mar 2006
Posts: 35
Sao Paulo, Brazil
EdMercer Offline
Newbie
EdMercer  Offline
Newbie

Joined: Mar 2006
Posts: 35
Sao Paulo, Brazil
@PHeMoX:

You're using shaders along with the blur effect, right ?

I was able to make the code work on my testbed code here, but when I merged it with our latest tarball (wich includes all shaders/effects we intend to ship in the final version) the motion-blur started to act exactly like yours. I has nothing to do with the code 'per se' but an incompatibility with some shader. I'll try to disable them one-by-one to see if I can isolate the culprit.

Re: Cheap, Faked Motion Blur (Pro Edition) [Re: EdMercer] #78722
07/03/06 22:18
07/03/06 22:18
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Yeah, I think I know what you're talking about, I'm not using any shaders yet in the screen I've posted to get the effect though, however in my code there are shader codes.

That might very well explain some of the odd behavior, even if they are not active. Did you mean this? The effect itself as shown on the screenshot doesn't use a shader atm. I'm planning to change that though and add a shader, we'll see what happens then.

I have to add to the incompatibility issue by the way, that sometimes my stencil shadows dissappeared too .. it must be something out there that's causing all this, I swear the upper screenshot has exactly the same code as Ichiro first posted, so it's definately not the code. It might have got to do something with render-to-texture, maybe this isn't as stable and consistent as we all expect it to be?

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: XNASorcerer] #78723
07/05/06 04:23
07/05/06 04:23
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline
Serious User
Stansmedia  Offline
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
I have a problem...




Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Cheap, Faked Motion Blur (Pro Edition) [Re: Stansmedia] #78724
07/05/06 15:12
07/05/06 15:12
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Mmmm, wow, I never had that problem, but is your code exactly the same as the code first posted by Ichiro?

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Page 2 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1