Octane Shortcuts maxscript ver. 2

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
User avatar
oguzbir
Licensed Customer
Posts: 715
Joined: Fri Jun 25, 2010 12:30 am
Contact:

Capture.PNG
Capture.PNG (24.65 KiB) Viewed 5259 times
Hi
Hi, here is my script that I updated earlier.

New features are
- You can set Motion Blur steps
- You can set Obj and Vertex motion blur
- You can go to this forum with a click :)
- Visible to Reflection does not work (I use this with other renderers like Vray or MR)
- You can create a Daylight (Got the idea from acc24ex.. Cheers mate..)
- Create an HDRI environment and can manipulate the rotation of the hdri with a compass. (will tell more about this below)
- You can convert materials with a click
- You can toggle scene lights on and off by globally hiding the lights. This also helps you to switch between Hdri only mode and Daylight or scene lights
- There is a Convert to proxy button as well
- and LiveDB shortcut.
Oguz-OctaneMENU.rar
(3.31 KiB) Downloaded 310 times
The values are constantly updating if you change your selection.

The HDRI function works this way:
There is a material library file that has the information of a Texture Environment map.
In the default value it's set to my computers folder system.
So, you have to change that material library and point your own hdri which you use everyday.

To properly do that:

- 1st, place the "scene_hdri.mat" file to c:\
- You can change the location of the file later by changing the script But first .....
- Open Max
- Do not run script at this stage
- Open material editor and load the scene_hdri.mat file
- There is one texture environment map there.
- Load it to editor and change the rgb_image hdr file to a hdri that use everyday. I use a custom built hdr for most of my scenes as a start.
- Then save the material library overwriting the other file.
- Now drag and drop the script to max viewport.
- Script should start.

If you need to change the location of the scene_hdri.mat file.
Edit script in notepad & find the line that says "C:\Scene_Hdri.mat" change it to
ex. "D:\hdri\Scene_Hdri.mat" re run the script to take effect.

The HDRI button reads the external material library as a temp library. So it doesn't mess up your current material library. Than it assigns that hdri to Environment map. And then creates a compass object and wires 2 way connection to it's Z rotation to environments texture's transformation node.
it works great. Maybe there is room for improvement there but it really works. And speeds up my workflow a lot.

Hope you make use of it every day... :)

PS. I didn't make the script as macroscript because it gets messy if you change the script after you first run it.
So when you are done with the HDRI material file you can edit the script and turn it to a macroscript, where you can put that in a toolbar button.
To do that easily: paste the below text to the start of the file.

macroScript OctaneShortcuts
category:"Oguz"
tooltip:"Octane Shortcuts"
buttonText:"Octane Shortcuts"
Icon:#("UVWUnwrapView",9)
My Portfolio
windows 10 Pro. |1070 + 1070 + 1070 + 1070 | i7 @4.5Ghz
User avatar
acc24ex
Licensed Customer
Posts: 1481
Joined: Fri Mar 19, 2010 10:58 pm
Location: Croatia
Contact:

cool :) - curious wanted to see how you worked around that HDRI - load it from a material library, great workaround, didn't even think of that.. still not sure how to add texture to a shader node.. or why it bugs out, that would be flexible
User avatar
oguzbir
Licensed Customer
Posts: 715
Joined: Fri Jun 25, 2010 12:30 am
Contact:

acc24ex wrote:cool :) - curious wanted to see how you worked around that HDRI - load it from a material library, great workaround, didn't even think of that.. still not sure how to add texture to a shader node.. or why it bugs out, that would be flexible
Thanks mate.
Yeah It just doesn't work as it should. it's a shame really.
I mean it would be very nice if we could access all those from maxscript.
You work hard until late night and boom you stuck with it. I hate that.
Anyway It helps to create workaround and ideas :P
My Portfolio
windows 10 Pro. |1070 + 1070 + 1070 + 1070 | i7 @4.5Ghz
User avatar
acc24ex
Licensed Customer
Posts: 1481
Joined: Fri Mar 19, 2010 10:58 pm
Location: Croatia
Contact:

- maybe if you default the matlib location to use a max script directory, or subdir and direct to save there for automatic setting

- also I was thinking for option B download it would be OK to include one or more of octane's HDRI since your matlib points to your texture directory..

- OK actually user can save his own HDRI to Scene_Hdri.mat.. which is like a save preferences feature.. I'll try that than :)

- I think I'll borrow your HDRI feature right there and paste it in my script if you don't mind.. I'm missing that now, this one is useful anyway - if I bother updating though
- I'm gonna use this definitely, cheers
User avatar
oguzbir
Licensed Customer
Posts: 715
Joined: Fri Jun 25, 2010 12:30 am
Contact:

