[Ves] Kiwi transparent background
Aashish Chaudhary
aashish.chaudhary at kitware.com
Fri Oct 18 19:14:51 EDT 2013
On Fri, Oct 18, 2013 at 2:24 PM, <jurre at stack.nl> wrote:
> Thanks, I think I can figure most of it out from here. I am new to VES, so
> I wonder what is the reasoning for encapsulating the functionality I need
> in a class vesBackground::vesInternal, thus hiding it from the headers and
> documentation?
>
We can expose this feature now. We just didn't have the requirement at that
time and it should be easy to add. If you happen to add this feature, send
a patch to us so that we can push it upstream (you as the author). *I
should note that this may cause some issues to your transparent objects in
the scene though. You may have to use a different blend equation if you
chose to make the background transparent. *
Thanks,
> -- Jurre
>
> Quoting "Aashish Chaudhary" <aashish.chaudhary at kitware.com**>:
>
> Hi Jurre,
>>
>> You will have to add blend attribute as well (vesBlend). The default
>> blend
>> equation probably will work for you. Have a look at the vesBackground.cpp.
>> Let us know if you need any help.
>>
>> - Aashish
>>
>>
>>
>> On Tue, Oct 15, 2013 at 1:30 PM, Jurre Hanema <jurre at stack.nl> wrote:
>>
>> Hi,
>>>
>>> I am developing an app based on the KiwiViewer code. Objects should be
>>> rendered on a transparent background instead of the standard blue one,
>>> such
>>> that another Android layer (a camera view, in this case) can be displayed
>>> behind it.
>>>
>>> To achieve this, I have modified the function declaration and definition
>>> of vesKiwiBaseApp::****setBackgroundColor() such as to expose the
>>> alpha-argument of vesRenderer::****setBackgroundColor():
>>>
>>> void vesKiwiBaseApp::****setBackgroundColor(double r, double g, double
>>> b,
>>> double alpha)
>>> {
>>> this->Internal->Renderer->****setBackgroundColor(r, g, b, alpha);
>>>
>>> }
>>>
>>> In KiwiNative.cpp, I can now call app->setBackgroundColor() as follows:
>>>
>>> bool loadDataset(const std::string& filename, int builtinDatasetIndex)
>>> {
>>> // ...
>>> app->setBackgroundColor(255, 0, 0, 0);
>>> // ...
>>> }
>>>
>>> Alas, this changes the background color to solid red instead of
>>> transparency.
>>>
>>> How to achieve rendering on a transparent background with Kiwi?
>>>
>>> Regards,
>>> Jurre
>>> ______________________________****_________________
>>> Ves mailing list
>>> Ves at public.kitware.com
>>> http://public.kitware.com/cgi-****bin/mailman/listinfo/ves<http://public.kitware.com/cgi-**bin/mailman/listinfo/ves>
>>> <htt**p://public.kitware.com/cgi-**bin/mailman/listinfo/ves<http://public.kitware.com/cgi-bin/mailman/listinfo/ves>
>>> >
>>>
>>>
>>
>>
>> --
>> | Aashish Chaudhary
>> | R&D Engineer
>> | Kitware Inc.
>> | www.kitware.com
>>
>>
>
--
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20131018/9547cd35/attachment-0002.html>
More information about the Ves
mailing list