playMaker

Author Topic: take camera screenshot[SOLVED]  (Read 13526 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
take camera screenshot[SOLVED]
« on: October 04, 2015, 04:36:21 PM »
[EDIT] "Take camera screenshot" action is now available on the Ecosystem.

2 actions:

  • Take camera screenshot - (incl high resolution screenshot) from any camera and save as Png/Jpg
  • Take camera screenshot Texture - (incl high resolution screenshot) from any camera and save as Fsm texture only

on ecosystem or https://snipt.net/dudebxl/takecamerascreenshot/

Req: Unity 5 (or Unity 4 pro)
Note: Will not capture the uGUI in screenshot. A bug within Unity itself preventing non-world-space UI items from being captured

any problems post here. thx
« Last Edit: August 24, 2018, 11:26:14 AM by jeanfabre »

richardh

  • Junior Playmaker
  • **
  • Posts: 97
Re: take camera screenshot
« Reply #1 on: December 06, 2015, 07:05:37 PM »
Downloaded this from the ecosystem tonight (Dec 2015) but get the following error:

Quote
Assets/PlayMaker Custom Actions/Application/TakeCameraScreenshot.cs(157,40): error CS0117: `System.IO.File' does not contain a definition for `WriteAllBytes'

I'm using unity 5.1.2

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: take camera screenshot
« Reply #2 on: December 06, 2015, 08:58:51 PM »
Which build are you in? Try pc or mobile build and see if it works.. I dont think action works in webplayer mode due to security reasons. Let me know...

richardh

  • Junior Playmaker
  • **
  • Posts: 97
Re: take camera screenshot
« Reply #3 on: December 07, 2015, 05:59:00 PM »
Yes, I'm using it for a Webplayer (PC) build.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: take camera screenshot
« Reply #4 on: March 12, 2016, 10:47:41 PM »
*** update - Default folder bug corrected (on both actions).

nilton_felicio

  • Playmaker Newbie
  • *
  • Posts: 16
Re: take camera screenshot
« Reply #5 on: March 28, 2016, 02:47:34 PM »
It is possible to know when the Take camera screenshot Texture ready?
That's quickly ?

I would like to follow up with another action only after the Take camera screenshot Texture was ready.
Maybe a progress bar .. While it was being prepared .


I would like to create the Take camera screenshot Texture particular area only. That is only a camera . Not the entire screen. It is possible?
« Last Edit: March 28, 2016, 02:54:57 PM by nilton_felicio »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: take camera screenshot
« Reply #6 on: March 28, 2016, 07:30:49 PM »

just move to the next state when it is done (finish).. You can build your own progress bar using the states

These actions are only for camera and not screenshot. So place the camera however you want and take a picture from that camera.

unclebob

  • Playmaker Newbie
  • *
  • Posts: 25
Re: take camera screenshot
« Reply #7 on: September 13, 2016, 07:41:37 AM »
Hi

using 5.2 pro and windows 7 pro and this action TakeCameraScreenshot

Get this in editor when running scene

Assets/PlayMaker Custom Actions/Application/TakeCameraScreenshot.cs(139,90): error CS0103: The name `saveTexPath' does not exist in the current context

Three times in

(137,57)
(138,83)
(139,90)

Code: [Select]
if (useMypictures.Value == true)saveTexPath = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)+"/";
else if (!useMypictures.Value && !useDefaultFolder.Value) saveTexPath = filePath.Value;
else if (!useMypictures.Value && useDefaultFolder.Value == true) saveTexPath = Application.persistentDataPath;

Suggestions please??

Cheers

Unclebob

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: take camera screenshot
« Reply #8 on: September 13, 2016, 11:43:40 AM »
OK, my bad, confused with another action. It has been corrected, please update action.

t4d

  • Junior Playmaker
  • **
  • Posts: 70
Re: take camera screenshot
« Reply #9 on: May 20, 2018, 05:23:07 AM »
Note: Will not capture the uGUI in screenshot. A bug within Unity itself preventing non-world-space UI items from being captured

any way to Capture the GUI today ?  unity 2018 ?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: take camera screenshot
« Reply #10 on: May 23, 2018, 02:12:05 AM »
Hi,

 the bug seems to be still present...

 Bye,

 Jean

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: take camera screenshot
« Reply #11 on: August 23, 2018, 04:08:20 PM »
Hello there! I have a quite weird issue.

I'm using FullBodyIK to change head rotation and aiming. But when I make a screenshot it render hair objects (separate obj attached to character skeleton) where they would be without implementing IK.

As I imagine it's something related to the scripts execution order, update/late update and maybe time for execution, but I don't know what to do, actually.

In my Script Execution Order: AimIK placed before PlayMakerFSM. I tried  to make a screenshot with time multiplayer 0, so it's not even relate on my fps, everything was paused at that moment.


indie developer of multiplayer adult fighting
http://nakedfighter3d.com

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: take camera screenshot
« Reply #12 on: August 23, 2018, 04:15:54 PM »
I also have a screenshot with exactly the same frame, but with Motion Blur turned on in a PostProcessing. As you can see it somehow blends and smear the hair objects from the proper position and without IK position. So it definitely make a screenshot a little bit faster then all the necessary scripts in frame are calculating.

indie developer of multiplayer adult fighting
http://nakedfighter3d.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: take camera screenshot
« Reply #13 on: August 24, 2018, 03:27:55 AM »
Hi,

ok, I have pushed on the Ecosystem a version of TakeScreenshot called TakeScreenShotLateUpdate that should do the job.

 also, check TakeCameraScreenshot and TakeCameraScreenshotTexture custom actions also on the ecosystem, they give you more possibilities ( only portion of the content since it comes from a camera you setup)

let me know how it works out

 Bye,

 Jean

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: take camera screenshot
« Reply #14 on: August 24, 2018, 10:56:54 AM »
Yes! Perfect! Thanks a lot, it works  ;D ;D ;D
indie developer of multiplayer adult fighting
http://nakedfighter3d.com