1 registered members (AndrewAMD),
827
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Soft filter?
[Re: qwerty823]
#23358
05/28/04 12:46
05/28/04 12:46
|
Joined: Mar 2002
Posts: 1,123 California
Cellulaer
Expert
|
Expert
Joined: Mar 2002
Posts: 1,123
California
|
For Commerical users you can modify it to the following and you'll have motion blur but it is slow (about 10 fps) until I can come up with another method. Can commerical users access camera.bmap at all? ->
function main()
{
blurmap.alpha=50;
//blurcam.bmap=bmap_for_entity(blurmap,0);
cameramove();
}
function cameramove() {
proc_late();
while(1) {
vec_set(blurcam.pos,camera.pos);
vec_set(blurcam.pan,camera.pan);
bmap_for_screen(bmap_for_entity(blurmap,0),1,0);
wait(1);
}
}
---
Do shaders have access to the screen texture?
Last edited by Cellulaer; 05/28/04 12:48.
|
|
|
Re: Soft filter?
[Re: alienheretic]
#23361
05/28/04 16:33
05/28/04 16:33
|
Joined: Nov 2003
Posts: 677 There
Julius
Developer
|
Developer
Joined: Nov 2003
Posts: 677
There
|
you need to move the blurmap closer to the screen, just so it covers the picture.
Julian
flabadabadab.
|
|
|
Re: Soft filter?
[Re: Cellulaer]
#23362
05/28/04 23:03
05/28/04 23:03
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
Quote:
Can commerical users access camera.bmap at all? ->
Nope, gives them a reason to want pro.
Quote:
Do shaders have access to the screen texture?
What do you mean by screen texure? Are you refering to a view entity sprite or the actual backbuffer that gets rendered to?
Some things you could do, turn off the camera or try setting camera.bmap to a screen size texutre (warning, some vid cards limit render texture sizes, but you can probably do the same trick you are using now). You should be able to apply a material to the view entity that has a shader effect (just ask ello, he does it all the time).
For the non-pro people, upgrade. J/K. One thing you can do that will kind of get you some blur type effects, is to create a second camera (or third) and set it to transparent, and to a higher layer then the default camera. Then in a loop, set its x/y/z pan/tilt/roll to the camera's. Then change its arc/aspect to be slightly off from the main camera's. This will give you essentially a double render of the image, and with the right values, a decent blur look. Not sure how the second camera render will affect it.
As to the soft filter type shader, heres an idea i had.
Do it in three passes, first pass will be a slightly larger version of the model, using a soft color, and feathering the alpha at the model edges (based on the normal). Second pass renders's as normal. Third pass will need to be slightly smaller then the model, and be similar to the first pass, but somehow blend with the previous pass. If anyone thinks that might work, feel free to try it. I would if my time wasnt so limited, as I barely have time to read the boards.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
Re: Soft filter?
[Re: qwerty823]
#23363
05/31/04 01:21
05/31/04 01:21
|
Joined: Mar 2004
Posts: 102
Taros
Member
|
Member
Joined: Mar 2004
Posts: 102
|
Here is a glow code i made for fun. I just modified the blur code found on this topic (pro only but maybe you could do something with multiple views, dunno ): Code:
entity blurmap { type = <320X240.tga>; layer = 2; // display above view entities with layer 1 flags = visible,transparent;// visible on screen from the start view = CAMERA; // same camera parameters as the default view albedo = 0; // gouraud shading from sun position x = 278; // place 277 quants ahead of the view y = 1; // center horizontally z = 1; // center vertically }
entity blurmap1 { type = <320X240.tga>; layer = 2; // display above view entities with layer 1 flags = visible,transparent;// visible on screen from the start view = CAMERA; // same camera parameters as the default view albedo = 0; // gouraud shading from sun position x = 278; // place 277 quants ahead of the view y = 2; // center horizontally z = 2; // center vertically }
entity blurmap2 { type = <320X240.tga>; layer = 2; // display above view entities with layer 1 flags = visible,transparent;// visible on screen from the start view = CAMERA; // same camera parameters as the default view albedo = 0; // gouraud shading from sun position x = 278; // place 277 quants ahead of the view y = 3; // center horizontally z = 3; // center vertically }
view blurcam { layer = 0; pos_x = 0; pos_y = 0; size_x = 320; size_y = 240; offset_x = 0; offset_y = 0; flags = visible; }
view blurcam1 { layer = 0; pos_x = 0; pos_y = 0; size_x = 320; size_y = 240; offset_x = 0; offset_y = 0; flags = visible; }
view blurcam2 { layer = 0; pos_x = 0; pos_y = 0; size_x = 320; size_y = 240; offset_x = 0; offset_y = 0; flags = visible; }
function cameramove() { proc_late(); while(1) { vec_set(blurcam.pos,camera.pos); vec_set(blurcam.pan,camera.pan); vec_set(blurcam1.pos,camera.pos); vec_set(blurcam2.pan,camera.pan); wait(1); } }
function activate_blur()//put this in your main function { blurmap.alpha = 60; blurmap1.alpha = 50; blurmap2.alpha = 40; //blurmap.material=mat_glow1; blurmap.bright = on; blurmap1.bright = on; blurmap2.bright = on; blurcam.bmap = bmap_for_entity(blurmap,0); blurcam1.bmap = bmap_for_entity(blurmap1,0); blurcam2.bmap = bmap_for_entity(blurmap2,0); cameramove(); }
A couple of screenshots (copy/paste them to your browser): http://dimenzije.topcities.com/with_glow.jpghttp://dimenzije.topcities.com/no_glow.jpg
|
|
|
|