Moi Version 4
 1-10  11-25

Previous
Next
 From:  Rainydaylover (DIMITRI)
8779.11 
Michael I think that there is a need of saving screen captures in high resolutions too. The working space views in Moi are so clear that they can be used for print and it is a pity not having a way of saving them for such a purpose. Why having to export, necessarily, the objects to other apps for npr rendering... given that the actual working views in the app are so clear. I do not know how easy is to insert such an ability to Moi but it is something that should be mentioned. The viewing styles (with slightly seen back lines or without the back lines, with various colors etc) are almost perfect for putting them to print (for explanatory diagrams and illustrations in brochures, posters etc), so why not thinking about such a feature...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8779.12 In reply to 8779.11 
Hi Dimitri, you can currently use either .ai or .pdf format export to generate printing output.

That's the main way to do it since it generates 2d vectors.

It is also possible to set up a shortcut key that will do a screenshot, but that will only generate a bitmap. If you want to give that a try though you can find info on it here: http://moi3d.com/forum/index.php?webtag=MOI&msg=1049.5

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Rainydaylover (DIMITRI)
8779.13 
I do know about those ways Michael, I just mentioned the possibility of having a direct way of acquiring bitmaps in high resolution. It was a thought for a possible new feature in v.4. Just wanted to mention it. Thanks for your answer, however. : - )
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8779.14 In reply to 8779.13 
Hi Dimitri,

> I just mentioned the possibility of having a direct way of acquiring bitmaps in high resolution.

Ok, but the way described above where you push a shortcut key and then a bitmap is generated and put into the clipboard is about as direct as it can get.

Could you maybe describe a little bit more details about what you want that's different from that?

Is it that you want to save it to an image file on disk when you take the snapshot instead of putting it in the clipboard? If so then use this method: http://moi3d.com/forum/index.php?webtag=MOI&msg=7542.2

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8779.15 In reply to 8779.13 
Hi DIMITRI.

What you ask is already feasible in V3, but I assume that the same method works also in V4.

Is is very simple and I use it a lot in order to create high-resolution image composition.

What actually Mois miss is the chance to capture the viewport without the background, that is with the background transparent.
Ok, you can always do some "selection" and "masking" stuff in the image composition software (Affinity Photo or any other ) but it could be
better if Moi could make the capture without the background.

Anyway...this is the way I use. I have modified an old script made by someone long time ago (I don't remember who made it) :

1) I have this bunch of JS code placed into a custom Panel, but you can attach it whenever you want :

code:
<script type="text/javascript" >
	function gfx(w, h, button, shiftkey, ctrlkey, altKey)
	{		
		var v = moi.ui.getLastClickedViewport();
		if (!v) { v = moi.ui.mainWindow.viewpanel.getViewport('3D'); }
		
		var curGridDisplay = moi.grid.display;
		var curshowXYAxes = moi.grid.showXYAxes;
		var curshowAxisIcon = moi.view.showAxisIcon;
		var cursshowViewTitles = moi.view.showViewTitles;
		var curlineWidth = moi.view.lineWidth;
		var curmeshAngle = moi.view.meshAngle;
		var curshowHiddenLines = moi.view.showHiddenLines;
		var curlightingStyle = moi.view.lightingStyle;
		var curviewportBackgroundColor = moi.view.viewportBackgroundColor;
		
		var m = (ctrlkey)?1.5:1;
		if (shiftkey) {w = w*m*2; h = h*m*2;}		
		
		moi.grid.display = (button === 2 )?false:true;
		moi.grid.showXYAxes = false;
		moi.view.showHiddenLines = false;
		moi.view.showAxisIcon = false;
		moi.view.showViewTitles = false;		
		//moi.view.viewportBackgroundColor = 0xFFFFFF;
		
		if (altKey) {
			w = w*2; h = h*2;
		}
		
		v.renderToClipboard(w, h);
				
		moi.view.lineWidth = curlineWidth;
		moi.grid.display = curGridDisplay;
		moi.view.meshAngle = curmeshAngle;
		moi.grid.showXYAxes = curshowXYAxes;
		moi.view.showHiddenLines = curshowHiddenLines;	
		moi.view.showAxisIcon = curshowAxisIcon;
		moi.view.showViewTitles = cursshowViewTitles;
		moi.view.viewportBackgroundColor = curviewportBackgroundColor;
		
		var msg = "Rendered To clipboard";
		
		alert(msg);
	}	
</script>


2) I launch the code actually in this way (pressing a UI button)

code:
<moi:CommandButton onbuttonclick="gfx(1600,1200, event.button, event.shiftKey, event.ctrlKey, event.altKey);">CAPTURE</moi:CommandButton>


1600 is my default capture width
1200 is my default capture height

The capture work in this way :

