Hello,
We’re controlling Vantage using the AppSDK and would like to use animated texture sequences, but I’m having trouble getting it to work.
I want to achieve the same result as connecting from 3ds Max to Vantage and scrubbing the timeline with an IFL texture in the scene, i.e. that the texture changes based on the frame. From 3ds Max this works great, and has very good performance.
The problem is, I can’t figure out how to do the same thing in our standalone AppSDK program. I have no problem setting up the scene, but I can’t figure out how to change frame. These are the approaches I’ve tried, but none of them have worked:
- Calling renderer.setCurrentTime() stops the interactive rendering and I have to restart it, which takes several seconds.
- Calling SettingsCurrentFrame.set_current_frame() does not seem to be doing anything
- Sending the wanted frame in a list to SettingsOutput.set_frames() does not have any effect
I’m stumped, I can’t figure out any other way of changing the frame while running interactive. SettingsCurrentFrame looks like it should be the place, according to the documentation, but I’ve not been able to make it do anything.
Could you help me figure out what I’m doing wrong? Just a pointer in the right direction would be very helpful.
The only way I’ve gotten any result at all is changing the ifl_start_frame() of the bitmapbuffer to the (negated) frame I want, but that’s obviously not a good solution (and it’s super slow).
Best regards,
Vidar
Hello Vidar,
Assuming that the IFL parameters are set in your BitmapBuffer plugin -
ifl_start_frame, ifl_playback_rate, ifl_end_condition - as in your Max setup:
https://docs.chaos.com/display/VMAX/…p#heading-Time
Instead of using the VRayRenderer interfaces from AppSDK - start() / waitForRenderEnd()
do you get the expected result, by using - renderSequence() / continueSequence()
e.g.
renderer.renderSequence();
for (int i = 0; i < 20; ++i) {
renderer.waitForRenderEnd();
printf("Image Ready, frame %d (sequenceEnd = %d)\n", renderer.getCurrentFrame(), renderer.isSequenceEnded());
renderer.continueSequence();
}
Best regards,
Plamen
Hello Vidar,
Wishing you all the best in the new year and sorry for the late response.
Thanks to a colleague, who prepared an IFL test, I have a simple test with vrscene slightly modified the example animation/01-animate-from-scene
To render the animation there we use the VRayRenderer interfaces only - renderSequence(), continueSequence (on frame done), plus waitForSequenceEnd()
In general, the vrscene export from a V-Ray integration like Max should export the least necessary plugins and parameters, so that it could be loaded and rendered with AppSDK.
Probably some parameters related to the animation settings were not exported in your vrscene, though.
These SettingsOutput parameters are worth mentioning:
* anim_start - Start of animation range in time units, e.g. frame_start / frames_per_second
* anim_end - End of animation range in time units, e.g. frame_end / frames_per_second
* frame_start - The frame number at the start of the animation range
* frames_per_second - The requested number of frames per unit time (related to SettingsUnitsInfo::seconds_scale, which should be equal to 1.0f / frames_per_second)
* frames - List of key frames
About the BitmapBuffer settings in the vrscene:
* BitmapBuffer::frame_sequence is set to 1, which should automatically set the BitmapBuffer::frame_number from the IFL in BitmapBuffer::file
Best regards,
Plamen
Sequence_ifl.zip (581 KB)
Wow, thanks a lot for the detailed example, this is very helpful!
Thank you for the help and I wish you a good year as well 
Vidar