Plan for Jonathan Farris
by Jonathan Farris · 05/26/2005 (12:19 pm) · 15 comments
The other day on IRC someone asked how they would get an edge detect effect in Torque.
After a bit of thinking, and coding, and tearing my hair out, I've come up with a Gui control that can either be slaved to a camera, or take the current view, and apply an image effect.
So far I've gotten a couple of decent effects as you can see below.
Sobel Edge Dectect (Fast Version)
This is the one that started it all. Based loosely at this point on the sobel edge detect that gimp does. I generally call this the "Hippe" view

Digital Video Transmission
I thought it might be cool to do an in-mission video briefing, so I came up with this effect, a pixelized, interlaced camera view, that can add classic digital video noise.

Complete with transmission error, that locks the view for a second.

Night Vision/Light Amplification
This one is cool. It works similar to how a real night vision scope would work in that it only amplifies visible light. If there is too much light of course you get burn-in/wash-out. Because of this, you also get some nice motion trails.

Here is a crossbow explosion

Sadly my poor mission editing didn't fix the sky/trees so those show up a little bright as you can see.
Currently the control can either render a new view, and apply the effect, or simply take the view underneeth it, and effect that. Of course the later is much faster, but for say the video transmission, it only makes sense for the remote view.
I'm working on getting the effect parameters to be scriptable, currenly I can change which one is done on the fly, but it would be great to adjust the noise probablilies on the video camera say on you distance from the "transmission source".
If anyone is interested, I'll work toward packaging up the whole system as a resource too.
After a bit of thinking, and coding, and tearing my hair out, I've come up with a Gui control that can either be slaved to a camera, or take the current view, and apply an image effect.
So far I've gotten a couple of decent effects as you can see below.
Sobel Edge Dectect (Fast Version)
This is the one that started it all. Based loosely at this point on the sobel edge detect that gimp does. I generally call this the "Hippe" view

Digital Video Transmission
I thought it might be cool to do an in-mission video briefing, so I came up with this effect, a pixelized, interlaced camera view, that can add classic digital video noise.

Complete with transmission error, that locks the view for a second.

Night Vision/Light Amplification
This one is cool. It works similar to how a real night vision scope would work in that it only amplifies visible light. If there is too much light of course you get burn-in/wash-out. Because of this, you also get some nice motion trails.

Here is a crossbow explosion

Sadly my poor mission editing didn't fix the sky/trees so those show up a little bright as you can see.
Currently the control can either render a new view, and apply the effect, or simply take the view underneeth it, and effect that. Of course the later is much faster, but for say the video transmission, it only makes sense for the remote view.
I'm working on getting the effect parameters to be scriptable, currenly I can change which one is done on the fly, but it would be great to adjust the noise probablilies on the video camera say on you distance from the "transmission source".
If anyone is interested, I'll work toward packaging up the whole system as a resource too.
About the author
#2
05/26/2005 (12:24 pm)
Holy crap, that's awesome. Resource PLEASE.
#3
05/26/2005 (12:26 pm)
Great work there. Why don't you tie it into GameTSCtrl, that would eliminate the need of another control, you could just do something like PlayGui.setEffect() or something.
#4
05/26/2005 (12:37 pm)
Wow man, this looks awesome!
#5
05/26/2005 (12:48 pm)
that ROCKS! great stuff!
#7
Looks like a resource would be very well received by the community. I for one would certainly appreciate it. :)
05/26/2005 (2:50 pm)
Excellent work!Looks like a resource would be very well received by the community. I for one would certainly appreciate it. :)
#8
05/26/2005 (3:49 pm)
Heh, cool.
#9
05/26/2005 (7:20 pm)
Very cool! Planning on contributing back? :)
#10
05/27/2005 (12:25 am)
Really cool stuff Jonathon. I think you'd be a hero if you submitted a resource / patch with this stuff in there. Regardless, very cool work. I hope you'll keep doing updates on your work with Torque, it's interesting! Is this effect stuff going to be used in your official project (mentioned in your profile), or did you just do it on the side for fun?
#11
05/27/2005 (12:29 am)
Wicked cool.
#12
This would be a great resource.
05/27/2005 (5:03 am)
I was just thinking about how I could implement night vision googles, and hey presto! That happens so much on this site I hardly have to code anything anymore! ;)This would be a great resource.
#13
05/27/2005 (2:17 pm)
Wow...this is GREAT :D how does it work, just re-renders the scence to a texture or somthing? and does it effect the fps much?...id love to see how this is done, i was thinking about doing somthing like this...and if i could see your code(just for getting a camara to a texture) would be alot of help!...well, looks good :D
#14
I'll let you know when it's posted.
05/27/2005 (2:32 pm)
Ok, the code is packaged up ,and processing through the bowels of the garage games site. The site ate my first attempt to submit it, but it should be somewhere this time.I'll let you know when it's posted.
#15
05/30/2005 (3:12 pm)
I can't wait. :D 
Torque Owner Owen Ortmayer