PDA

View Full Version : Creating rendertime geometry on sequences


Rorschach
09-02-2008, 02:31 PM
I'm trying to create some geometry at render time, but have run into some problems when trying to do this with sequences.

Using a 'prerender' call back is called once on a sequence, so only the first frame would be created. Using 'prerenderframe' is called before each frame but after the geometry calculations are done, so thats a no no. I can't see any other way apart from making a render sequence script, but I want to send the jobs over backburner to a farm.

Any ideas?

JHN
09-03-2008, 07:56 AM
In the render dialog (Render Scene Dialog > Common Parameters > Scripts) you can assign a pre render script.. maybe that will work for you?

-Johan

Rorschach
09-04-2008, 12:20 PM
That was my port of call, but like the callback method it is only called once before rendering a sequence.

Mathieson
09-04-2008, 01:10 PM
I think this might be what you're looking for..


#preRenderEval: time

Sent just before the renderer starts evaluating objects.

Returns the time being rendered


I was trying to do something similar to what you're doing, from the sounds of it, and was using #preRenderFrame. I had to compensate for it being calculated after the frame is rendered by looking ahead one frame. Found this callback and it did exactly what I was looking for.

Rorschach
09-04-2008, 02:22 PM
Unless I misunderstood this still doesn't work on sequences... try this example.

fn randombox=(Box lengthsegs:1 widthsegs:1 heightsegs:1 length:10 width:10 height:10 pos:[random -100 100,random -100 100,random -100 100] )

callbacks.addScript #preRenderEval "randombox()" id:#boxRender

Render 100 frames. First box is created on frame 1, next 99 frames look the same, then at end of render all 100 boxes appear in viewport...?

Mathieson
09-04-2008, 03:02 PM
Hmm.. interesting! I haven't actually been using it for object creation, but rather toggling visibility of objects.

It does get called for every frame in the sequence, and it also does get called before the scene geometry is cached for that frame of the render (you can throw a format call into the function to check it).

I think there is a problem with creating geometry during the rendering process. That is my only guess right now. I remember hiding/unhiding objects during rendering also wouldn't work for me, had to change the visibility values.

Rorschach
09-04-2008, 03:21 PM
Yeah, I just dont think the rendering framework allows it. Shame, I'll have to rethink.

CGTalk Moderation
09-04-2008, 03:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.