>: CG Forums on 3dtotal - The best forums for CG artists :.
threedy forums home
 


top-table-gradient
Go Back   3DTotal Forums > Archives > Archives > Scripting & coding
bottom-table-gradient

 
 
Thread Tools Display Modes
14211 rads test
Prev Previous Post   Next Post Next
Old 14-08-2006, 09:57 PM   #1
vicar
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How to execute MAX Script on every frame at render time ? - please advise

Hello All !

I wonder if somebody would be so kind as to point me closer to the solution of the particular MAX Script issue I have.

Using Max 6, I need a precise control over a video file bitmap starttime property (found in "Time" rollout of the Material editor).
That property is not animatable directly in Max 6 , so I wrote a tiny script that manages what I want to achieve, but only at viewport level.

Here's a script :

*************************************
unRegisterTimeCallback startFrame_add

fn startFrame_add = (
if mod sliderTime 100 == 0 then (
meditMaterials[1].material1.diffuseMap.starttime += 25
)
)

registerTimeCallback startFrame_add

*************************************
I know it's very crude, but as said - it works as a "proof of concept".

What it does is : Every 100 frames the start time (offset) of a video file placed in difussion channel of my object material is set back by 25 frames.

I won't bore anybody explaining just why do I need such effect, suffice to say the script above works, but just in the viewports.

It does not execute at render time, however

I know I am missing something vital to do with a different type of callback mechanism, but after trying out several routes I am none the wiser still ...

Can anybody think of how to implement a script that will have the same result, but at reder time ?

(And before anybody suggests to edit my source Video file in the first place prior to using it in Diffuse channel - Thank you, but it would be very unpractical in my case as I need to use several varying segments of it with different delays)

Your help will be much appreciated !

Thank you.
vicar is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
all images displayed on this site are copyright the original artists and may not be reproduced, copied or published elsewhere without their express permission