• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Checkout previous frame in smart render

Contributor ,
Feb 11, 2020 Feb 11, 2020

Copy link to clipboard

Copied

Hi. I am using the PF_OutFlag2_SUPPORTS_SMART_RENDER flag. I can checkout the params in the current time. I have also checked out the input and output buffers in the PreRender ().

However, I cannot figure out how to checkout the layer from the previous frame. This does not work in Smart Render

ERR(PF_CHECKOUT_PARAM(in_data, Sierpinski_INPUT, max(0, in_data->current_time - in_data->time_step),in_data->time_step, in_data->time_scale, &temp_param));

 

And the cb->checkout method does not specify the time.

ERR((extra->cb->checkout_layer_pixels(in_data->effect_ref, Sierpinski_INPUT, &input_worldP)));

 

So how does one checkout the previous frame input layer in Smart render?

 

 

TOPICS
SDK

Views

922

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Feb 17, 2020 Feb 17, 2020

Call extraP->cb->checkout_layer() in PF_Cmd_SMART_PRE_RENDER for that specific layer, you can enter the time you want there. Check SDK_Noise or a lot of the other samples in the SDK.

Here is the syntax for that function, it does support the time parameters:

 	PF_Err (*checkout_layer)(
 		PF_ProgPtr		effect_ref,		// reference from in_data 
 		PF_ParamIndex	index, 			// 0 = input, 1..n = param 
 		A_long			checkout_idL,	// chosen by effect, must be >=0 and unique
 		const PF_RenderRequest *req,
 		A
...

Votes

Translate

Translate
Guest
Feb 17, 2020 Feb 17, 2020

Copy link to clipboard

Copied

Call extraP->cb->checkout_layer() in PF_Cmd_SMART_PRE_RENDER for that specific layer, you can enter the time you want there. Check SDK_Noise or a lot of the other samples in the SDK.

Here is the syntax for that function, it does support the time parameters:

 	PF_Err (*checkout_layer)(
 		PF_ProgPtr		effect_ref,		// reference from in_data 
 		PF_ParamIndex	index, 			// 0 = input, 1..n = param 
 		A_long			checkout_idL,	// chosen by effect, must be >=0 and unique
 		const PF_RenderRequest *req,
 		A_long			what_time,
 		A_long			time_step,
 		A_u_long	time_scale,
		PF_CheckoutResult	*checkout_result); // out

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 18, 2020 Feb 18, 2020

Copy link to clipboard

Copied

thanks Toby. The part which was tricky is checkout_idL

It has to be outside and did not work if I defined it inside the enums. So I marked it with a

#define IDL NUM_PARAMS+1

After that it worked well.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 18, 2020 Feb 18, 2020

Copy link to clipboard

Copied

Just set checkout_idL to the same value as index, like in the samples from Adobe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 20, 2020 Feb 20, 2020

Copy link to clipboard

Copied

That did not work for me, to use the same value as index - for example I have a param SAMPLE_INPUT and I use it to check out the frame in current_time. It clashes if I use it for the previous frame.

So I defined a new ID outside the range of current IDs. You have it mentioned there - its unique. I just didnt catch on while using it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 24, 2020 Feb 24, 2020

Copy link to clipboard

Copied

If you want to check out the one input layer at several points in time at once, it is best practice to declare several layer parameters, set their default value to PF_LayerDefault_MYSELF and make them hidden (except for the first one). That way you'll have unique IDs and properly registered parameters and can adjust the sample time for each of them. I assume defining an ID outside of the parameter range might produce unexpected results when sequence data is cloned/effects are copied.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 02, 2023 Sep 02, 2023

Copy link to clipboard

Copied

LATEST

Hi AnmolM;

 

I know I am resurrecting this thread but I am stuck trying to do the exact same thing. Only in my case, I need to check out not just the previous frame, but every frame back to 0. 

 

Anyway, I have tried what you did but unsuccessfully. I gues I may be doing it wrong. Could you share any other info on how to do this? 

 

Thanks,

-Richard

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines