Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies) Members Gallery
(516 replies)
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

for Horizon: image dimensions script
show user profile  Garp
I went for the simplest logic I could think of.
It goes like this:

- when the rollout opens, the script grabs the dimensions from max or VRay frame buffer, depending on your settings.
- when a dimension is changed in one unit, the change is reflected in the others.
- when a dimension is changed, if the ratio is locked the other dimension changes as well. Otherwise it's the ratio value that changes.
- when the ratio is changed, it affects the height but not the width, this to be consistent with max.
- since dpi, centimeters and inches are irrelevant when only the screen is concerned, changes to the dpi setting affect only the dimensions in pixels, the 'physical' size (when printed) staying the same.

If you're using the resolution from max, the render scene dialog needs to be closed for the Paste to Renderer button to work. This is because most of the values in that dialog are sticky when it's open. Curiously it is not so when setting the size through VRay.

Sorry but there's no preset implementation. Too much work for just a few seconds saved here and there.
Uncomment the first lines if you need it as a macro.

script (updated)

read 460 times
6/29/2010 2:21:18 PM (last edit: 6/30/2010 9:11:17 AM)
show user profile  horizon
Damn, you actually did it. You're the man Garp, nice job. :P

If it's not too much to ask, could you add megapixel calculation, no need for it to be interactive, just number shown, and a lock for pixels so when changing DPI, the cm and inch change instead (useful when determining the DPI for an already rendered image, rather than searching for resolution to render for print)

I should get into MS again and add the rest of the stuff, it's useful beyond my imagination

read 409 times
6/30/2010 1:54:49 AM (last edit: 6/30/2010 1:54:49 AM)
show user profile  markoid
Yoink... thanks Garp!

read 400 times
6/30/2010 2:57:25 AM (last edit: 6/30/2010 2:57:25 AM)
show user profile  Garp
Almost there, but I need to ask.
About the number of pixels, do you want:
- 1 kilopixel = 1024 pixels and 1 megapixel = 1048,576 (1024 x 1024) pixels
- 1 kilopixel = 1000 pixels and 1 megapixel = 1000000 pixels

The first makes more sense to me since we usually count pixels the same way we count bytes: a 2K image (4 megapixels) is 2048 x 2048, not 2000 x 2000.

For VRay users:
I need some of you to do a quick test.
When testing for the current renderer, with my version of VRay I get V_Ray______1_50_SP1.
In order for the test to work with all versions, I use only the first 5 characters, V_Ray.
The problem is I'm not sure this is consistent between versions.
Could you please switch to VRay, paste classOf renderers.current in the listener and tell me what you get (along with the version you're using)?
Thanks for your help.

read 386 times
6/30/2010 6:57:01 AM (last edit: 6/30/2010 6:57:01 AM)
show user profile  Joey Parker Jr.
Here ya go.
Vray for max 2011:

 photo 2012-sig_small3_zpsbd114b69.png

read 382 times
6/30/2010 7:09:47 AM (last edit: 6/30/2010 7:09:47 AM)
show user profile  Garp
Thanks for that, Joey :)
Since SP5 starts with V_Ray too, it seems safe to assume that versions in between do the same.

Updated the link in the first post.

edit: also if the render dialog is open when pasting the values, it's first closed, then reopen. So no need to bother about it anymore.

read 367 times
6/30/2010 9:08:44 AM (last edit: 6/30/2010 9:10:20 AM)
show user profile  horizon
I can't find a definiton of megapixels that uses 1024 as a base. Never heard of it actually.
Any thought from other people?

The script is now perfect btw

read 338 times
7/1/2010 4:12:54 AM (last edit: 7/1/2010 4:12:54 AM)
show user profile  Joey Parker Jr.
Pixel Count, expressed as Megapixels

Pixel Count, expressed as Megapixels, is simply multiplying the number of horizontal pixels by the number of vertical pixels. It's exactly like calculating area. A 3 MP camera has 2,048 (horizontal) x 1,536 (vertical) pixels, or 3,145,728 pixels. We call this simply 3 MP.
 photo 2012-sig_small3_zpsbd114b69.png

read 334 times
7/1/2010 4:32:21 AM (last edit: 7/1/2010 4:32:21 AM)
show user profile  Garp
If you want to change the way pixels are counted, go to the function updateSize and change the values for kp and mp to respectively 1000.0 and 1000000.0.
And if you want to change the number of decimals, in the same funtion, where you see format, change the string from ".2f" to ".3f" for 3 decimals or whatever you need.

You can also change where the dialog pops up on your screen by going to the last line createDialog...
The values in pos are the offset in pixels between the screen's top left corner and the dialog's top left corner.

How is the layout?

read 330 times
7/1/2010 5:51:42 AM (last edit: 7/1/2010 7:11:07 AM)
#Maxforums IRC
Open chat window