[vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images

Aashish Chaudhary aashish.chaudhary at kitware.com
Thu Sep 25 08:42:06 EDT 2014


On Thu, Sep 25, 2014 at 8:38 AM, Chris Hafey <chafey at gmail.com> wrote:

> No errors on the console.  I will work on a standalone example.  Can you
> please clarify whether or not I should be using mesa / osmesa for GPU
> rendering on Mac OS X?
>

In theory your regular driver should work with the offscreen rendering
setting. As per my understanding, that will just not open the window but
will create a context in which the rendering is performed.  But if the
image is black and if it is not if you don't set that flag then it means
the context was not created properly. VTK should have given you a error but
may be it is fooled by the system itself.

You can try osmesa, make sure that VTK detects it, and see if that works.

- Aashish

>
> Chris
>
> On Thu, Sep 25, 2014 at 7:37 AM, Aashish Chaudhary <
> aashish.chaudhary at kitware.com> wrote:
>
>> This is good to know. Do you get any errors on the console? A standalone
>> example  will be nice.
>>
>> - Aashish
>>
>> On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey <chafey at gmail.com> wrote:
>>
>>> I am enabling off screen rendering by calling SetOffScreenRendering(1)
>>> on the vtkRenderWindow.  Should I be using osmesa?  I can create a
>>> standalone example to reproduce if needed.
>>>
>>> Chris
>>>
>>> On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary <
>>> aashish.chaudhary at kitware.com> wrote:
>>>
>>>> No problem. How did you enable the offscreen?  Can you post your code
>>>> somewhere?
>>>>
>>>> Thanks,
>>>> Aashish
>>>>
>>>> On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey <chafey at gmail.com> wrote:
>>>>
>>>>> Hi Aashish,
>>>>>   Forgive my ignorance but I don't know much about osmesa or whether I
>>>>> am using it.  I am using VTK as built by homebrew and don't see any options
>>>>> related to osmesa.  I have not installed osmesa on the machine.  No errors
>>>>> or warnings are issued on the console.
>>>>>
>>>>> Chris
>>>>>
>>>>> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary <
>>>>> aashish.chaudhary at kitware.com> wrote:
>>>>>
>>>>>> Hi Chris,
>>>>>>
>>>>>> Are you using osmesa for the offscreen rendering? Are you getting any
>>>>>> error on the console?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey <chafey at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> VTK 6.1.0
>>>>>>> Mac OS X Mavericks 10.9.5
>>>>>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB
>>>>>>>
>>>>>>> My program uses VTK to do off screen volume rendering of medical
>>>>>>> images.  I suspect this is a bug in VTK and not my software because:
>>>>>>> 1) GPURenderMode works fine on Windows (both in a VM running on same
>>>>>>> Mac and on two other Windows 7 boxes with an nVidia GPUs)
>>>>>>> 2) RayCastRenderMode works fine on Mac OS X
>>>>>>> 3) TextureRenderMode works fine on Mac OS X
>>>>>>>
>>>>>>> I tried searching the mailing list and google and couldn't find
>>>>>>> anything.  The rendering code is about as basic as it can be - it simply
>>>>>>> sets the color, opacity, clip planes and matrix.  Any ideas on what I might
>>>>>>> be doing wrong or how I can debug?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Chris Hafey
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>>
>>>>>>
>>>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>>>     *
>>>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>>
>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>   *
>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>
>>>
>>>
>>
>>
>> --
>>
>>
>>
>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>> *
>> *| http://www.kitware.com/company/team/chaudhary.html
>> <http://www.kitware.com/company/team/chaudhary.html>*
>>
>
>


-- 



*| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140925/bbeb76c9/attachment.html>


More information about the vtkusers mailing list