question

Sven Akelian avatar image
Sven Akelian asked ·

Kick source code ?

Is the source code of kick available somewhere ?

I'm trying to add ipr preview to a Qt C++ App and I would love to have an example of some kind. I can't seem to find reliable pieces of information on the matter.

renderviewopengl
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Sven Akelian avatar image
Sven Akelian answered ·

@Stephen Blair I'm using the mechanism to feed a custom callback function.

On the driver parameter:

 AiParameterPtr("callback"     , NULL  );

In my QtApp

AtRenderUpdateCallback cb = AtRenderUpdateCallback(qtIPR);
AiNodeSetPtr(qtdriver, "callback", &cb);

The callback

https://pastebin.com/htg7qqVf

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

The RenderUpdate callback is mostly for handling node updates and status changes, not for doing anything with the display driver. Something like this:


renderupdate.jpg (350.9 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Sven Akelian avatar image
Sven Akelian answered ·

@Max Tarpini Thanks for those links, I'm not familiar with OpenGL for sure, and it seems I can pass the buffer directly to the fbo, i'll investigate.

What I was looking for in my initial question was an example or help in order to access the display driver callback parameters and how to properly "free" them, cast them etc etc... I know the scope is broader than arnold itself but if someone feels like pointing to the right direction that would help :).

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Sven Akelian avatar image
Sven Akelian answered ·

Thanks Tim,

not sure why 'definitely' as It could be a great way to see pratical API usage.

Here is what I have for now:

- A custom display driver based on the API example (display driver)

- A Qt app that read ass, and replace existing outputs and driver with the said custom driver attached to a callback.

The callback works, I can see the buffer and data adress but I'm stuck at how to cast it to pixel and send it over a QOpenGL widget or a view of some kind.

1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

You better grasp some basic opengl understanding (instead to aks for proprietary code :) and then lookup Qt to find the couterparts you need there. ie. :
http://www.songho.ca/opengl/gl_fbo.html
http://doc.qt.io/qt-5/qglframebufferobject.html#details

0 Likes 0 · ·
Tim Harding avatar image
Tim Harding answered ·

Definitely not an open source project, but you can use the C++ API to do this. Here's a relevant thread: https://answers.arnoldrenderer.com/questions/7385/interactive-rendering-for-third-pary-plugin.html?childToView=7399#answer-7399

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.