OpenVR HTC Vive

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OpenVR HTC Vive

Ricardo
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Ricardo
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Carlos Lopez
Hello,

when creating objects for HTC, keep in mind that the space is in meters, so the cylinder in the example is 7 meters tall and 10 meters wide. You'll most likely be looking at it from the inside.
(also, the Y axis is up)

The blue lines inside the head mounted display probably come from the blue circle that the HTC compositor places, so it seems to me there may be an issue with the tracking. Is the demo room app working correctly for you?

--carlos

(sorry for the double message)

On Thu, Jun 22, 2017 at 2:34 PM, Ricardo <[hidden email]> wrote:
Update: Forgot to mention that I replaced Renderer, RenderWindow and
RenderWindowInteractor with its respective OpenVRClasses in the example.
Here's a picture of what is going on in the glasses:
<http://vtk.1045678.n5.nabble.com/file/n5743732/f95e5225-bf14-47e9-af3c-a4c95a6258bb.jpg>
And in my screen:
<http://vtk.1045678.n5.nabble.com/file/n5743732/Capturar.png>
Thanks!



--
View this message in context: http://vtk.1045678.n5.nabble.com/OpenVR-HTC-Vive-tp5743731p5743732.html
Sent from the VTK - Dev mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Ricardo
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Carlos Lopez
There are 2 factory options (at least) in VTK's cmake. With both of them active, the example you mentioned (http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cylinder) works for me by only replacing the renderer, render window and interactor classes with their openVR counterparts.



On Thu, Jun 22, 2017 at 3:31 PM, Ricardo <[hidden email]> wrote:
Carlos, thanks for the answer!
I also forgot to mention that i reduced the cylinder's radius and height to
0.1, so it should not be inside the cylinder. I adjusted the tracking and
now there are no more blue lines, just the blue circle the HTC compositor
places. However, the cylinder is still not rendering in the scene. Here is
the example with OpenVR classes:

#include "stdafx.h"
#include <vtkCylinderSource.h>
#include <vtkPolyData.h>
#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkOpenVRRenderWindow.h>
#include <vtkOpenVRRenderer.h>
#include <vtkOpenVRRenderWindowInteractor.h>
#include <vtkOpenVRCamera.h>
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);

int main(int, char *argv[])
{
        // Create a sphere
        vtkSmartPointer<vtkCylinderSource> cylinderSource =
                vtkSmartPointer<vtkCylinderSource>::New();
        cylinderSource->SetCenter(0.0, 0.0, 0.0);
        cylinderSource->SetRadius(0.1);
        cylinderSource->SetHeight(0.1);
        cylinderSource->SetResolution(100);

        // Create a mapper and actor
        vtkSmartPointer<vtkPolyDataMapper> mapper =
                vtkSmartPointer<vtkPolyDataMapper>::New();
        mapper->SetInputConnection(cylinderSource->GetOutputPort());
        vtkSmartPointer<vtkActor> actor =
                vtkSmartPointer<vtkActor>::New();
        actor->SetMapper(mapper);


        vtkSmartPointer< vtkOpenVRCamera > camera =
                vtkSmartPointer<vtkOpenVRCamera>::New();

        //Create a renderer, render window, and interactor
        vtkSmartPointer<vtkOpenVRRenderer> renderer =
                vtkSmartPointer<vtkOpenVRRenderer>::New();

        renderer->SetActiveCamera(camera);

        vtkSmartPointer<vtkOpenVRRenderWindow> renderWindow =
                vtkSmartPointer<vtkOpenVRRenderWindow>::New();
        renderWindow->AddRenderer(renderer);
        vtkSmartPointer<vtkOpenVRRenderWindowInteractor> renderWindowInteractor =
                vtkSmartPointer<vtkOpenVRRenderWindowInteractor>::New();
        renderWindowInteractor->SetRenderWindow(renderWindow);

        // Add the actor to the scene
        renderer->AddActor(actor);
        renderer->SetBackground(.1, .3, .2); // Background color dark green

                                                                                 // Render and interact
        renderWindow->SetWindowName(argv[0]);
        renderWindow->Render();
        renderWindowInteractor->Start();

        return EXIT_SUCCESS;
}
The demo room app works normally, so there might be a mistake with the code
or the VS configuration, I'm not sure

Thanks!



--
View this message in context: http://vtk.1045678.n5.nabble.com/OpenVR-HTC-Vive-tp5743731p5743734.html
Sent from the VTK - Dev mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Ricardo
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Ricardo
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

anusha_kamath
Hi!
I compiled with cmake using the same options mentioned ,but cmake error "error in generation process project files may be invalid" pops on the screen.Could u please help me with this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

Ricardo
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

anusha_kamath
Hi!I was on windows 8.1 with cmake 3.3.0 and visual studio 2012.However the error did not show up when i switched to windows 10 and all the other versions u specified .
Thanks alot !!  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

anusha_kamath
But the following error occurs when cmakelists.txt file in VTK-7.1.1\Rendering\OpenVR is given to cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenVR HTC Vive

anusha_kamath
In reply to this post by Ricardo
Also the problem didnt seem to solve when openvr_dir was given the path pointing to openvr_master folder

Thank you !!
Loading...