ScriptSpot

Script

Drag & Drop Reference Images

By br0t · 2012-09-26

Date updated
2012-09-11
Votes
17
Download
Download
Description

For modeling in 3ds Max I like to use image planes textured with reference images of my object. Not only for blueprints, but even any reference, because on my laptop screen space is very limited and this way I don't have to switch between applications, just move my view a little. Setting up those planes is annoying, because you would have to create a material for each and then a plane with the right aspect ratio. This script automates all this, by giving you a little window where you can drag and drop any common image type onto. The reference planes will then be created on a line and you can specifiy whether to align height/width of all images. You can also choose a material type and the gamma value that the images are loaded with.

22/08/13: Added scaling option for planes; Script now remembers its settings

03/01/13: Set plane segments to 1 on creation

05/12/12: Removed axis checkboxes, added option to align width or length of the planes, updated image, tightened UI

18/11/12: Removed self-illumination from Standard material. which made things too bright (thanks to DeaDog)

13/10/12: Added option to choose the material type (mr arch&design, standard & vraymtl)

06/10/12: Disabled Real World Scale for maps, added Gamma correction option using a color correction map (thanks to miauu, Kinofaya)

29/09/2012: UI checkbutton fix, thanks to Anubis

27/09/2012: Now recreates image from Base64 string (method by LoneRobot.net, thanks to barigazy); now uses "maxOps.canImportBitmap" thanks to Anubis

Explanatory video:

Videos

Tags: modeling, viewport, plane, model, quick, scene, blueprint, image, Layout, Automate, Reference, time saver

Comments (37)

This link is dead

samehbijo · 2019-11-07

I need this script but the link is dead

Marsman · 2020-02-01

Thank you!

klim3d · 2018-11-05

Oh, thank you very much!)

Does anyone have this script?

klim3d · 2018-11-04

Hi. The site does not work. Does anyone have this script?

checked

jahman · 2018-03-11

Hi,
thanks for the code.
it showing an error. can you check please.

I guess jah.getDotNetImage is the cause of an error since it is my custom function. Replace it with your method that will return System.Drawing.Image from given filepath and it will work as expected.

about script

n3m0 · 2018-01-20

hi!

nice script i was curious about how you coded the drag and drop part of it as it could be useful for another script i want to make
could you give some insight?

thanks!

.

jahman · 2018-01-20

You should really download and check script sources :)


try (destroydialog X ) catch ()
rollout X "" width:132 height:150 (

	label tt "Drop Image Here"
	dotNetControl c "picturebox" pos:[2,20] width:128 height:128
	
	on x open do c.allowDrop = true
	
	on c DragOver sender e do (

		e.Effect = if e.data.ContainsFileDropList() then e.Effect.Move else e.Effect.None
		
	)
	on c DragDrop sender e do (
		
		if e.data.ContainsFileDropList() do (
			
			data = e.data.GetFileDropList()
			files = for k=0 to data.count-1 collect data.item[k]
			
			for f in files where doesFileExist f and maxOps.canImportBitmap f do (

				c.image = jah.getDotNetImage f width:128 height:128 -- create "system.drawing.image" from filename
								
			)
			
		)

	)

)
createDialog X

"jah"

zahid hasan · 2018-03-11

Hi,
thanks for the code.
it showing an error. can you check please.

Thanks

Vinc3r · 2016-06-02

Your script is very useful :)

I've encountered a problem, i put the solution here if others have the same issue : windows wan't allow me to drag & drop a file on 3dsmax ! Solution : don't run 3dsmax in admin mode :)

Thanks

DrStein99 · 2016-02-18

Looks like it's missing "FACE MAP' checked option, that's the only thing makes this a one step operation. nice work, thank you.

asymptote · 2013-10-13

Sorry, I missed the email response on this, many thanks, also I hadn't noticed the plane segments to 1 before, pedantic I know, but anything to save mouse clicks ;)

asymptote · 2013-08-22

Hi ,I use this script everyday to pull reference and 2d plane textures into Max, Is it possible to have a scale setting ?
When working at small scale and I pull in an image the created plane is huge and I always have to resize it. It would be useful to have it come in at a predefined size percentage.

thx

br0t · 2013-08-26

Hey glad to hear, you can now scale it (1.0 = 100%, which is 1 px = 1 world unit) and the script will remember all settings so you dont have to change them each time, cheers!

W DIGITAL · 2012-10-12

this script is super useful!

any chance we can get a version that makes a v-ray material with the bitmap instead of standard?

br0t · 2012-10-16

