<div dir="ltr">That would work too!. In case, can you send me the code with your failed attempts with vesBlend attribute? If that's Ok? I just wanted to make sure that we don't have a bug in the code. <div><br></div>
<div>Thanks for the update. <br><div><br></div><div>- Aashish</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 11:11 AM, Jurre Hanema <span dir="ltr"><<a href="mailto:jurre@stack.nl" target="_blank">jurre@stack.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After failed attempts with the blend attributes, I simply solved my problem by removing the background from the camera in the renderer:<br>
<br>
phxRenderer::phxRenderer(): vesRenderer()<br>
{<br>
this->camera()->removeChild(<u></u>this->background());<br>
this->camera()->setClearMask(<u></u>vesStateAttributeBits::<u></u>ColorBufferBit | vesStateAttributeBits::<u></u>DepthBufferBit);<br>
}<br>
<br>
(I created the subclass phxRenderer for this because I want to keep my changes local to my application)<br>
<br>
-- Jurre<br>
<br>
On 19/10/13 01:14, Aashish Chaudhary wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Fri, Oct 18, 2013 at 2:24 PM, <<a href="mailto:jurre@stack.nl" target="_blank">jurre@stack.nl</a> <mailto:<a href="mailto:jurre@stack.nl" target="_blank">jurre@stack.nl</a>>> wrote:<br>
<br>
Thanks, I think I can figure most of it out from here. I am new to<br>
VES, so I wonder what is the reasoning for encapsulating the<br>
functionality I need in a class vesBackground::vesInternal, thus<br>
hiding it from the headers and documentation?<br>
<br>
<br></div>
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. *<div class="im">
<br>
<br>
Thanks,<br>
<br>
<br>
-- Jurre<br>
<br>
Quoting "Aashish Chaudhary" <<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a><br></div>
<mailto:<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@<u></u>kitware.com</a>>>:<div class="im"><br>
<br>
Hi Jurre,<br>
<br>
You will have to add blend attribute as well (vesBlend). The<br>
default blend<br>
equation probably will work for you. Have a look at the<br>
vesBackground.cpp.<br>
Let us know if you need any help.<br>
<br>
- Aashish<br>
<br>
<br>
<br>
On Tue, Oct 15, 2013 at 1:30 PM, Jurre Hanema <<a href="mailto:jurre@stack.nl" target="_blank">jurre@stack.nl</a><br></div><div><div class="h5">
<mailto:<a href="mailto:jurre@stack.nl" target="_blank">jurre@stack.nl</a>>> wrote:<br>
<br>
Hi,<br>
<br>
I am developing an app based on the KiwiViewer code.<br>
Objects should be<br>
rendered on a transparent background instead of the<br>
standard blue one, such<br>
that another Android layer (a camera view, in this case)<br>
can be displayed<br>
behind it.<br>
<br>
To achieve this, I have modified the function declaration<br>
and definition<br>
of vesKiwiBaseApp::**<u></u>setBackgroundColor() such as to<br>
expose the<br>
alpha-argument of vesRenderer::**<u></u>setBackgroundColor():<br>
<br>
void vesKiwiBaseApp::**<u></u>setBackgroundColor(double r, double<br>
g, double b,<br>
double alpha)<br>
{<br>
this->Internal->Renderer->**<u></u>setBackgroundColor(r, g, b,<br>
alpha);<br>
<br>
}<br>
<br>
In KiwiNative.cpp, I can now call<br>
app->setBackgroundColor() as follows:<br>
<br>
bool loadDataset(const std::string& filename, int<br>
builtinDatasetIndex)<br>
{<br>
// ...<br>
app->setBackgroundColor(255, 0, 0, 0);<br>
// ...<br>
}<br>
<br>
Alas, this changes the background color to solid red<br>
instead of<br>
transparency.<br>
<br>
How to achieve rendering on a transparent background with<br>
Kiwi?<br>
<br>
Regards,<br>
Jurre<br>
______________________________<u></u>**_________________<br>
Ves mailing list<br></div></div>
<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a> <mailto:<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a><u></u>><div class="im"><br>
<a href="http://public.kitware.com/cgi-**bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-<u></u>**bin/mailman/listinfo/ves</a><<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">htt<u></u>p://public.kitware.com/cgi-<u></u>bin/mailman/listinfo/ves</a>><br>
<br>
<br>
<br>
<br>
--<br>
| Aashish Chaudhary<br>
| R&D Engineer<br>
| Kitware Inc.<br></div>
| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div class="im"><br>
<br>
<br>
<br>
<br>
<br>
-- <br>
| Aashish Chaudhary<br>
| R&D Engineer<br>
| Kitware Inc.<br></div>
| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a>
</div>