Hmm, a friend of mine was having issues with Z Passes in realtime also, here is my old shader, but slightly corrected for Z-Depth, mind if you guys take a test on it?
hmm.. im running into some new issues. if i render the exact size of my max viewport (1364 x 769) everything turns out fine. however, if i decide to resize it bigger (im going for 1920 x 1080 specifically), it removes my background image, and any transparent materials i have get duplicated and appear twice on the screen, once where it actually is, and once where it used to be before re-size.
so when i am saving out an animation sequence, be it .tga .png or anything, it defaults to saving as a .avi. is there any way i can have it not do that (i want the tga sequence so the alpha can be embedded in the targas?
also is there some sort of filesize limit to the script? im trying to render a 1920 x 1065 video and since it defaults to .avi, when it is done i can see it is the actual file size (8 seconds, 1.92gb) but then a moment later it goes to .99gb and 4 seconds.
The animation files get pretty big quick, so when you go for largescale avis it might start bugging just because of max.
I'm reworking the script from the ground up to optimize it atm and to get all the bugs out. The animation option wil also benefit from this and i'll add the tga sequence option as wel.
im still getting some issues with the script when it comes to taking screenshots larger than the viewport. there is a plane behind my object thats being used for ground shadows and sort of an ambient light bounce and when a screenshot is taken at the size of the viewport, the plane does not appear. when the screenshot is taken at a higher res than the viewport, the plane in the background sort of creates this ghosting effect as if there is another plane behind it.
also at times when rendering, the object will lose its material and be replaced with a regular grey mat.. and the plane will receive the material from the object.
Wanted to request a feature. I tried looking for a solution myself, but havent come up with anything so far.
I've been using it with the "realistic" view in 2012 and the lighting looks good in the viewport. When I use grabviewport, it actually grabs the view with none of the soft ambient occlusion lighting. I suspect its because the ambient gets iteratively developed rather than instantly rendered. So I looked for a way to delay the screengrab but couldnt find on. Is there any way to make it so that the grab happens after the lighting has settled?
I guess it doesnt matter if you're using xoliul, which is my next option.
I have an issue with your grabviewport script, which is awesome by the way
I'm using max's standard viewport shader with an alpha texture for some hair fins.
The problem is the aliased edges of the alpha planes don't scaled up with the rest of the image .. They float separately and don't appear to be used/caried forward with the grab viewport script.
I'm using Max2011 SP2, but this also happens on max2010 and 2012.
I'm gonna jump in and suggest it probably has to do with either Softshadows (does not work with large res viewport grabbing, thx autodesk) or Transparency quality (try all 3 settings).
Setting the transparency to None actually yielded better results and the grab viewport script works fine with my hair alpha. Simple also works, but doesn't look as good.
Thanks
Seeing as we are in the spirit of improvement ... I have a few suggestions on this script as well...
Viewport Size ... can we have a cropped viewport? For a tall character on a wide screen there is a lot of screen space rendered that doesn't need to be.
Save Settings .. an incremental name saving system for those who will take many many screen shots like me ... a Save+1 button?
These are very minor suggestions on what is an awesome and very useful little script. Thanks again.
One more thing I've noticed about running viewportGrab is that the amount of memory max uses increases each time you use the script. After several grabs things can start to get a little slow so I suggest running a garbage collect every once in a while. Perhaos this could be added to the script?
hey Ravenslayer, great script....I had the visibility in undefined error also, MAX 2011 64 bit, never used 3ds clean or any custom set-up....got around it by deleting .visibility from the script wherever it came up as an error while trying to execute the script...works just fine now...odd huh?
hey seth , i don't really know what the problem is with some of these max versions but my check is adjusted in the new script i'll be releasing so it checks for the ViewCubeOps itself instead of the visibility attributes (which was a stupid thing to do to begin with)
So i finally found the time to start adjusting and optimising this script, from the looks of it i'll probably be done somewhere this weekend. It should be A LOT faster since it doesn't work with scenestates anymore and i now try to do as little double work as possible if multiple passes are being made.
I'm also adding in some of the minor suggestions given but the bigger ones will be for later.
First a "bugfree" script, not really possible if you're using maxscript but i'm trying to work around everything that could be a problem
fun little line of code
while m_vps.ShadowsActive do m_vps.ShadowsActive = false
i need to do this otherwise he just skips the false argument sometimes...
For those who are interested i'm finalising my 2.5 release.
It's a pretty big update when it comes to usability and stability from the tests i've done now but i'd like to have some more people to test it.
If you're interested pm me and i'll send you the script
some features and fixes:
- textureAlphas should now always work in the alpha, color and zdepth passes (standard,Xoliul 1 & 2 shaders, 3Point Shader are supported)
- New Viewportscaling technique fixes soft shadows scaling issue and should also enable nitrous captures.
- Presets of all settings can be made and loaded, Last Settings are also always saved.
- Tags for filenames and directories are supported , quick tag inset tool is also available
- Cropping to Safeframes has been added
- Anti Aliasing has been added
- Scenestate method has been removed and should speed up the process
- Animations can be saved as Avi or image sequences for all passes
- Both the SSAO and the Zdepth Pass can be live tweaked by pressing the buttons next to the checkboxes.
For those who are interested i'm finalising my 2.5 release.
It's a pretty big update when it comes to usability and stability from the tests i've done now but i'd like to have some more people to test it.
If you're interested pm me and i'll send you the script
some features and fixes:
- textureAlphas should now always work in the alpha, color and zdepth passes (standard,Xoliul 1 & 2 shaders, 3Point Shader are supported)
- New Viewportscaling technique fixes soft shadows scaling issue and should also enable nitrous captures.
- Presets of all settings can be made and loaded, Last Settings are also always saved.
- Tags for filenames and directories are supported , quick tag inset tool is also available
- Cropping to Safeframes has been added
- Anti Aliasing has been added
- Scenestate method has been removed and should speed up the process
- Animations can be saved as Avi or image sequences for all passes
- Both the SSAO and the Zdepth Pass can be live tweaked by pressing the buttons next to the checkboxes.
i'll quote this to the new page just so people don't miss it
if you save an animation to an image sequence with the new version will it include the alpha channel in each image?
I've been trying to figure out a good way to do this recently and this would make life a lot easier
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.
Replies
http://www.mediafire.com/?zpn0fb2bv45mx4t
You should be able to changed colors and go upto 5 digit values incase (like me) you're using M/CM units in Max.
also is there some sort of filesize limit to the script? im trying to render a 1920 x 1065 video and since it defaults to .avi, when it is done i can see it is the actual file size (8 seconds, 1.92gb) but then a moment later it goes to .99gb and 4 seconds.
I'm reworking the script from the ground up to optimize it atm and to get all the bugs out. The animation option wil also benefit from this and i'll add the tga sequence option as wel.
Sorry for the wait
im still getting some issues with the script when it comes to taking screenshots larger than the viewport. there is a plane behind my object thats being used for ground shadows and sort of an ambient light bounce and when a screenshot is taken at the size of the viewport, the plane does not appear. when the screenshot is taken at a higher res than the viewport, the plane in the background sort of creates this ghosting effect as if there is another plane behind it.
also at times when rendering, the object will lose its material and be replaced with a regular grey mat.. and the plane will receive the material from the object.
this is all happening with the Xoliul II shader.
I've been using it with the "realistic" view in 2012 and the lighting looks good in the viewport. When I use grabviewport, it actually grabs the view with none of the soft ambient occlusion lighting. I suspect its because the ambient gets iteratively developed rather than instantly rendered. So I looked for a way to delay the screengrab but couldnt find on. Is there any way to make it so that the grab happens after the lighting has settled?
I guess it doesnt matter if you're using xoliul, which is my next option.
I have an issue with your grabviewport script, which is awesome by the way
I'm using max's standard viewport shader with an alpha texture for some hair fins.
The problem is the aliased edges of the alpha planes don't scaled up with the rest of the image .. They float separately and don't appear to be used/caried forward with the grab viewport script.
I'm using Max2011 SP2, but this also happens on max2010 and 2012.
Any ideas?
and Thanks
Setting the transparency to None actually yielded better results and the grab viewport script works fine with my hair alpha. Simple also works, but doesn't look as good.
Thanks
Seeing as we are in the spirit of improvement ... I have a few suggestions on this script as well...
Viewport Size ... can we have a cropped viewport? For a tall character on a wide screen there is a lot of screen space rendered that doesn't need to be.
Save Settings .. an incremental name saving system for those who will take many many screen shots like me ... a Save+1 button?
These are very minor suggestions on what is an awesome and very useful little script. Thanks again.
the alpha mask layer currently doesn't account for double sided materials or the materials alpha channel :S
Which is making my hair alpha planes a little tricky to work with.
Transparency is set to None, shadows Hard and the Xoiliul material is double sided with clipping at 0.3.
anyway tnx for the suggestions, most of them sound pretty good additions so when i finally do update the script they probably will be in there.
thanks again for the ace script
So i finally found the time to start adjusting and optimising this script, from the looks of it i'll probably be done somewhere this weekend. It should be A LOT faster since it doesn't work with scenestates anymore and i now try to do as little double work as possible if multiple passes are being made.
I'm also adding in some of the minor suggestions given but the bigger ones will be for later.
First a "bugfree" script, not really possible if you're using maxscript but i'm trying to work around everything that could be a problem
fun little line of code
i need to do this otherwise he just skips the false argument sometimes...
It's a pretty big update when it comes to usability and stability from the tests i've done now but i'd like to have some more people to test it.
If you're interested pm me and i'll send you the script
some features and fixes:
- textureAlphas should now always work in the alpha, color and zdepth passes (standard,Xoliul 1 & 2 shaders, 3Point Shader are supported)
- New Viewportscaling technique fixes soft shadows scaling issue and should also enable nitrous captures.
- Presets of all settings can be made and loaded, Last Settings are also always saved.
- Tags for filenames and directories are supported , quick tag inset tool is also available
- Cropping to Safeframes has been added
- Anti Aliasing has been added
- Scenestate method has been removed and should speed up the process
- Animations can be saved as Avi or image sequences for all passes
- Both the SSAO and the Zdepth Pass can be live tweaked by pressing the buttons next to the checkboxes.
i'll quote this to the new page just so people don't miss it
BETA TESTERS ARE STILL WELCOME!
I've been trying to figure out a good way to do this recently and this would make life a lot easier
Thanks for the awesome tool!
general message:
For questions and bugreports about the new script please post them here
http://www.polycount.com/forum/showthread.php?t=92812
i'll check this one more ofter
--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?