thanks Ian, yes you can :) you can now choose the material type, so much for my plan to keep the UI simple haha

Question

DeaDog · 2012-11-18

Awesome script! In my case the images were too bright so I overrided the Self-Illumination value to 0 and solved the problem =).

br0t · 2012-11-18

haha you were a little too fast :D I took it out completely and uploaded the new version, thanks for pointing that out

bronius · 2012-10-11

Are you on a 32 bit version?
- x64

With unavailable, you mean that circle with a line through it?
- Yes

In Win7 when I run MAX as admin I can't drag and drop ms, mse, mzp, mcr files, so start MAX as non admin and try again. :)
- Now working. Thank You! :)

forbiden

bronius · 2012-10-10

I can't drop images to the drop area - mouse cursor changes to "unavailable". 3dsMAX 2013 Design, started "as administrator"..

miauu · 2012-10-11

In Win7 when I run MAX as admin I can't drag and drop ms, mse, mzp, mcr files, so start MAX as non admin and try again. :)

Still not good for me

Kinofaya · 2012-10-07

Hi,

I dunno if i am doing something bad, but see my settings.

good luck :)

Attachments

br0t · 2012-10-08

If you use different values in the script, and drag&drop the images again, do they change at all (get darker or lighter)? Because that MUST happen, if you are on Max 2009+

Your settings work on my Max without any gamma correction from the script btw.

answer

Kinofaya · 2012-10-08

Yes when i change the gamma settings in your script, it changes the gamma of the picture.

But i cant get the settings, to get a correct gamma according to my picture.

I am on max 2012.

br0t · 2012-10-10

Hey Kinofaya, I am running out of ideas, but its good that the gamma correction affects your image. Values below 1 will make them darker, values above 1 will make them lighter. So in your case, you should just try some really low values. This is all just meant for modeling references, so it does not have to be exactly correct.

@bronius: I cannot reproduce your error in 3ds Max 2013 x64, sorry, it works for me. Are you on a 32 bit version? With unavailable, you mean that circle with a line through it?

Still have gamma problem

Kinofaya · 2012-10-05

Hi,

I donwloaded the new version, but i still have gamma problem.

I tried with gamma desactivated, then with gamma 1, 2.2, i tried to desactivate the affect material editor things, but still :/

Attachments

br0t · 2012-10-06

Hm okay I have tried about 3 methods now to adress this. Changing DisplayGamma or FileInGamma had no effect. Adjusting image gamma by creating new bitmaps and copying the original ones worked, but it would either overwrite the original ones (thus creating darker or lighter images) or I'd have to save them to disk as a separate file, both not great options.

I have know simply added a color correction map that adjusts the gamma of each image by your desired value. This will only work in 3ds Max 2009+ I fear. It did the job for me and does not affect your image files, please test if it works for you.

Edit: If you are using Gamma 2.2 and you're images are too bright, the reciprocal value of that should work to display your images correctly, so 0.4545

Michele71 · 2012-10-03

Nice job man ;)

Gamma problem

Kinofaya · 2012-10-03

Hi,

First, thanks for this script.

I tried it, but i am facing a gamma problem i believe.

When i drag my Pic.jpg, in max the picture is very bright.
When i try to correct this with the material editor, my changes have no effects on the texture.

Any idea what is the problem ?

Thx in advance

bb

miauu · 2012-10-03

Set your Gamma to 1 and drag ana drop the images. Then return the gamma to initial value.
This also can be implemented in the script.

br0t · 2012-10-05

Hey, you are welcome. I have uploaded a new version where gamma is set to 1 when importing the images (thanks miauu). I am not having any brightness issues, please test if this is working for you and if not, please post your gamma settings.

great script !

artrender · 2012-10-01

this is very useful, is it possible to change the checkbox for real-world map size to off so that the map is sized properly to match the plane? Maybe this is turned on by default by the UI schemes but I am using the designViz.mentalray preset.

subfeel · 2012-10-01

hi! this is very usefull script imho :) big thnx!
but which params i should change in notepad if i don't need length/width segments when script creates plane?

br0t · 2012-10-01

hey subfeel, glad you like it! thats a useful addition, i did not think about segments. There is a line in the script:


pln = Plane width:difMap.bitmap.width length:difMap.bitmap.height material:mat

you can replace it with:


pln = Plane width:difMap.bitmap.width length:difMap.bitmap.height material:mat lengthsegs:1 widthsegs:1

and should get no more segments. I'll add that on the next occasion
cheers

barigazy · 2012-09-26

I send you a mail.