Archived

This topic is now archived and is closed to further replies.

Dark_Guy

Multiple questions ! (>> Special Effects <<)

Recommended Posts

Ok, i''ll jump right into it then. 1.) What is motion blur, and how do I create it in DirectX8 ? 2.) Have you guys seen 3DMark2000 ? It has a speccial effect, that renders a 3D Mesh, and the mesh itself it''s not visible, but it allows a background image to be seen. I want to do the same. For example if there is a background image, and it is not visible. But now, a sphere is rendered in front of it, and so the viewer will see a circle portion of the background...(hope I mademyself clear) 3.) My direct3D programmes always crash on any platform, if I include a MenuSystem. What would be the right way of handleing heavy loadings, AND menus ? 4.) Where could I find tutorials on using the Alpha bending effects ? I did some experimentation, but I can never figure out how to combine theese effects to get what i want... 5.) What kind of special effects are there ? I am working on a DEMO, and I would like to have a really LOT of theese effects, but can''t seem to find them... Oh well, that''s about it for now ! Bye, Robert

"Find the path, follow the Master... Follow the master, understand the master... Overcome the master !"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Direct3D doesn''t include any "special effects", you have to create those yourself using textured triangles and whatever you''ve got.. use your imagination

Share this post


Link to post
Share on other sites
http://www.flipcode.com/demomaking/

take a look here for inspiration, then try to move it into the world of direct3d. good luck!

Share this post


Link to post
Share on other sites
quote:
Original post by Dark_Guy What is motion blur, and how do I create it in DirectX8 ?
This is a simulation of the shutter time artefact. In reality, the camera shutter is opened for some time and when objects move a lot during that time, they will leave a trail on the film instead of a detailed picture. You can fake this effect by rendering your objects multiple times (at different positions during the shutter time) and applying a transparency factor before you blend the resulting images together. You can also create N instances of the same object you want to blur, apply a 1/N transparency factor on their materials, and move them differently in front of the camera. That''s pretty much how Pixar does it.

You can also wiggle your head rapidly left and right when looking at the screen. It''s cheaper, CPU-wise...|8-}

-cb

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
cbenoi1: i''m sorry, but that is the most bloated motionblur implementation i''ve ever heard. pixar probably used it cos they did it non-realtime. but you can do a decent motionblur like this:

1) copy your old frame multiplied by factor alpha to your current screen
2) now draw your new frame first in a temporary frame
3) add this tempory frame multiplied by (1-alpha) to your current frame

0<alpha<1, the smaller, the more blur is introduced..

sure, this isn''t incredibly accurate, but it''s enough for any realtime 3d engine imho and way cheaper and simpler.

using your (pixar?) method is indeed applicable in more situations though: vertical/horizontal blurring on text for instance.

Dark_Guy, demofx: alpha blending, fire, metaballs, particles, radial blur, water. just a small selection..

earx

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
cbenoi1: i''m sorry, but that is the most bloated motionblur implementation i''ve ever heard. pixar probably used it cos they did it non-realtime. but you can do a decent motionblur like this:

1) copy your old frame multiplied by factor alpha to your current screen
2) now draw your new frame first in a temporary frame
3) add this tempory frame multiplied by (1-alpha) to your current frame

0
sure, this isn''t incredibly accurate, but it''s enough for any realtime 3d engine imho and way cheaper and simpler.



This is not motion blur. This is just a feedback effect. Motion blur is when a single frame contains information from within that frames time-step. The method you describe contains no extra information that the viewer hasn''t already seen. Mind you, games have used this effect for years (Magic Carpet had it, and almost every PS2 game has it ). It''s a good way of softening the image a bit, but it really shouldn''t be classed as motion blur - that''s quite misleading!

There are some NVidia and ATI demos that implement fake motion blur in a vertex shader (stretch the object and alpha out the tail), but they require everything to be alpha blended which would be a huge headache in a real game...

HTH

Matt Halpin

Share this post


Link to post
Share on other sites
quote:
Original post by Dark_Guy
2.) Have you guys seen 3DMark2000 ? It has a speccial effect, that renders a 3D Mesh, and the mesh itself it''s not visible, but it allows a background image to be seen.
I want to do the same.
For example if there is a background image, and it is not visible. But now, a sphere is rendered in front of it,
and so the viewer will see a circle portion of the background...(hope I mademyself clear)


Stencil buffer? They probably render the object to the stencil buffer, with stencil writes only and then draw the the background as normal with a stencil test.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
matt:

''no information that the viewer hasn''t already seen''.
that''s not true.. you blend the new frame into it, that''s the new information.

and indeed the ''feedback'' way does not take into account that every timeslice should be weighted in the same way when blending the pictures toghether. but... who will notice? many ppl don''t even notice that their lcd has blur.

and.. the feedback still _blurs_ the motion, so it''s motionblur.
you could have said that it''s not an exact model of the shuttertime artefact (like cbenoi1 said), that would have been correct.

earx

ps sorry for being sucha wise-ass

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
matt:

''no information that the viewer hasn''t already seen''.
that''s not true.. you blend the new frame into it, that''s the new information.



Well, obviously the new frame is new information
But that''s no different from not doing any motion blur.