0) The script will capture the last clicked viewport or the 3D viewport if there isn't any last clicked viewport

1) If you press the button with ONLY the LMB then the capture will be 1600x1200
2) If you press the button also keeping the CTRL key pressed then capture resolution will be multiplied by 1.5
3) If you press the button also keeping the SHIFT key pressed then capture resolution will be multiplied by 2
4) If you press the button also keeping the ALT key pressed then capture resolution will be multiplied by 2 again

So :
LMB alone = 1600 x 1200
LMB + CTRL = 2400 x 1800
LMB + SHIFT = 3200 x 2400
LMB + ALT = 3200 x 2400
LMB + CTRL + SHIFT = 4800 x 3600
LMB + CTRL + ALT = 4800 x 3600
LMB + SHIFT + ALT = 6400 x 4800
LMB + CTRL + SHIFT + ALT = 9600 x 7200

The image will be rendered to clipboard.

If you press the RMB instead of LMB then the capture will EXCLUDE the viewport grid.

if you want you can change the background color of the viewport by deleting the comment to this line :
"//moi.view.viewportBackgroundColor = 0xFFFFFF;" where FFFFFF is the Hex color.


Ciao!

Marco (mkdm)

EDITED: 26 Jan 2018 by MKDM

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8779.16 In reply to 8779.13 
Check this demo video :

http://take.ms/GGpPR

Ciao!

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
8779.17 
Mondrian video! ;)
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8779.18 In reply to 8779.17 
Et voilà...

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Metin Seven (METINSEVEN)
8779.19 
L'essence! :D

Regards,

— Metin

———————

visualization • illustration • animation • 3D (print) design — https://metinseven.com

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Rainydaylover (DIMITRI)
8779.20 
Michael I supposed that the bitmap capture would be restricted to the size of the monitor resolution (a small resolution for a poster printing). But now reading Marco's post I see that there is another way of dealing with the whole matter. Will see what can be done and come again here to report what happened. Special thanks to Marco for his so detailed answer!

And not to forget: how do we install such scripts in Moi? Any guide somewhere?

EDITED: 27 Jan 2018 by DIMITRI

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8779.21 In reply to 8779.20 
Hi Dimitri, you can set whatever resolution you want by changing the numbers in the shortcut script.

From the link I posted above (http://moi3d.com/forum/index.php?webtag=MOI&msg=1049.5) this is the script you paste into a shortcut key:

script:var v = moi.ui.getActiveViewport(); if ( v != null ) { moi.view.lineWidth = 4; v.renderToClipboard( 2560, 2560 ); moi.view.lineWidth = 1; }

That will make a viewport image of width = 2560, height = 2560 in the system clipboard so you can paste it into an image editing program.

But if a 2560x2560 image is not a good size for you, just change those 2 numbers in the script. If you are making it pretty low resolution you may also want to edit the linewidth = 4 to just lineWidth = 1 .

There is also a different screenshot mechanism in MoI that will be taken directly from the screen so you'll get just what you see on your monitor. Most people don't like to use that for print since printing can handle much higher resolutions than the screen. But that one goes like this - go to Options > Shortcut keys, add in a new shortcut key and for the command paste in this:

script:var img = moi.view.screenshot( 'viewpanel', false ); var name = img.getSaveFileName(); if ( name != '' ) img.save( name );


Then when you push that shortcut key you should be able to save an image of exactly what you are seeing on screen.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8779.22 In reply to 8779.20 
Hi Dimitri,

> And not to forget: how do we install such scripts in Moi? Any guide somewhere?

For all the ones that I have posted above, you use copy/paste to paste the script code directly into the "Command" part of a shortcut key.

The process for that is - select the line of script text in your web browser. Use Ctrl+C to copy it to the system clipboard.

Now in MoI open up the Options dialog and go to the "Shortcut keys" section. Use the "Add" button to add in a new shortcut key, it will appear at the top of the list. There are 2 parts to each shortcut key, which is represented by 2 columns. The left column labeled "Key" is whatever key you want to trigger the action, like maybe for a screenshot you can use the S key so put in S in that left hand column.

Then the right-hand column contains the command name to run for that shortcut key. You can click in there and use Ctrl+V to paste in the line of script code that you previously copied from here.

Once you have set up a shortcut key with that script as the command part, you will be able to activate that script while you are running MoI by using whatever keyboard key you decided to set in the "Key" column.

Hope that helps!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8779.23 In reply to 8779.20 
You're welcome Dimitri.

Ciao!

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Rainydaylover (DIMITRI)
8779.24 
Thanks Michael, it is ok! : - )
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 8779.25 deleted 2 Feb 2018 by ALEXTESTING
 

Reply to All Reply to All

 

 
 
Show messages:  1-10  11-25