Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jahman

Pages: [1] 2 3
1
Using CoronaMultimap as scene environment map, setting it to "Material", plug the Hdris (as corona bitmap) you need in the slots, key all "Frequency" to zero at frame 0, key slot 1 frequency (for camera 1) to 1.0 at frame 1, key slot 2 (for camera 2) to 1.0 at frame 2 and the rest to zero and so on for every shot which needs a different HDRI. You then have just to render the apropriate frame for the chosen camera without having to change anything manually over and over again.

My corona trial is expired so cannot test, but just curious how does that affect RAM consumption? Most likely that all of these hdrs are loaded for each frame rendered.

I did something similar with a script and composite texture. Not sure about RAM but it was definitely slower.
Unfortunately 3dsmax Environment map is set on render start for the whole animation sequence and no changes can be made before/after frame is rendered. So you can't just replace it with another hdr at another frame. (Since all the resources needed to render the sequence are loaded on render start)

3
It took me some time to figure out why I got no rollout visible on script execution.
Before I checked it's predefined position which is [1500, 120]. (I'm on a pretty old laptop with [1366,768] max resolution)
I'd change that value to something like
Code: [Select]
sysInfo.DesktopSize / 2.0
And something bad happens at line 56 when I try to run it with a fresh scene.
Code: [Select]
>> MAXScript MacroScript Error Exception:
-- Runtime error: array index must be positive number, got: 0 <<
selectedMtlClass = classof MtlClasses[nsBatEdSavedShader]

Hope it'll help you make it better

4
About this forum / Re: Like button
« on: 2017-06-25, 23:42:27 »
or just let users decide whether to keep this forum post forever or not
It really helps a lot with keeping it clean

5
Resolved feature requests / Re: Create Watermarks
« on: 2017-06-22, 13:41:16 »
For some unknown reason 'on apply' works for scanline only.
But nothing could stop us from creating a #postRenderFrame callback inside 'on create' event which would then apply the effects after each rendered frame.
Since rendereffect has no 'on delete' event we can check If any rendereffect with particluar classid is present in scene and remove #postRenderFrame callback if there's no such effects exist.

But the main disadvantage of the scripted rendereffect is that we should somehow save it within a scene in order not to have problems when rendering over the network or opening. I mean Missing Dll issue.

Manual batch watermarking seems much safer for me.

6
Resolved feature requests / Re: Create Watermarks
« on: 2017-06-22, 09:11:21 »
yeah, logo deserves it's own button


ps. Another way one could approach this task is to use Mix or Composite map with .png logo and then just render this map.
What I like about it is that you have tiling and rotations right from the box.

Code: [Select]
/*
/ Script: Overlay custom logo over rendered image
/ Author: Panteleev Sergey
/ Year: 2017
/ Contacts: fatbbc @ gmail.com/
*/
try (destroydialog X ) catch ()
rollout X " Logo overlay by Jahman" width:250 (

spinner logoXoffset "x:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40 across:3
spinner logoYoffset "y:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40
spinner alphaMult "alpha:" range:[0.0,1.0,1.0 ] fieldwidth:40 scale:0.05
button selectLogo "pick overlay image" across:2
button preview "preview logo overlay" enabled:false

local rend, logo

on selectLogo pressed do (

logo = selectBitMap caption:"Select overlay image"
preview.enabled = isKindOf logo bitmap

)

on preview pressed do (

try ( unDisplay rend ) catch()
rend = getLastRenderedImage()

if isKindOf rend bitmap and isKindOf logo bitmap do (

pasteBitmap logo rend [0,0] [ logoXoffset.value, logoYoffset.value ] type:#blend alphaMultiplier:alphaMult.value
display rend

)


)
)
createDialog X pos:[100,100]

8
Resolved feature requests / Re: Create Watermarks
« on: 2017-06-22, 00:06:58 »
Pretty doable.
Change logo image path to yours.

Code: [Select]
/*
/ Script: Overlay custom logo over rendered image
/ Author: Panteleev Sergey
/ Year: 2017
/ Contacts: fatbbc @ gmail.com/
*/
try (destroydialog X ) catch ()
rollout X " Logo overlay by Jahman" width:250 (

spinner logoXoffset "x:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40 across:3
spinner logoYoffset "y:" range:[-1e6,1e6, 0 ] align:#left type:#integer fieldwidth:40
spinner alphaMult "alpha:" range:[0.0,1.0,1.0 ] fieldwidth:40 scale:0.05

button preview "preview logo overlay"

local rend
local logo = openBitMap "C:\Users\User\Documents\firefox-256.png"

on preview pressed do (

try ( unDisplay rend ) catch()
rend = getLastRenderedImage()

if isKindOf rend bitmap and isKindOf logo bitmap do (

pasteBitmap logo rend [0,0] [ logoXoffset.value, logoYoffset.value ] type:#blend alphaMultiplier:alphaMult.value
display rend

)


)
)
createDialog X pos:[100,100]

