Flicker effect needed...

I’m trying to get more of a flickering effect applied to some text in an animation, kind of along the lines of a hologram disappearing, or (if your a Metroid Prime fan) some of the things they did for opening credits and stuff in the entire trilogy, particularly Prime 3. I know this is rather vague but if anyone can help, It would be most appreciated. If you need more info, I’ll do my best.

Thanks in advanced.

Consider using irregular IPO curves in Materials channels – Alpha for transparency, Emit for self-illumination, various Color shifts in RGB, that kind of thing.

If that’s not enough, you can do a lot of tricks in the Compositor, though getting irregular (flickering) FX usually means using a Time node kind of like an IPO curve, but the Time node curves are much harder to edit accurately.

These “ghosty” effects are all Compositor tricks, just to give you an idea of the possibilities:
Ghost FX #1
Ghost FX #2

Or apply a pydriver to the intensity of a lamp.

Can’t python randomly spit out values for such tasks?

Real holograms have a truely specific pattern called specularity. It is nothing like what you see in the movies or on TV, only with laser lights. Is that what you are trying to achieve? If so you need pixel size rapid fluctuations in intensity with ocaisional moire patterns - the moire patterns you can achieve by overlapping fine lines while the speckle you can get from the blender noise function.

Sure, if you’re willing to learn all the BPython nitty-gritty necessary to script the effects.

It’d be nice to have some IPO and Node random-curve-generation functions available as part of the standard toolset – I dimly recall seeing mention of a script for such sometime in my forum-browsing history, so it may be searchable.

It looks like pydrivers don’t work for lamp energy. At least it does not work for me.

According to the doc, I can place any real number in a pydriver for a given channel.
http://wiki.blender.org/index.php/Dev:Source/Blender/2.42/PyDrivers

In the Blender GUI I set my lamp energy to 0.0
I opened up the IPO and switch to Lamp.
I selected the Energ channel, located at the top of the list.
I pressed the N-Key in the IPO window to bring up the numeric input dialog.
I clicked the little snake to activate the pydriver and typed in the value of 1.0

As far as I understand it, this should override the enery setting for the lamp, which I set to 0.0. But it does not work. The lamp remains black when I render.

Has anyone tried out pydrivers for a lamp?

A simple oneline script could achieve the flicker effect by randomly setting the Energy value between 0.5 and 1.5.


random(0.5,1.0)

That’s not exactly what I was going for, but now re-reading my post, I didn’t explain it the best. I mean, I do want the text to flicker, but what I was going for was more to have it be a static flicker, closer to a tv or, as I said above, like a hologram disappearing, how usually it flickers and fuzzes out, particularly around the edges. And I was going to have sudden motion blur here and there to give it kind of a creepy randomness effect…

Here are the title sequences to the metroid prime tilogy, and kind of the effect I was going for…


I realise that this is still vague but, I don’t really know of a better way to explain it… Sorry.

Thanks for all who answered, I really appreciate it.

My understanding is that for pydrivers the value must be returned from a script in the Text Editor called pydrivers.py, not placed as a constant in the driven channel field as you did. Example:

Function in pydrivers.py

def CalfScaler(DrvrBone):
	# specify Armature object
	Armtr = Object.Get('FemBodArmtr')
	# get the pose data from Armature object
	pose = Armtr.getPose()
	# get posebone
	D_PBone = pose.bones[DrvrBone]
	RotX = D_PBone.quat.toEuler()[0]
	Zloc = -RotX * 2/45
	return Zloc

Python expression placed in the driven channel field:

p.CalfScaler(L Tibia)

What happens: The Python expression passes a parameter (the bone name) to the function in the script and the function does the math and returns a value (contained in variable Zloc) to be used in the driven channel.

The “p.” that precedes the function name in the driven channels is what identifies pydrivers.py as the script to be used.

So put a little script together that uses your random function and returns a value, and refer to its function name in the driven channel field and it should work.

@ darkcodemonkey
Everything I saw in the Metroid intros could be done in Blender using various techniques in combination – direct rendering, Materials effects, and Compositor and/or VSE effects. But there is no push-button solution. You have to know pretty much exactly what effect you’re trying to achieve, and know Blender well enough to decide what tools to use to accomplish the effect, and know when you have to use external apps like Gimp or P-shop, and then put it all together.

So start designing your effect! And experimenting! And learning! :smiley:

Thanks again. I figured there wouldn’t be a “ta-da, here’s your effect” but just to get a general idea to start me on the right track. @chipmasque: I think the effect you described will help me some, but I’ll experiment experiment experiment… all to my hearts content…:smiley:

@chipmasque: Actually it does work with constant values. I forgot that you have to Enable Script Links for the pydrivers to process. Once I did this, the random value started working.

This code works as a random value generator for the Energ IPO channel:


n.random()

Also this to keep from going totally black.


0.2 + n.random()

Here is even another one. It uses the position of the lamp itself as the sampling position from the turbulence texture. As the lamp moves, it’s light value changes.


0.2 + n.turbulence([self.LocX,self.LocY,self.LocZ],0.0,1.0,0,0.5,2.0)

Attachments

ras_animated_flicker_lamp.blend (165 KB)

Very cool, Atom. That could be extremely useful. I guess the pydrivers approach I learned was geared more toward multi-statement functions rather than individual expressions that produce a value. Thinking back I now recall that you can put any valid python expression in the driven channel field, so it can either produce a value directly or call a function in a script that returns a value.

What does the “n.” prefix in your expressions signify?

If you review the docs:
http://wiki.blender.org/index.php/De…2.42/PyDrivers

It mentions there are some pre-programmed global variables. The n actually stands for Blender.Noise
So all the functions available by the Noise module you can address with just “n.”
http://www.zoo-logique.org/3D.Blender/scripts_python/API/Noise-module.html

There are two other globals as well. “b” for Blender and “m” for math. So m.cos(m.pi * b.Get(“curframe”) / n.random()) is valid.

I like the concept of having more than one line, however. I may have to look into setting up a pydriver.py and testing that out as well.

Thanks for the documentation links. Bookmarked! I usually use the API pages, but it seems there’s more info spread all over the place – digging it up can be a chore sometimes, 'less you got good community help :smiley:

EDIT: Took a quick glance at the docs page you posted and the info about pydrivers.py (the full-script approach) is lower down on the same page.