Render Time



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/11/2011 at 09:09, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   13 
    Platform:    Mac  ;  
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    I have a COFFEE script that changes the document's current frame that works normally but not in the picture viewer. Basically it jumps back a few frames so its rendering the same frames over and over (with a little modification in between of course). But in picture viewer, it makes the modification but doesn't move back the time.

    /--------
    var renderFrame = 20;
    var t = doc->GetTime();
    var f = t->GetFrame(30);

    t->SetFrame(renderFrame,30);
    doc->SetTime(t);
    EventAdd();

    /---

    I tried looking for active document or not but couldn't locate the render doc. Any help appreciated, thanks.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 02:53, xxxxxxxx wrote:

    Hi,

    Can you explain more ? I don't fully understand what's occuring.

    Regards,



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 03:12, xxxxxxxx wrote:

    Essentially I want to render the scene at frame 20 over and over but from different angles. I understand I can just stop the animation but I want to record the motion blur inherent in that frame. So I've written a COFFEE script so that when the document gets to frame 21, it makes an adjustment to the camera then jumps back to frame 20. After x times, it just plays as normal. Works fine normally, but when I try to render, the jump in time doesn't occur. Looking at the console, its clear that the picture viewer takes data from other frames, which is cool but it doesn't jump in time. I've tried referencing the non-active document but that doesn't seem to help.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 07:49, xxxxxxxx wrote:

    Thanks for explaining the problem more in depth.

    Originally posted by xxxxxxxx

    Essentially I want to render the scene at frame 20 over and over but from different angles. I understand I can just stop the animation but I want to record the motion blur inherent in that frame. So I've written a COFFEE script so that when the document gets to frame 21, it makes an adjustment to the camera then jumps back to frame 20. After x times, it just plays as normal. Works fine normally, but when I try to render, the jump in time doesn't occur. Looking at the console, its clear that the picture viewer takes data from other frames, which is cool but it doesn't jump in time. I've tried referencing the non-active document but that doesn't seem to help.

    If I understand, you expect the problem comes from the render process not taking into account the change made to the camera, right ?
    Have you tried to call doc- >AnimateDocument(0) after doc- >SetTime() and before EventAdd() ?

    And I'm just curious, how do you got the non-active document with COFFEE ?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 08:30, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    If I understand, you expect the problem comes from the render process not taking into account the change made to the camera, right ?

    No, the camera change is fine. I just want that frame to be rendered over and over. I know, logically if I do that I'm just writing over the same file but was hoping to have it increment the file number.

    Originally posted by xxxxxxxx

    Have you tried to call doc- >AnimateDocument(0) after doc- >SetTime() and before EventAdd() ?

    And I'm just curious, how do you got the non-active document with COFFEE ?

    That didn't seem to help. As for non-active, I guess I wasn't doing it. Thought I had done that but guess not. Here is a condensed version of my code:

    main(doc,op)
    {
    //bunch of code to get my coffee tag and the align to spline tag
    //now the time stuff
    var t = doc->GetTime();
    var f = t->GetFrame(30);

    //float that says start of align to spline
    var start = myTag#ID_USERDATA:1;
    
    
    //float that says end of align to spline
    var finish = myTag#ID_USERDATA:2;
    
    
    //number of steps needed
    var frames = myTag#ID_USERDATA:3;
    
    
    //the frame I want to catpture from multiple angles
    var renderFrame =  myTag#ID_USERDATA:4;
    
    
    if(f > renderFrame)
    {
    	var frameStep = (finish - start) / frames;
    	if(myTag#ALIGNTOSPLINETAG_POSITION < finish)
    	{
    		myTag#ALIGNTOSPLINETAG_POSITION = myTag#ALIGNTOSPLINETAG_POSITION + frameStep;
    	}
    	
    	if(myTag#ALIGNTOSPLINETAG_POSITION > finish)
    	{
    		myTag#ALIGNTOSPLINETAG_POSITION = finish;
    		println("finished");
    	}
    	else
    	{	
    		t->SetFrame(renderFrame,30);
    		doc->SetTime(t);
    		doc->AnimateDocument(0);
    		EventAdd();
    	}
    }
    

    }

    So it moves the camera by 'frameStep' each time it enters the frame. My problem is that instead of jumping to renderFrame, it keeps going forward.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 09:14, xxxxxxxx wrote:

    Thanks again for your explanations.

    Are you executing this code inside a COFFEE tag ?
    Also are you sure, the 'else' is executed:

    else
    {	
        t->SetFrame(renderFrame,30);
        doc->SetTime(t);
        doc->AnimateDocument(0);
        EventAdd();
    }
    


  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 09:25, xxxxxxxx wrote:

    Thanks for the help so far.

    Yes, its on a COFFEE tag connected to the camera. And the else gets called (tested with println).



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 09:35, xxxxxxxx wrote:

    OK. Could you create a simple scene reproducing this problem ?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 10:02, xxxxxxxx wrote:

    Here you go. Many thanks

    http://www.sendspace.com/file/815ha1



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 24/11/2011 at 22:50, xxxxxxxx wrote:

    as i understand it you want to change the current frame number while rendering in the picture viewer?
    That won't be possible. The PV renders the specified frame sequence, you can't tell him while rendering to start over and render a different frame while it is still executing the sequence

    you would need to start the rendering yourself for every single frame, you can't start a sequence rendering of 30 frames and expect it to render 100 frames because of a tag that changes the frame time



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/11/2011 at 00:17, xxxxxxxx wrote:

    I'll just add a precision to what affa said.

    When rendering a sequence, it keeps moving forward even if you change the frame number but calculates the new frame with the frame you changed to.
    For example at frame 53, you change the current frame to 52, it calculates frame 53 with the data at frame 52. At frame 54, you change the current frame to 52, it calculates frame 54 with the data at frame 52. etc.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/11/2011 at 02:21, xxxxxxxx wrote:

    I thought that might be the case. Is there any way to keep the motion blur on an object while rendering from different angles?

    So I have the blur occurring at a certain density by animating my object over a few frames. Now I want to re-render that blur from a different angle. At the moment I have a rig of 30 cameras and I render each one individually. Bit of a pain to set up and change. Any thoughts?


Log in to reply