Author Topic: Script - PresetOnCams  (Read 17018 times)

2016-04-25, 11:25:05

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
Hi guys,
this is a script for having a different rendersetup on our each cameras.
the same presetoncams in my bad old crntools script but much better and stable.
it features:
- different object list to hide on each camera, listed in a custom include/exclude list.
- common corona rendersetup controls.
I've been done a lot of test with some lightweight scene, and it is 99% works for me.
but reminding that I'm just not a professional programmer/scripter (autodidact), then I'm sure that you'll find many codes isn't written with optimal methods.
and... i cant find any words to describe what the script does but trust me it is worth to try :)

update:
12-5-16, script updated (fixed stupid bugs)
21-6-16, PresetOnCams v0.2 (new feature: simple BatchRendering, some data storing rewrite). note: delete old presetoncams-startup file first in 3dsmax\scripts\startup
« Last Edit: 2016-06-24, 08:56:00 by noel20 »

2016-04-25, 14:56:49
Reply #1

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi noel20. Thanks for the script. It looks like something I've been looking for in a while. But... I can't figure out how to get it to work. I've tried to install both scripts (also the StartUp Script), and found them in the UI configuration, but how do they work?

I feel a bit stupid asking this, but can you share a little "how to use this script" knowledge?

Once again thanks :)

2016-04-25, 15:01:27
Reply #2

DarcTheo

  • Active Users
  • **
  • Posts: 175
    • View Profile
on a quick scan of it, i couldnt figure out how to use custom hide/show objects for each camera and it kept changing the aspect ratios for different cameras, forgetting what i had set it as.

Is there also a way to use this with batch rendering? hiding objects etc

2016-04-25, 16:37:42
Reply #3

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
Ah sorry guys, i didnt give the how to use words. ;)
Here we go:
1.select a camera you need to configure the preset in the list box.
2.press the button "setup is disabled", until the text changed to "enabled"
3.change the controls as desired
4.hide objects with include/exclude button on performance rollout, the function is as the same as common "include/exclude" in max
5.press the button "render selected camera" to render with current preset.

Batch rendering is already planned. I'll make it when i have enough free time.
Tomorrow i'll record a video for tutorial, i'm not good on explanation.. Because im not good in english too :)
Cheers

Edit:
[/quote]
it kept changing the aspect ratios for different cameras, forgetting what i had set it as.
I'm not sure how could it happen. But i'll check it againmto make sure. Btw, i used it on some projects and works smoothly..
« Last Edit: 2016-04-25, 16:48:56 by noel20 »

2016-04-25, 16:58:40
Reply #4

DarcTheo

  • Active Users
  • **
  • Posts: 175
    • View Profile
I can explain what i did, maybe i used it wrong. I enabled it for view 1 2 and 3. clicked view 1 and put ratio as 1.7 then clicked 2 and used ratio 2 and 3 ratio 2. then when i clicked back to view 1 it was ratio 2 and view 2 was ratio 1.7 and view 3 was ratio 2. I tried pressing enter each time before clicking the next view but it kept changing them still. I'll try again later!

Thanks for this btw. With batch rendering it will be awesome as well. :)


2016-04-25, 18:23:47
Reply #5

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi noel20. I tried a bit more, and found out a couple of things.

1) First of all the script doesn't work in 3dsMaxDesign2014 - it's impossible to enable a camera/preset

2) It does work I Max2016 in some degree. I can confirm the ratio issue described by DarcTheo. My workflow is similar to his and my result is the same. There seems also to be a problem with the exclude settings: they doesn't change with the camera selection and they doesn't render. And sometimes I receives an script-error rapport when trying to render with "exclude" activated.

I really hope it's me doing something wrong. I really could use the functionality your script offers :)

Regards

2016-04-26, 04:20:18
Reply #6

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
about the output size, lets say I have 2 camera named cam1 and cam2.
now I enable both camera's setup by pressing the setup enable button. then, in cam1 I change the output width to 2000 and output height to 1000.
ok, now I go to the cam2 setup, I see that the output width value is 2000 and the height is 1000 too. its value is changed to last selected cam output width/height value, and this is the correct behavior. it will has its own value only if I changed the value.
the point is you have to change the value of cam2 first to make the cam2 value independent (not following the cam1 or generally following last selected cam's value).
hope you guys understand hahaha :)
And sometimes I receives an script-error rapport when trying to render with "exclude" activated.
can you send me the error report showed in maxscript listener?