acc24ex wrote:- maybe if you default the matlib location to use a max script directory, or subdir and direct to save there for automatic setting

- also I was thinking for option B download it would be OK to include one or more of octane's HDRI since your matlib points to your texture directory..

- OK actually user can save his own HDRI to Scene_Hdri.mat.. which is like a save preferences feature.. I'll try that than :)

- I think I'll borrow your HDRI feature right there and paste it in my script if you don't mind.. I'm missing that now, this one is useful anyway - if I bother updating though
- I'm gonna use this definitely, cheers
Well, yeah i know it's a bit messy to setup the hdri thingy but the thing is I originally did this for myself so. :) In fact I'm planning to add another hdri button to setup a second lighting scenario. Exterior and studio I would say.
The thing about the scene_hdri.mat is not because it's the best way. I just found out that it's simpler for me to code. I'm total fiasco in maxscript. I dont understand a thing. When I do I forgot all about it nexttime I need somthg.

About the borrowing problem Well I would kindly ask you not to use it and not to put in your script or even do not please read the code as well. I wont ve asking again. Cause it's so silly of me to say such thing and I cannot say this cheesy joke again. :P

Seriously, use, modify, enhance, delete, what ever you need mate.
Just let me know if you come up with something :idea: .
By the way I just thought of a drop down menu for the HDri's that i could have 5-6 hdris in the list with overcast, sunny, interior, Key light only, Studio, Dark like Hdri images.
It would realy speed up things especially for me as I mainly do product viz.


Cheers,
My Portfolio
windows 10 Pro. |1070 + 1070 + 1070 + 1070 | i7 @4.5Ghz
User avatar
acc24ex
Licensed Customer
Posts: 1481
Joined: Fri Mar 19, 2010 10:58 pm
Location: Croatia
Contact:

- it's not that messy to set up, only people who don't read the text will just run it and say it doesn't work.. but yes, it's real simple to use, no help needed..
- actually I think that is the best challenge, a user interface that is self explanatory

- cool, yeah at a basic level scripting is copy pasting/connecting/modifying existing snippets of code and working it all out - it's fun experimenting and examining stuff..
- it's interesting seeing how people come up with different solutions for a same problem, it's just trying to make sense of it all by intuition and a lot of googleing and deciding how much time you want to spend on it
- I always forget what I was working on after working it months ago, it's only you always relearn much faster :)

- yup, a HDRi list sounds like a great idea, would love to see your choices for HDRI..
- I always seem to default to one c4d default HDRI map - for some reason works in a lot of situation
User avatar
oguzbir
Licensed Customer
Posts: 715
Joined: Fri Jun 25, 2010 12:30 am
Contact:

acc24ex,

I gave it a go and updated the script. Haven't completed yet. I'll upload latest version once I finish.
Also It would be good see people's interest. :)
Capture2.PNG
As you can see I replaced the HDRI button with a listbox.
I updated Scene_Hdri.mat with the 7 hdri's I use most.
When I doubleclick on say, Lightbox. It grabs the 3rd material from the temp library.
And assigns to environment map.
Also creates a compass and wires the rotation with hdri's transform.
I updated the parameter wiring expression so that it rotates rather more nicely.

Added few render setup and mat editor button along with render output size inputs.
it's kindda like will fit my needs at this point.

This library thing works great. I'm thinking of expanding it to materials.
So I can get one click car-paint, skin shader, chrome on the go.
Will work on that soon.

Cheers,
My Portfolio
windows 10 Pro. |1070 + 1070 + 1070 + 1070 | i7 @4.5Ghz
User avatar
tonycho
Licensed Customer
Posts: 391
Joined: Mon Jun 07, 2010 3:03 am
Location: Surabaya - Indonesia
Contact:

Hi Oguz
very nice script :)
thanks for sharring

cant wait for next release :lol:
http://www.antoni3D.com
Win 7 64 |GTX 680 4 Gb (Display) | 3 x GTX690 4Gb | Intel i5 |Corsair 16GB
User avatar
acc24ex
Licensed Customer
Posts: 1481
Joined: Fri Mar 19, 2010 10:58 pm
Location: Croatia
Contact:

the expansion to multiple HDRI looks great
User avatar
oguzbir
Licensed Customer
Posts: 715
Joined: Fri Jun 25, 2010 12:30 am
Contact:

My Portfolio
windows 10 Pro. |1070 + 1070 + 1070 + 1070 | i7 @4.5Ghz
Post Reply

Return to “Autodesk 3Ds Max”