This script is awesome! However I keep getting errors with it:
--Runtime Error: Attempt to access deleted scene object
Line 226 is highlighted
I'm using 3ds Max 2012 sp2 with Xoliul's Viewport Shader 2.0 (which is also awesome). I thought I got it because I had hidden objects in the scene but I got it even with no hidden objects in the scene.
hey man, its me again. im getting this error when i grab it with the SSAO and zdepth turned on. i believe i dont get this error when i only grab a vanilla viewport grab. it seems like its making a material for the other 2 passes but its not deleting them and my model ends up looking darker than it should afterwards. then i have to reset everytime. but the thing is...it actually saves the grabs. so it works it just messes up my materials on the model. help, please, thank you again very much.
could you do me a favor and try adding the following line just above that line it crashes on
if isvalidnode m_scenematarr._object then
then press ctrl+e to evaluate the script and try capturing again.
I'm sure it won't popup that error any longer but i'm curious if it restores your scene the right way.
ah great that's all i needed to know i updated the script so that last error won't popup either. Max must be cleaning up some stuff behind my back in some versions.
you can download the updated script on the site.
Teessider: this also fixes your problem
What a great script, thanks for taking the time to make it AND maintain it!
I found one issue that I'm hoping is an easy fix:
When I render a single PNG image, the screen grab looks perfect, however, if I render a PNG animation sequence, the PNG images get much darker. Any thoughts?
Ok, after doing a little experimentation, I found that a PNG image sequence with alpha on makes the image really dark. When I turned off alpha, the PNG looked perfect. I tried the other image formats and found that only the PNGs had this issue when using alpha during an animation sequence.
I'm wondering if it's just me or if others had this same issue?
So no one else had issues with a dark PNG image sequence with alpha pass checked? If it's on my end I can try to figure it out. I could really use this on a project I'm working on, as it stands now, I have to render 72 frames as an image file...ugh....
So... I finally finished my first proper model using the Xoliul Shader. So far everything is fine.
Now I want to take some nice screenshots with a bit of AA. Ihave no idea how to get that, but the Grabviewport script seems to take screenshots with AA.
I opened Max, created a some standard geometry and tried to take a screenshot. I did NOT customize anything but the path for the images.When I click the save buton, I get this:
Looks like other people get same errors, but I didnยดt change anything, itยดs just a standard scene : (
I get a bluescreen when I try to take a photo. Don't know why. I am simply trying to make a picture at 2x AA. When I try 4x AA I get an error in the script.
I use 3Ds Max 2012, xp, latest drivers (nvidia quadro FX 2700m).
Any idea why?
Hey, curious if anybody has run across an issue when when trying to open the grabviewport menu. Whenever I open it though a menu or a hotkey it always freezes max.
I have installed Windows 7 instead of XP now and I get this error, probably a pretty common problem? How do I solve it? It doesnt matter what is in the scene I always get this error:
"Unknown system exception"
ah great that's all i needed to know i updated the script so that last error won't popup either. Max must be cleaning up some stuff behind my back in some versions.
you can download the updated script on the site.
Teessider: this also fixes your problem
tnx guys
hey ravenslayer again.....sorry for the late reply but thanks (for the reply and making it)
it worked until today when I tried to use your script again (using 3ds Max 2012 with Xoliul's Viewport Shader 2.0) and I got exactly the same error as before on exactly the same line (226)
Also my actual PNG came up black and yet the rest of the passes (AO, Colour, Wire etc) came out as they should be. I've tried changing the size of the capture but it hasn't made a difference unfortunately
Once again thanks! :thumbup:
PS i tried your suggestion (with adding the extra line)...it didn't work
Just thought I would bring something to your attention. I got a chance to try it out for my backpack turntable and I have to say I loved it. However when I setup a scene I usually create a camera and lock it for the view I want. When tweaking the ZDepth (I believe) it deletes my camera when I am done.
When I am not using a camera it creates one and then deletes it, which makes since. Works for me... but it would be awesome if it could pull out of a camera currently in use, create one, tweak the settings, and delete the newly created one.
Not sure if anyone else was having this problem but, it was the only issue I had
Hey guys tnx for the patience and reporting the errors,
jeremiah: i managed to fix the camera deletion and that should be working fine now with premade cameras .
Teessider: judging from the code it wasn't the latest version, try the new one i uploaded, it should take care of that error
c86g: stupid mistake i made but it should be fixed now
Pixeldomain: the png blackening is something i'm looking into. I think it has something to do with the dotnet image filtering i'm using but i'm not sure.
Ikonane: very strange i'm running the same setup, the error shown doesn't tell me anything about what could be wrong. It just stops at a default maxscript function so i'm afraid i can't do something about that. is there any more info in your maxscript listener?
Since i had this open anyway i decided to add a No dialog option. If you shift click your grabviewport button it wil start saving your images using the last saved settings
So make sure you download the latest version if you want to use this.
I got the problem that Grabviewport is not including/saving the viewport shadows.
I works till ~1000x1000 pixels. If i increase the resolution, it saves everything fine but without shadows.
Is my system (graphic card) too weak? Is there a way to get my images with shadows?
So no one else had issues with a dark PNG image sequence with alpha pass checked? If it's on my end I can try to figure it out. I could really use this on a project I'm working on, as it stands now, I have to render 72 frames as an image file...ugh....
Regardless, great script!
I have to agree, Great Script. I am having a problem however when I render out anything other then an image with anti aliasing set to 0, the result is a darkened screen grab. This happens when grabbing animations, or adjusting anti alias settings... Pretty much anytime anything other then a straight image with nothing else adjusted. I think this might be the same problem pixelDomain was mentioning.
I made a thread about a problem i'm having with it, though... but I think I might get answered faster here, so sorry about crossposting:
if I check x2 antialiasing, the final rendered picture ends up with the correct dimensions but noticeable shrinked horizontally, and if I try to render without antialiasing the result is a smaller (at least proportional) image than the size I specify.
For example, if I set the size to 1920x888 I get a 1215x504 image. I tried using "crop", I tried saving to a different image type, and that dind't change the situation.
I'm using 3ds max 2011.
Hi I am using 3ds MAX 2013 and the script opened up fine on the first go and was able to output a simple image. However proceeding tries after that result in an error: "-- Unknown property: "filename" in undefined" highlighting the line of code: m_viewportbmp.filename = m_bmpname
I would really appreciate any help as this would be extremely helpful to use. I've also tried reinstalling 3ds max and deleting and reinstalling the script files in both appdata and the main script folders. It is odd that the script doesn't even work any more on a reinstall of max. Please help!
Hi I am using 3ds MAX 2013 and the script opened up fine on the first go and was able to output a simple image. However proceeding tries after that result in an error: "-- Unknown property: "filename" in undefined" highlighting the line of code: m_viewportbmp.filename = m_bmpname
I would really appreciate any help as this would be extremely helpful to use. I've also tried reinstalling 3ds max and deleting and reinstalling the script files in both appdata and the main script folders. It is odd that the script doesn't even work any more on a reinstall of max. Please help!
Replies
--Runtime Error: Attempt to access deleted scene object
Line 226 is highlighted
I'm using 3ds Max 2012 sp2 with Xoliul's Viewport Shader 2.0 (which is also awesome). I thought I got it because I had hidden objects in the scene but I got it even with no hidden objects in the scene.
Any ideas?
teessider: i'm going to try and reproduce that error here, do you have any special objects in your scene? or a special material on one of them
hey garriola
could you do me a favor and try adding the following line just above that line it crashes on
if isvalidnode m_scenematarr._object then
then press ctrl+e to evaluate the script and try capturing again.
I'm sure it won't popup that error any longer but i'm curious if it restores your scene the right way.
tnx
BUT then i get this...
and it still saves my grabs so it still works, just the error is inconvenient. thanks again man!
you can download the updated script on the site.
Teessider: this also fixes your problem
tnx guys
I found one issue that I'm hoping is an easy fix:
When I render a single PNG image, the screen grab looks perfect, however, if I render a PNG animation sequence, the PNG images get much darker. Any thoughts?
pixelDomain: that's really odd, is it the entire png? and are you using crop on it?
I'm wondering if it's just me or if others had this same issue?
Thanks!
edit: Crop on or off had no effect.
Regardless, great script!
Now I want to take some nice screenshots with a bit of AA. Ihave no idea how to get that, but the Grabviewport script seems to take screenshots with AA.
I opened Max, created a some standard geometry and tried to take a screenshot. I did NOT customize anything but the path for the images.When I click the save buton, I get this:
Looks like other people get same errors, but I didnยดt change anything, itยดs just a standard scene : (
What am I doing wrong? It is Max 2009.
Thanks in advance.
I use 3Ds Max 2012, xp, latest drivers (nvidia quadro FX 2700m).
Any idea why?
The darkening png i can't seem to reproduce over here
c86g: i'll fix that tonight! tnx
"Unknown system exception"
Thanks
hey ravenslayer again.....sorry for the late reply but thanks (for the reply and making it)
it worked until today when I tried to use your script again (using 3ds Max 2012 with Xoliul's Viewport Shader 2.0) and I got exactly the same error as before on exactly the same line (226)
Also my actual PNG came up black and yet the rest of the passes (AO, Colour, Wire etc) came out as they should be. I've tried changing the size of the capture but it hasn't made a difference unfortunately
Once again thanks! :thumbup:
PS i tried your suggestion (with adding the extra line)...it didn't work
When I am not using a camera it creates one and then deletes it, which makes since. Works for me... but it would be awesome if it could pull out of a camera currently in use, create one, tweak the settings, and delete the newly created one.
Not sure if anyone else was having this problem but, it was the only issue I had
jeremiah: i managed to fix the camera deletion and that should be working fine now with premade cameras .
Teessider: judging from the code it wasn't the latest version, try the new one i uploaded, it should take care of that error
c86g: stupid mistake i made but it should be fixed now
Pixeldomain: the png blackening is something i'm looking into. I think it has something to do with the dotnet image filtering i'm using but i'm not sure.
Ikonane: very strange i'm running the same setup, the error shown doesn't tell me anything about what could be wrong. It just stops at a default maxscript function so i'm afraid i can't do something about that. is there any more info in your maxscript listener?
So make sure you download the latest version if you want to use this.
I works till ~1000x1000 pixels. If i increase the resolution, it saves everything fine but without shadows.
Is my system (graphic card) too weak? Is there a way to get my images with shadows?
Heres the issue im getting now
It seems to capture one time just fine, but I get this error which closes max from then after. Its like im good for one shot only haha!
I have to agree, Great Script. I am having a problem however when I render out anything other then an image with anti aliasing set to 0, the result is a darkened screen grab. This happens when grabbing animations, or adjusting anti alias settings... Pretty much anytime anything other then a straight image with nothing else adjusted. I think this might be the same problem pixelDomain was mentioning.
I made a thread about a problem i'm having with it, though... but I think I might get answered faster here, so sorry about crossposting:
if I check x2 antialiasing, the final rendered picture ends up with the correct dimensions but noticeable shrinked horizontally, and if I try to render without antialiasing the result is a smaller (at least proportional) image than the size I specify.
For example, if I set the size to 1920x888 I get a 1215x504 image. I tried using "crop", I tried saving to a different image type, and that dind't change the situation.
I'm using 3ds max 2011.
I would really appreciate any help as this would be extremely helpful to use. I've also tried reinstalling 3ds max and deleting and reinstalling the script files in both appdata and the main script folders. It is odd that the script doesn't even work any more on a reinstall of max. Please help!
\Documents\3dsMax\Grabviewport.ini