Show messages: All
1-6
7-13
From: BurrMan
Hey Frederick,
Amateur answer for you here....
The "size" of your object seems to matter with how Max coded the image generation. So if a single object, small enough is the target, then you get a great image.
If its "larger"-"Offset"-"Multiple objects" in viewport, then it gets truncated like you show...
This part of the configuration code seems to control a "Zoom Factor" which controls how much can fit in a "centered view"
........
vp.zoom(1.2);
...........
Look in the ObjLibrary.menu.htm file
So my amateur answer is you can set a larger value to "zoom out" and have it fit your larger object or scene
An "expert answer" could take a better look at the code and see if it could be a more "dynamic size" for all related scenarios...
Anyway.... Thats all i got.
Maybe someone else will jump on it....
From: BurrMan
If you are a "code reader" and want to experiment with results, I would look at this line:
..................
moi.ui.mainWindow.viewpanel.getViewport('3D').render(400, 320).save(savepath+fileName+".png");
..................
And fool around with the render size of the screengrab in relation to the zoom value to get better results for the type of objects you use
From: fcwilt
Hi BurrMan,
Thanks for the reply.
I wonder if the (400, 320) is the ideal size for the image I am supposed to create.
Maybe it's the proportions that are important.
Time to experiment.
Frederick
From: BurrMan
I fooled around with it a bit....
Changing the resolution of the created png file didnt change the behavior you are after
Changing the zoom factor seems to control it better
I found a setting of "2.0" to work as you asked
The line:
...........
vp.zoom(2.0);
...............
With that said, I have no idea what that means
From: fcwilt
Hey BurrMan,
You provided the solution.
Making sure the image ratio is 5:4 (400 divided by 320) and the image comes out nicely centered.
And Windows (I think it is part of Windows) happens to have a tool which allows adjusting an image to exactly 5:4.
Thanks.
Frederick
From: Michael Gibson
Hi Frederick,
re:
> The great thing is when you pick a part to use, it appears ready to adjust it's orientation
> to whatever surface you need, at whatever point you need it.
That's using the ImportPart command, you can run it by right clicking on File > Import.
- Michael
From: fcwilt
Hi Michael.
Good to know.
Before encountering that feature in the Object Library, I was importing parts and messing around with aligning them using move/rotate which was tedious.
Frederick
Show messages: All
1-6
7-13