MoI discussion forum
MoI discussion forum

Full Version: Save image from MOI

Show messages:  1-8  9-28  29-38

From: jbshorty
23 Oct 2007   [#9]
That's great, Michael. Can you also make a version to grab an image of the Z Buffer? :)

Thanks,
jonah
From: Lish (KHOLISH)
23 Oct 2007   [#10] In reply to [#5]
"Hi Alberto, I have added something to allow for creating images larger than the regular window size.

To get it you need to download this new patch: http://moi3d.com/beta/Sep4_patch4.zip"

Hi Michael...

I think it will be better if you can put all the patch under download page.
From: Michael Gibson
23 Oct 2007   [#11] In reply to [#9]
Hi Jonah,

> That's great, Michael. Can you also make a version to grab an image of the Z Buffer? :)

Unfortunately that is a bit more difficult. I'm not sure that you would want the actual Z-Buffer anyway, since it is non-linear. My guess is that you would want a depth image that had a linear mapping between depth and color?

- Michael
From: Michael Gibson
23 Oct 2007   [#12] In reply to [#10]
Hi Lish,

> I think it will be better if you can put all the patch under download page.

Eventually they'll get bundled up in a new version with a proper installer. For now it is easiest for me to release smaller tweaks in a more informal and quick way just by announcing it on the forum.

- Michael
From: Michael T. (MICTU_UTCIM)
23 Oct 2007   [#13]
Works great Michael G.!
From: jbshorty
23 Oct 2007   [#14] In reply to [#11]
Not exactly sure what you mean about "linear" or "non linear" and how they relate to what i need (want)?... I am using Rhino to screengrab the ZBuffer and then use it as a paint/displacement brush in Modo. The method in Rhino works fine, but the antialiasing doesn't work at same time that ZBuffer is displayed. So i must post-process to enlarge, blur, shrink, etc... I figured it might be possible to have "antialiased zbuffer" grab from Moi. But don't worry if it's too much trouble...

jonah
From: Michael Gibson
23 Oct 2007   [#15] In reply to [#14]
Hi Jonah, I mean that if you were to relate the distance to the color, the zbuffer graph would look something like this:



Instead of just being a straight line. Usually the values in the z-buffer are not actual simple z depths but this kind of proportional value that gives more bits of precision to things that are closer to you.

But the zbuffer would not be antialiased anyway, so that wouldn't really do you any good (except shrinking from a much larger image is a good way to antialias stuff).

- Michael

Attachments:
nonlinear_zbuffer.jpg


From: jbshorty
23 Oct 2007   [#16] In reply to [#15]
That's interesting. Thanks for your explanation. I never imagined the quality of the ZBuffer drops off exponentially as it gets further from the camera. Maybe this is how our eyes/brain function too? that would make sense...

jonah
From: Frenchy Pilou (PILOU)
23 Oct 2007   [#17]
Hi Michael
When you use the shortcut key for make a "big print" http://moi3d.com/forum/index.php?webtag=MOI&msg=1049.5
and modify the number for have different line's apect, use it and make some other thing then closed Moi
When you restart Moi you have again these aspect lines and not the standard lines aspect!
Is that normal? Maybe unpractical because we don't remember the default regulates ;)
I know that they are here http://moi3d.com/forum/index.php?webtag=MOI&msg=1049.5 but...

Another little question :)
In the Option dialog window the button "Restore Defaults" restore also the Shortcut key scripts? (erase added scripts ? )
I don't try it for not to lose the all scripts in case of :)
From: Michael Gibson
23 Oct 2007   [#18] In reply to [#17]
Hi Pilou - that script had this in it originally:

<...> moi.view.lineWidth = 4; v.renderToClipboard( 2560, 2560 ); moi.view.lineWidth = 1; <...>

Notice that there are 2 spots that are setting the line width - it set it to be wider before the call to renderToClipboard(), and then set it back to 1 after. If you want to change this script, you should only modify the first one, and leave the second one to set it back to 1 which restores it.


> In the Option dialog window the button "Restore Defaults" restore also the Shortcut key scripts?
> I don't try it for not lose the all scripts in case of :)

Nope, nothing to worry about, it will leave your shortcut keys alone. :) The only thing that will delete shortcut keys is using the "Delete" button on that shortcut key page.

But it might not be a bad idea to make a back up copy of your moi.ini file just in case, that would make it easy for you to restore whatever settings you need later, all settings are saved in there.

Also when you push "Restore defaults", you then get a choice for whether to restore all defaults or just the ones for the current section. In this case if you go to the View section in Options, you can then use the "just current section" option to get line width back to the default without altering settings on other sections.

- Michael
From: Linker (KJELLO)
23 Oct 2007   [#19] In reply to [#7]
The memory size on my gfx card is 128Mb
From: Frenchy Pilou (PILOU)
23 Oct 2007   [#20] In reply to [#18]
< Notice that there are 2 spots that are setting the line width - it set it to be wider before the call to renderToClipboard(), and then set it back to 1 after. If you want to change this script, you should only modify the first one, and leave the second one to set it back to 1 which restores it.

are you sure?
moi.view.lineWidth = 4; v.renderToClipboard( 2560, 2560 ); moi.view.lineWidth = 1;

Line aspect on the screen change only if I change the second parameter !!!

nothing change if modify the "4"
Lines are modified only if I change the second "1"

1 & 4 = big lines
4 & 4 = big lines
8 & 4 = big lines
1 & 1 = normal lines
4 & 1 = normal lines
8 & 1 = normal lines

Attachments:
big.jpg


From: Michael Gibson
24 Oct 2007   [#21] In reply to [#20]
Hi Pilou, that's true, the image on the screen will only change with the second parameter.

But that script isn't about changing stuff on the screen, it is about changing stuff on the image that is sent to the clipboard. You don't see that image on the screen until you paste it into an image processing program.

The idea of the script is to work like this:


Set line width to a larger number.

Call renderToClipboard() - this will do a special rendering that you don't see on the screen, but the rendering will use all the parameters that are normally set to change the appearance including the larger line width. This rendering is never displayed directly, it goes directly to a bitmap instead.

Then the second call to setting the line width restores it to its original default so that there won't be any change to the regular screen display.


So it is intended that when you run the script, you should not see any change immediately on the screen at all, that's why you want to leave the second parameter to set lineWidth back to 1.

When you change the first line width, you will be changing the appearance of the image that is on the clipboard, paste it in somewhere each time to see the different result.

I hope this clears it up!

- Michael
From: Frenchy Pilou (PILOU)
24 Oct 2007   [#22] In reply to [#21]
hehe I have now full understand
But maybe it's more practical to see the result as soon as in Moi before to past in the 2D prog ;)

another thing is that artifact normal in the 2d prog image ? corners lines are separated!
(that makes the same of course in Moi ; with the 2 parameters changed :)
here I put 64 , (image is 35 % reducted) :)

Ps and my maxi seems to be 2048 * 2048 (in Moi with the past to clipboard) with a video card with 128 megas : normal?

Attachments:
artifact1.jpg


From: Michael Gibson
24 Oct 2007   [#23] In reply to [#22]
> another thing is that artifact normal in the 2d prog image ? corners lines are separated!

Hi Pilou, this is normal at least for now - each edge of the solid is drawn as a separate line so that is the end of each line.

When you have curve segments that are joined together like with a rectangle curve, that will produce ends that are mitered, but completely separate curve objects (which is the case with edge curves like you show) do not get mitered between each other.


> Ps and my maxi seems to be 2048 * 2048 (in Moi with the past to clipboard)
> with a video card with 128 megas : normal?

Yes, this is normal, different video cards will have different limitations. Sometimes the limit is not just in memory but also just what the driver is programmed to allow.

I would generally expect cards that are newer and have more memory to allow larger sizes.

- Michael
From: Frenchy Pilou (PILOU)
24 Oct 2007   [#24] In reply to [#23]
Thx
:) my hardware is some old but works fine (for the moment) :)
From: pitrak
23 May 2009   [#25]
Just tried out this technique, it works great. I was just wondering if it's also possible to grab a screenshot without the shading, so only with the lines. That would allow for some more refined layering in PS!
thanks,
patrick
From: Michael Gibson
23 May 2009   [#26] In reply to [#25]
Hi Patrick - re: hide the shading when taking high res screenshot.

Yup - it's possible to get a wireframe-type view that you can screenshot by hiding all the face sub-objects.

That will leave only the edge-subobjects of solids or surfaces showing, giving you that wireframe type display. Then to get back to normal you show all the faces.

In v1 you can do this by a script, let me know if you need that.

In v2 it's a lot easier to do this by using the "Types" section in the Scene Browser. Go click on the eye icon for "Faces", and it will hide them all (click it again when you are done to show them again):



In the current beta, you can't select solid or surface objects if their faces are hidden, so you need to turn faces back on to being displayed before you can continue working on stuff. But this is fixed up to work better in the next v2 beta, where you can select objects even if their faces are hidden.

- Michael

Image Attachments:
scene_browser_faces.jpg 


From: pitrak
23 May 2009   [#27]
Hi Michael,
apparently I'm not the only one who doesn't get much sleep these days :)

Silly question, I still have to get used to the new functionality of the v2..

That's in fact quite a convenient basis for making non-photorealistic renders:
The only downside is that you cannot have the hidden lines separated as they disappear with the faces.

p
From: Michael Gibson
24 May 2009   [#28] In reply to [#27]
Hi Patrick,

> That's in fact quite a convenient basis for making non-photorealistic
> renders:
> The only downside is that you cannot have the hidden lines
> separated as they disappear with the faces.

Yeah at the moment to make "hidden lines" you also have to have faces showing. There is not any way to have hidden lines but also not have faces displayed with shading at the same time.

But I've now added an option in for the next v2 beta that will allow for that.

The new option will basically make it possible to get a screenshot where the shaded drawing of the faces is eliminated, but the effect of faces on generating hidden lines is retained.

However, this still has the same limitation as the previous "just hide all faces" type wireframe that silhouettes are not dealt with, so it is not a completely proper hidden line wireframe display except for things that happen to already have an edge where a silhouette is at. For example things like spheres will not look proper with this kind of wireframe display, because it only shows surface edgse and spheres only have one edge in them.

I do want to add more proper silhouette type stuff in the future but that will be a lot more work than just adding in an option.

But anyway, the new option will allow for doing screenshots like the following which may be of use:



- Michael

Image Attachments:
SemiHiddenLine.png 


Show messages:  1-8  9-28  29-38