Setting viewport antialiasing through maxscript

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2011   #1
Setting viewport antialiasing through maxscript

How can I set d3d viewport antialiasing sample settings (None/8 Samples) with maxscript?
What I'm trying to achieve is very similar to this:
http://forums.cgsociety.org/showpos...947&postcount=6
I tried to modify it but couldn't get it working.
Anyone could help?
 
Old 09 September 2011   #2
I'm in Max 2009 and here still not such settings for Direcr3D, but recently friend of mine with Max 2011 ask me the same script. In his config dialog he has only 3 items to choose from ("None", "2 Samples", "4 Samples"), so I made a script to toggle those combobox by index between 0 and 2 (first and third) item. I have no idea how to check how many items has this combobox, so if you has more items, modify that index. The script is tested on Max 2011 only. I hope it helps anyway.
Attached Files
File Type: txt toggleD3DAASamples.ms.txt (2.3 KB, 26 views)
__________________
* everyone can win previous war
 
Old 09 September 2011   #3
don't go wild, everything is much easier:
Code:
dx_ini = getdir #maxroot + "d3dgfx.ini" AALines = getINISetting dx_ini #Settings "AALines" setINISetting dx_ini #Settings "AALines" (1 as string) -- enable Antialised Lines AAQuality = getINISetting dx_ini #Settings "AAQuality" setINISetting dx_ini #Settings "AAQuality" (2 as string) -- set Antialiasing to "2 samples" --- changes will take effect next time you start MAX
 
Old 09 September 2011   #4
@Panayot

Thank you very much!!! it was easy to adapt it for 8x. I just changed state to 3.

@denisT

Thanks. It's indeed easily altered by editing the .ini file but unfortunately as you mentioned max needs to be restarted. But Panayot's script makes this change on-the-fly.
 
Old 09 September 2011   #5
Quote:
Originally Posted by halloween
Panayot's script makes this change on-the-fly.


no, it doesn't. you have to restart max to take effect of the change.
 
Old 09 September 2011   #6
Quote:
Originally Posted by denisT
don't go wild, everything is much easier:
Code:
dx_ini = getdir #maxroot + "d3dgfx.ini" AALines = getINISetting dx_ini #Settings "AALines" setINISetting dx_ini #Settings "AALines" (1 as string) -- enable Antialised Lines AAQuality = getINISetting dx_ini #Settings "AAQuality" setINISetting dx_ini #Settings "AAQuality" (2 as string) -- set Antialiasing to "2 samples" --- changes will take effect next time you start MAX

Nice!
Just to remember, I'm on Max 2009 and no such ini file here.
I just make a friendly favour with what I have
__________________
* everyone can win previous war
 
Old 09 September 2011   #7
Quote:
Originally Posted by denisT
no, it doesn't. you have to restart max to take effect of the change.


Then how come I can see the antialiasing effect on viewport instantly after executing the script, without even restarting max? Is it related to graphics card, or its driver or 3ds max version?
 
Old 09 September 2011   #8
Quote:
Originally Posted by halloween
Then how come I can see the antialiasing effect on viewport instantly after executing the script, without even restarting max?


the answer is very simple. NO WAY. you can't see effect without restarting max, and max tells you about it every time when you change any configuration parameter manually.
 
Old 09 September 2011   #9
Quote:
Originally Posted by denisT
the answer is very simple. NO WAY. you can't see effect without restarting max, and max tells you about it every time when you change any configuration parameter manually.


I dont know why but none of those configuration parameters showing me any restart warning and they're being applied after closing the dialogue. Check this:

http://www.youtube.com/watch?v=diNV9Mcfu9c
 
Old 09 September 2011   #10
probably you have a gift version of max ...
 
Old 09 September 2011   #11
Or simply because he has a Quadro? :P
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 09 September 2011   #12
And this is how Panayot's uiaccessor script works:
http://www.youtube.com/watch?v=f6kb5fW8lmo
Script's first run takes couple of seconds, but subsequent runs are almost instant.
 
Old 09 September 2011   #13
could you give your max version, graphic card, and drivers version please?
 
Old 09 September 2011   #14
max: 2012 x64 (sp1 and hotfixes installed)
card: Quadro 4000
driver: 280.19
 
Old 09 September 2011   #15


and these are my d3d settings, it's relevant maybe?
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:13 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.