ScriptSpot

Forum topic · General Scripting

Preview Texture resolution Material Editor ?!

By ChukA · 2019-08-10

Description

Hello there !
I would like to know if we can set a value for the resolution of magnify render to the material Editor...
for exemple: select a material, enter to this diffuse map, double click on the sphere material.
it will open a preview (magnify) windows, on the material editor uncheck "show End result".
You will have the preview of your texture map.
I would like to know how to increase this renderer preview.
i use a renderer who set a small pixel ratio and my textures aren't good...

Thanks

Comments (9)

ChukA · 2019-08-11

edited...

.

jahman · 2019-08-10

It can't resize already opened magnify window, but nevertheless



	magnify_window_size = [ 256, 256 ]
	MatEditor.Open()
	DialogMonitorOPS.UnRegisterNotification id:#magnify

	fn OnWindowOpen =
	(	
		local hwnd = DialogMonitorOPS.GetWindowHandle()
		
		if hwnd != undefined do
		(
			local data = windows.getHWNDData hwnd
			
			if data[4] == "#32770" do
			(

                                -- for 2014+ versions
				local pos = windows.getWindowPos hwnd
				windows.setWindowPos hwnd pos.x pos.y magnify_window_size.x magnify_window_size.y true

                                -- alternative version
                                -- (dotNetClass "Autodesk.Max.GlobalInterface").Instance.StretchWindow (dotNetObject "System.IntPtr" hwnd) magnify_window_size.x magnify_window_size.y
							
				DialogMonitorOPS.Enabled = false
				DialogMonitorOPS.UnRegisterNotification id:#magnify
				format "done...\n" 			
			)
			
			
		)
		
		true 
		
	)

	DialogMonitorOPS.RegisterNotification OnWindowOpen id:#magnify
	DialogMonitorOPS.Enabled = true
	actionman.executeAction 2 "40296" -- open magnify preview window

Thanks Jahman, but...nope :(

ChukA · 2019-08-11

Thanks Jahman, but...

nope :( indeed the size of windows is changeable but que quality is not better...
Take a look to the screenshot !

any other idea ? i have this issue only with Fstorm renderer...

Attachments

.

jahman · 2019-08-11

yours looks very different compared to standard magnify window (doubleclick on a slot)

ChukA · 2019-08-11

hum, go into the diffuse slot and put a bitmaptex...
select a file... and uncheck « show end result ».
on the bitmaptex you have « view bitmap » (in the crop selection) - this is the right in my picture
double click on the material - this is my left one.

.

jahman · 2019-08-11

well, perhaps fstorm uses its own custom magnify preview.

or you can probably use renderMap to render and preview the map in desired resolution

ChukA · 2019-08-11

Take a look to this video, you will understand, i've asked to the dev of Fstorm why he said to me that's a limitation of GPU renderer (to be honest it's not cause Octane and redshift works well). I think it set to a basic size like 256*256... that my question does it possible to force it to a best resolution.

VIDEO

regards

.

jahman · 2019-08-11

Since you can't make it work even manually I doubt that there's a way to achieve it via maxscript or whatever else. The way texture looks on renderMap says it all.
Wonder if a square texture will perform any better.

ChukA · 2019-08-12

nope :/ square or not, same result. it's the rendering of magnify itself.
i Can put 10000x10000px always the same result.