9
Corona Goodies! - User contributions / Re: Corona Listener
« on: 2017-06-21, 22:34:19 »
It just Listens to whatever all the Corona Properties are doing, so you can simply use the code in your own tools by simply playing around with the properties.
There's actually a much better way of doing it.

Code: [Select]
deleteAllChangeHandlers id:#renderSettingsChangeListener
when parameters renderers.current change id:#renderSettingsChangeListener do (

handleRenderSettingsChange()

)


Didn't test it much, but I hope everyone who's interested get the idea behind.
Code: [Select]
(
fn getRenderSettings props = (

for p in props collect getProperty renderers.current p

)

renderPropNames = getPropNames renderers.current
lastRenderSettings = getRenderSettings renderPropNames

deleteAllChangeHandlers id:#rendSettings
global renderSettingsChangeHandler = when parameters renderers.current changes id:#rendSettings val do (

props = getRenderSettings renderPropNames
for i=1 to props.count where props[i] != lastRenderSettings[i] do (

if isKindOf props[i] array do (

if (props[i] as string) == (lastRenderSettings[i] as string) do continue -- and never compare arrays like I do

)

format "%: %\n" renderPropNames[i] props[i]

)
lastRenderSettings = props

)

)

10
I need help / Re: Maxscript reference...
« on: 2017-06-07, 13:59:49 »
Code: [Select]
clearListener()
re =  MaxOps.GetCurRenderElementMgr ()
CoronaRenderElements = for c in RenderElement.classes where c.category == #Corona collect c
for element in CoronaRenderElements do (

elementRef = element()
format "------------ % -------------------\n" (element as string)
for prop in getPropNames elementRef do (

format "% : %\n" prop (classof (getProperty elementRef prop))

)
re.AddRenderElement elementRef

format "\n"

)

11
Unfortunately I have no idea how to determine 'correct' compensation value automatically.


12
Code: [Select]
compensateValue = 5 /* <<< put your value here */

if not IsolateSelection.IsolateSelectionModeActive() and selection.count > 0 then (

IsolateSelection.EnterIsolateSelectionMode()
renderers.current.colorMap_simpleExposure -= compensateValue

) else (

IsolateSelection.ExitIsolateSelectionMode()
renderers.current.colorMap_simpleExposure += compensateValue
)
that's if you change your exposure value in rendersettings after going to isolate mode

Code: [Select]
cam = viewport.getcamera()
compensateValue = 5 /* <<< put your value here */

if cam != undefined do (

if not IsolateSelection.IsolateSelectionModeActive() and selection.count > 0 then (

IsolateSelection.EnterIsolateSelectionMode()
if cam.modifiers[#CoronaCameraMod] != undefined do cam.modifiers[#CoronaCameraMod].simpleExposure -= compensateValue

) else (

IsolateSelection.ExitIsolateSelectionMode()
if cam.modifiers[#CoronaCameraMod] != undefined do cam.modifiers[#CoronaCameraMod].simpleExposure += compensateValue
))

and that's if you change exposure via Override Simple Exposure in your active camera CoronaCameraMod modifier
any of the above can be turned to macro but you have to define a 'compensateValue' that fits you first

i couldn't understand where do you set your exposure value actually?

13
General Discussion / Re: Color scheme map plugin
« on: 2016-11-29, 09:19:12 »
Quote
does somebody know a way to create something like that, on your own
No, siger. That was the question I answered.

14
General Discussion / Re: Color scheme map plugin
« on: 2016-11-29, 00:11:21 »
custom texturemap 'plugin' is absolutely possible using just maxscript
example

15
Bet one day you'll have more than 24 materials in such a lib file ;)

Code: [Select]
(
libPath = getOpenFileName caption:"Open a material library" types:"Matlib (*.mat)|*.mat"
matlib = loadTempMaterialLibrary libPath

fn exec action = (
MatEditor.mode = #advanced
MatEditor.close()
MatEditor.open()
actionMan.executeAction 369891408 action

)

with redraw off (
TabName = "Some default tab name " + (sme.GetNumViews() as string)
MatEditor.close()
SME.CreateView TabName
MatEditor.open()

view = sme.GetView (sme.GetViewByName TabName)

for mtl in matlib do view.createnode mtl [0,0]

exec "40063" -- select all nodes
exec "40075" -- hide unused nodeslots
exec "40060" -- lay out all nodes in SME tab
exec "40064" -- deselect

)
)

Pages: [1] 2 3