• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

VaM 1.x Take screenshot with controllers active?

Threads regarding the original VaM 1.x

VRmatt

Active member
Joined
Jul 9, 2022
Messages
285
Solutions
1
Reactions
56
Is it possible to show the (joint) controllers on screen while taking a screenshot?
I'm trying to store some premade physics, and need a screenshot for each.

Scripted solution is fine, its a plugin. Just need to know if its possible.

Thanks!
 
I'm trying to store some premade physics, and need a screenshot for each.
Sounds like a pose presets or just saving the scene is more useful?

Anyway, since image quality probably does not matter, you would not need SuperShot. You could just use any external screenshot tool that would just grab whatever is visible on screen. For example Windows has a built-in Snipping Tool (Win+Shift+S) that should be perfect here. Depending on settings it can grap the full screen, or lets you draw a box if you just want a section of the screen.

That said, if you really need you to, could modify SuperShot to do what you want. But its not worth the effort, I think.
 
Upvote 0
What MacGruber said, just leaving my free tool recommendation: Greenshot.
 
Upvote 0
Dude, it's not a VAM plugin. MacGruber mentioned an external screenshot tool as the best option, and it was one of those I recommended.
 
Upvote 0
Just to clarify - I meant I wanted to run this from a script, in Vam.
Thanks, Greenshot isn't gonna work.
 
Upvote 0
Sounds like a pose presets or just saving the scene is more useful?

Anyway, since image quality probably does not matter, you would not need SuperShot. You could just use any external screenshot tool that would just grab whatever is visible on screen. For example Windows has a built-in Snipping Tool (Win+Shift+S) that should be perfect here. Depending on settings it can grap the full screen, or lets you draw a box if you just want a section of the screen.

That said, if you really need you to, could modify SuperShot to do what you want. But its not worth the effort, I think.
Re: Supershot, I'm totally up for the challenge.
Would you happen to know what methods I'd need to call from Vam, to allow controllers to show?
 
Upvote 0
Re: Supershot, I'm totally up for the challenge.
Would you happen to know what methods I'd need to call from Vam, to allow controllers to show?
Hm.......something like this, see Diff below. All that is needed is messing with the CullingMask and potentially, if you want, not forcing that ClearSelection. In combination with controlling SuperShot via Trigger, for example from LogicBricks it should give you what you need.

If you like to force targets to be on, so the equivalent of pressing T, you can do this:
C#:
SuperController sc = SuperController.singleton;
sc.gameMode = SuperController.GameMode.Edit;
if (!sc.GetTargetShow())
    sc.ToggleTargetsOnWithButton();

Diff:
diff --git "a/Essentials/src/MacGruber_SuperShot.cs" "b/Essentials/src/MacGruber_SuperShot.cs"
index 9ffe8e5..8fa4717 100644
--- "a/Essentials/src/MacGruber_SuperShot.cs"
+++ "b/Essentials/src/MacGruber_SuperShot.cs"
@@ -169,8 +169,10 @@ namespace MacGruber
         private FreeControllerV3 mySelectedController = null;
         private float myWaitClock = 0;
         private bool myNeedSetup = true;
-
+     
         private SuperResolution mySuperRes = new SuperResolution();
+     
+        private int myScreenshotCameraBackupCullingMask = 0;
 
         public override void Init()
         {
@@ -292,7 +294,7 @@ namespace MacGruber
             mySuperRes.OnDestroy();
             Utils.OnDestroyUI();
         }
-
+     
         private void OnEnable()
         {
             SuperController sc = SuperController.singleton;
@@ -308,6 +310,8 @@ namespace MacGruber
             myOriginalScreenshotTexture = myScreenshotCamera.targetTexture;
             myScreenshotCamera.targetTexture = null; // prevent regular VaM screenshot
             myScreenshotCamera.enabled = false; // prevent expensive rendering in the background
+            myScreenshotCameraBackupCullingMask = myScreenshotCamera.cullingMask;
+            myScreenshotCamera.cullingMask = int.MaxValue;
 
             myScreenshotHook = myScreenshotCamera.gameObject.AddComponent<ScreenshotCameraHook>();
             myScreenshotHook.Init(this);
@@ -320,6 +324,7 @@ namespace MacGruber
         {
             mySuperRes.OnDisable();
 
+            myScreenshotCamera.cullingMask = myScreenshotCameraBackupCullingMask;
             myScreenshotCamera.targetTexture = myOriginalScreenshotTexture;
             myScreenshotCamera.enabled = SuperController.singleton.hiResScreenshotPreview.gameObject.activeSelf;
             myScreenshotCamera = null;
@@ -588,7 +593,7 @@ namespace MacGruber
                 {
                     // clear selection to avoid UI elements in the camera image.
                     mySelectedController = sc.GetSelectedController();
-                    sc.ClearSelection();
+                    //sc.ClearSelection();
 
                     // init screenshot sequence
                     mySuperRes.PreRender();
 
Upvote 0
Awesome! Thank you.
I was able to implement some code - but I'm not seeing the person mesh, only the hair and controllers?
Do you know off-hand if there's a layer or configuration I'm missing?

I've tried every layer of culling possible. I've not once seen the Person mesh rendered in the image.
 

Attachments

  • a_20250729_145123.jpg
    a_20250729_145123.jpg
    162.5 KB · Views: 0
Last edited:
Upvote 0
When using int.MaxValue for culling, everything should be included. And I tried above changes yesterday, it worked. Make sure to apply it to the correct camera. SuperShot has multiple. I was using the shot from the player view via Trigger.
 
Upvote 0
When using int.MaxValue for culling, everything should be included. And I tried above changes yesterday, it worked. Make sure to apply it to the correct camera. SuperShot has multiple. I was using the shot from the player view via Trigger.
Worked like a charm! I appreciate the help. I'm trying to learn as much as possible.
 
Upvote 0
I'm trying to learn as much as possible.
I've tried every layer of culling possible.
You probably tried layers 0 to 31. However, the culling value is a bitmask. So for example layer 8 would be 2 to the power of 8, which is 256. int.MaxValue is simply a value with all the bits set.

Look at PostMagic code to see how to enable/disable particular layers. It disables all UI layers and renders them with a separate camera.
 
Upvote 0
Back
Top Bottom