PDA

View Full Version : Free Script: DOF Target (Channel Modifier)



Matt
04-17-2013, 09:00 PM
Hi all

Finally managed to write a script that I've been wanting to do for a while. It allows you to quickly select an item in the scene to target the camera's Focal Distance so that it will track it no matter where you move the target or the camera. Yes, you can do this with expressions, but there are far too many clicks involved for my liking!

113692

There was a .p plugin that did exactly this, but I *think* it was 32bit only, and I missed it. As always, the code is uncompiled, so anyone wanting to check out how to write a channel modifier script can rip this apart.

Here is the script (also available on my website)
113691

And here is a quick video showing how to use it:
DOF Target Video Tutorial (http://www.pixsim.co.uk/LW_Scripts/dof_target-video_tutorial.zip)

nickdigital
04-17-2013, 09:02 PM
Nice one Matt! Thanks!

Matt
04-17-2013, 09:08 PM
The code also shows how to populate a ListBox gadget will all items in a scene, if you've ever needed to do that in LScript.

valu
04-17-2013, 11:35 PM
Thanks Matt,
Itīs really cool.
I can see a lot of use on this one.
Iīm doing a basket ball short film, and for traking the focus of the player, itīs going to be perfect !
Congratulations for the great job done !

bobakabob
04-18-2013, 12:40 AM
Brilliant, Matt, thank you. Does the camera focus on the object's pivot or the point nearest the camera?

mikala
04-18-2013, 12:53 AM
Thank you. Too kind sir.
I truly admire those that can wrap their heads around math.
I simply don't understand it. So thanks again!

djwaterman
04-18-2013, 02:52 AM
Thanks Matt, love your work.

Matt
04-18-2013, 03:29 AM
Brilliant, Matt, thank you. Does the camera focus on the object's pivot or the point nearest the camera?

It works out the distance from the camera the envelope is activated on to the pivot point of the target item, so if you track a null you can move it to where you like.

daforum
04-18-2013, 05:22 AM
Thanks for the script Matt :)

probiner
04-18-2013, 05:43 AM
Thanks. I don't use expression, but the channel modifier Proximity.

Cheers

Ztreem
04-18-2013, 06:30 AM
Thanks Matt,

The script is not directly needed as you can use the proximity modifier and it involves as many clicks as in your plugin, but I appreciate the effort. :D

Now when you're in the LW dev team can we see a more integrated feature of this in the next version?
Something like this, maybe?
113711

3DGFXStudios
04-18-2013, 07:34 AM
Proximity does exactly this like Ztreem says. I like the idea of having it directly in the camera properties.

Matt
04-18-2013, 12:22 PM
I like the idea of having it directly in the camera properties.

Yes, I already had the same thoughts

Matt
04-18-2013, 12:26 PM
but the channel modifier Proximity.

Interesting, I've never used that modifier, probably because the name doesn't elude to the fact it might do this!

GregMalick
04-18-2013, 01:47 PM
well, your code still is valuable as a learning tool.


BTW, I really miss your original Avatar from Dragon's Lair. . . . . 8~
113718

daforum
04-18-2013, 03:24 PM
Me too, all I get is green?! :)

The Dommo
04-19-2013, 09:25 AM
Lifesaver!
Or rather.... time saver. Actually I'd never delved into expressions so would actually keyframe the DOF distance.... D'oh!

JohnMarchant
04-19-2013, 01:45 PM
well, your code still is valuable as a learning tool.


BTW, I really miss your original Avatar from Dragon's Lair. . . . . 8~
113718

Funny i was thinking the same thing, not seen that avatar in ages

GregMalick
04-19-2013, 05:00 PM
Wow! Matt put back his old avatar.

That's so cool. It's like old times.

Thomas Helzle
04-22-2013, 08:53 AM
+1 :-)
Now I know immediately who's talking once more ;-)
One of the best avatars to remember...

Cheers,

Tom

drako
04-22-2013, 09:16 AM
well done matt excellent idea ztreem

zapper1998
04-22-2013, 12:57 PM
thanks

:)

mikadit
04-23-2013, 03:53 AM
easy and fast dof!
thank you!

daforum
04-23-2013, 06:35 AM
Wow! Matt put back his old avatar.

That's so cool. It's like old times.

No more green, no more green - lovin' the avatar! :)

inkpen3d
04-23-2013, 11:07 AM
Thanks Matt - really, really useful. :)

Presumably, your script could be easily adapted to likewise drive the Min/Max distance channels for Fog or any other entity, such as the intensity falloff for lights, which can use a distance channel. For example, I quite often need to dynamically change Fog Min/Max distance values during an animation as a camera (usually targeted on some object) zooms in/out of a scene in order to make it "feel" as though objects, such as ground planes, are more extensive than they actually are.

Regards,
Peter