edit:
oh mann, I didn't read your words carefully. you guys asked me about ratio spinner incorrect function and I replied with stupid unrelated long explanation.
then you must remember that you have to be very patient and tolerant when having a conversation with me :D
ok, its fixed now. I have replaced the attachments on the first post. check it out :D
« Last Edit: 2016-04-26, 04:32:22 by noel20 »

2016-04-26, 13:13:36
Reply #7

DarcTheo

  • Active Users
  • **
  • Posts: 175
    • View Profile
can confirm the ratio now works, thanks!

2016-04-26, 15:54:35
Reply #8

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello Noel20, good job

This folder is !? :

\Program Files\Autodesk\3ds Max\scripts\Startup\dionchstudio - presetoncams -startup.ms
\Program Files\Autodesk\3ds Max\stdplugs\stdscripts\dionchstudio - preset on cams.ms

2016-04-27, 04:38:22
Reply #9

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
Hello Noel20, good job

This folder is !? :

\Program Files\Autodesk\3ds Max\scripts\Startup\dionchstudio - presetoncams -startup.ms
\Program Files\Autodesk\3ds Max\stdplugs\stdscripts\dionchstudio - preset on cams.ms
hi rafpug, thanx :)
here it is the correct one
\Program Files\Autodesk\3ds Max\scripts\dionchstudio - preset on cams.ms
\Program Files\Autodesk\3ds Max\scripts\Startup\dionchstudio - presetoncams -startup.ms
to launch it: after both file copied to the correct folder like mentioned above, start 3dsmax, open "customize user interface" dialog, go to ToolbarTab>Category>DionchStudio>DionchStudio - PresetOnCams, drag it to desired toolbar. :)

2016-04-27, 04:46:11
Reply #10

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
FYI, 3 bugs is fixed.
1.remove selected in include/exclude isn't working.
2.deleting item in scene which is also listed in include/exclude, doesn't updates the object list and button text
3.UHD cache rollout doesn't hide properly when selecting camera in camera list box.

attached file in first post is already updated too. :)

2016-04-28, 21:32:15
Reply #11

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello noel20,
congratulations for this creation of the script "dionchstudio"


Thanks to the correct destination scripts.

The script which version supports 3dsmax and CoronaR ?
You have occurred in the script the line " denoise - filtertype " ?  It produces reading script errors ?


Thanks again for your contribution

2016-04-29, 03:45:13
Reply #12

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
Hello noel20,
congratulations for this creation of the script "dionchstudio"


Thanks to the correct destination scripts.

The script which version supports 3dsmax and CoronaR ?
You have occurred in the script the line " denoise - filtertype " ?  It produces reading script errors ?


Thanks again for your contribution
you're welcome rafpug :)
I create this script with max 16 and latest corona pre1.4, but I've made it compatible with 1.3 too. about max compatibility, sorry, I don't have any idea about which versions is supported by this script.
may I have the whole error report produced? and when it creates the error/ how to reproduce it?

2016-04-29, 10:13:02
Reply #13

johan belmans

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 761
    • View Profile
    • belly.be
Hi Noel

many thanks for the script.
I have some suggestions to make this an awesome script.

Could it be possible to add:
-The pass limit
-Tone mapping: a thick box for "Use Photograpic Exposure" or a thick box for "Use simple exposure"
-A thick box for enabling DOF
-A section for defining the Scene environment + the scene overrides. So each camera can have his own Hdri or Corona sky or override.
-And the ability to switch on or off different layers. I create layers for each camera with objects related to that specific camera: foreground trees, Corona sun, ....

2016-04-29, 12:16:21
Reply #14

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
Hi Noel

many thanks for the script.
I have some suggestions to make this an awesome script.

Could it be possible to add:
-The pass limit
-Tone mapping: a thick box for "Use Photograpic Exposure" or a thick box for "Use simple exposure"
-A thick box for enabling DOF
-A section for defining the Scene environment + the scene overrides. So each camera can have his own Hdri or Corona sky or override.
-And the ability to switch on or off different layers. I create layers for each camera with objects related to that specific camera: foreground trees, Corona sun, ....
hi belly, you're welcome :)
pass limit, tonemapping checkbox, scene environments, ..that's important too but I will start adding those things when right after I'm done with new flashlight feature and rewrite the script to change the storing data method.
but about the last point, reminding that I never work with layers (what a lazy man am I..), does the switch you mean do hide objects in specified layer(s) just like the "list of object to hide" button?