No motion blur:
The viewer has seen the previous frame.
Now they''re going to see the new frame.

Feedback effect:
The viewer has seen the previous frame.
Now they''re going to see the new frame (but with some of the old frame thrown in as well).

No extra information between the 2 techniques

Your other statements sound like a differing opinion on semantics. That''s fine, but I don''t personally agree to call it motion blur.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
and.. the feedback still _blurs_ the motion, so it''s motionblur.

NTSC blends the odd scanlines with the even scanlines of the next frame (interleaving), which ressembles what you are doing here. It softens the picture somewhat, but still it doesn''t leave the continuous trail of a fast-moving object. For this, you need to take many time samples in-between frames; this is not something cheap for real-time gaming apps.
quote:
Original post by Dark_Guy
1.) What is motion blur, and how do I create it in DirectX8 ?

Since there are many ways to achieve motionblur-like results, what is it you want to apply it for?

-cb

Share this post


Link to post
Share on other sites
Ok ! Sorry, I was away the last few days, but now i''m back, so i''l reply to everyones question ! And btw: Thanks for helping out

+ cbenoi1
Great background on motion blur !!!
Oh ! And the CPU-wise technique works great )))))

+ Anonymus poster does light up a new question for me: what are metaballs ?

+ Matt Halpin
I agree ! Indeed altering the current frame with the old one, is NOT motion blur...But i like the idea, because it does smooth up the image, giving it a "being alive" feel

+Impossible
Unfortunatly I am not fammiliar with stencil buffers yet..
But i could do a similar effect with ALPHA blending,
and texture stages ! But it looked horrible, and I could never get the effect right. It was always RED, and verry blurry, and not clear enaugh...

+ James Trotter
My mistake ! Under platform i wanted to say PC and software enviroment (Like windows 98 and a nVidia graphics card OR a K6 with a Riva128...)

+ cbenoi1
I create game engines, and someone suggested to implement motion blur ! And I did have a few ideas, but i did not like it :/
I will alaso describe the problem !

I made a simple game in direct3D (arcade space shooter)
And i wanted to do the motion blur, so i rendered the scene, increased the alpha values, rendered it again with higher alpha,
and so on for three or four times..
But if i wanted moore, the FPS ould drop radically...
Also there was another problem :
I wanted motion blur on the player''s ship.
With the AI ships it was easy, because i would take the previous AI data, and render the scene !
But the player did action imprevisible, so i could not compute where to render the "blurry" ship...

Anyway, I also noticed that my game radically lacked special effects, so I want to learn about theere, because their quite nice

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well there are a number of issues with your requests.

First and foremost the suggestion you recieved for a "Motion blur" effect on the ship obviously came from someone who did not fully understand what a motion blur is and how it works. A motion blur is usually used to represent massive speed increases in films, you can see this when the starship enterprise goes into "Warp" speed. The ship itself seems to become elongated for a short period of time then once warp is entered the ship Snaps back to it''s origional size & shape. Typically this is how motion bluring works. Trails of the origonal image are left behind and become more transparent the longer they are from the last redraw. So if your ship was moving left to right the right most image would be fully non transparent and the left most image would be fully transparent.

This effect while "cool" for instantanious effects such as the enterprise going into "Warp", or the super hero flash running at high speeds will not look appropriate if used consistantly. You don''t want to leave a motion blur when ever your ship moves left to right up to down unless it''s traveling at "Warp" speed at the current time because it lends itself to become more distracting than anything. Players will need to determine if the motion blured part of the ship is the one being shot at or if the actual ship itself is in danger of being hit by a missle. This will typically frustrate the player.

That said there is another way to accomplish the effect of time based movement with out using a "motion blur". Obviously your ship must have engines to be traveling in space, and those engines have some type of exhaust units. Using a particle system you can create an effect similar which will accomplish the same overall feel as a "motion blur" without the distracting qualities that motionblurs tend to add to game play. Using the particle system you can create a "plasma trail" from your engines which will allow you to show where the ship has traveled from, and give the overall feel that your ship is speeding along at a rapid pase. Longer trails will help make it look as though the ship is moving faster while shorter trails will help make it appear as though the ship is moving slower. http://www.particlesystems.com has alot of information on particle systems that you can look up. That should get you started on the right track.

As for your direct3d programs crashing..Typically direct3d applications don''t "crash" unless you''ve programmed something wrong. You should learn how to use the visual basic debugger to help resolve these problems, and if that doesn''t help perhaps write out a logfile.txt to help you evaluate the problem once the crash happens.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://freespace.virgin.net/hugo.elias/graphics/x_motion.htm

Share this post


Link to post
Share on other sites
switch to opengl so you can use
glEnable( GL_MOTION_BLUR );

(ps: joke)

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
quote:
Original post by _DarkWIng_
switch to opengl so you can use
glEnable( GL_MOTION_BLUR );

(ps: joke)




More likely it''d be an extension - supported by a single vid card maker.

(ps: haha)

Chapel

Share this post


Link to post
Share on other sites
About the motionblur, one would think you could store
the direction and velocity as a vector in the vertex,
and use a vertexshader to extend and alphablend when needed.
This would probably look somewhat like motionblur, even
if i prefer when videogames looks more "real" than a movie, so
im no fan of motionblur

--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites