Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set viewport height/width *in pixels* in Maxscript?

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
1615 Views, 5 Replies

How to set viewport height/width *in pixels* in Maxscript?

Hi Everyone,

 

I'm fairly new to Maxscript.  I'm using 3ds Max 2017.

 

I need to set the x and y dimensions of the viewport in pixels.  (We don't necessarily need to set the z dimension.)

 

Is it possible to do this in Maxscript? If so, how to do it?

 

Thank you in advance,

Jay

5 REPLIES 5
Message 2 of 6
istan
in reply to: Anonymous

what is your expactation? shall 3dsmax resize the window to your settings? what shall 3dsmax do with all the other gui-windows?

 

Message 3 of 6
Anonymous
in reply to: istan

Thank you very much for asking.

 

My ultimate goal really is to render an object to specific pixel location in a bitmap.   To give a simple example, I'd like to render a [20,20,20] cube at pixel location [300,200] of a 800x600 pixel bitmap.

 

I previously posted a couple of messages here about this, but got no response.  So, in trying to break down this problem in simpler problems, I figured that one of the steps involved is to set the viewport dimensions in pixels.  Hence my question. 

 

Hope this clarifies it.  Thanks again!

 

Message 4 of 6
istan
in reply to: Anonymous

Ok. You don't talk about a viewport but a render window - which is a big difference. Then you should rather think about using a camera (orthographic?) with the parameters you need for rendering.
Message 5 of 6
Anonymous
in reply to: istan

Thank you very much for the info.  I tried unsuccessfully to look up how (or even whether) this can be done in Maxscript.

 

Do you happen to know how to set the relevant parameters of the camera (with orthographic projection), please?

Message 6 of 6
istan
in reply to: Anonymous

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report