Cocos2dx VR API

I created a bug here: https://github.com/cocos2d/cocos2d-x/issues/16005

and here is what I have with the VR chapter (incomplete): http://slackmoehrle.github.io/programmers-guide/vr/index.html

I’ll update the cocos-command-line chapter today with package manager use. http://slackmoehrle.github.io/editors_and_tools/cocosCLTool/index.html#installing-additional-plugins

@slackmoehrle
Unfortunately, the cocos package manager for VR SDKs has not been completed(in processing), so we can not release them in v3.12. For now, we just have the default VR(VRGenericRenderer).

How would 2D games benefit from VR? You think they would somehow get kind-of-3D look?

From what I am learning about VR, it depends on what person your 2D game is written in. 2D games are usually not first person. You need to ask yourself: what does it mean when I move the camera in my game? First person are good candidates for VR games.

of course… it is not obvious how to use a 2d platform game in VR.
it is more like “let’s find out if there is a use case for 2d games in vr” thing.

Would it be possible (in principal at least) to use the depth of Nodes to render them differently in each view, and so allow a 2d game to have some artificial depth?

I’m imagining a 2d scroller where the parallax background becomes truly parallaxed!

Interesting idea.

I guess it should be possible.

Hi guys,
I am working on a project that uses VR.
The VRGenericRenderer seems to render correctly, but there is this issue with the eye viewports.
Is there any solution for it to achieve similar results as the GVR? whereby the viewports cover almost the whole screen and doesn’t have that much distortion? (image seems to appear nearer to the viewer compared to GVR)

Hihi, have anybody seen this thread yet?

let me give some details on how the VRGvrRenderer is not working for me.
Pls refer to the video links:


video 1

video 2

What we are doing here is that we have a video being drawn on a RenderTexture and the texture is being applied to a sphere.
As we can see, before going into VR mode, everything is rendered correctly.
For video 1 there is no problem when entering VR mode.
However, when we exit VR mode, the texture is being distorted / stretched. And entering VR mode again, we can see there is some rendering issues.
For video 2, somehow, the VR mode always have issue. And we can see the distortion more clearly after exiting VR mode.

The only difference between the 2 videos is the resolutions.
video 1 - 1280 x 640
video 2 - 1920 x 960

However there is no rendering issues when using the VRGenericRenderer (as mentioned in above post).
Hence, i’d like to refer to my previous question again, will there be any improvements to the VRGenericRenderer ? As we will also need to support on the iOS platform too.

@ricardo @songchengjiang any idea?

I see the HTC Vive is missing from the ‘‘researched platforms’’ in the original post.

Is this covered under another platform you’re looking at, or is it not planned for now? :frowning:

Can someone tell me what the status of this is? Is it possible to make 2d VR apps on both Android & iOS with Cardboard ?

Can someone point me at some sample documentation or tutorial ?

Thanks.

I tried the example in CPP Tests. And I found that the view doesn’t really “Wrap around”. For example. Its like looking at a TV in a dark room. If you look too much to the right or left, all you see is black.

I tried to place Grossini.png doing the following"

Sprite* sp = Sprite::create("Images/grossini.png");
sp->setPosition(0 - size.width/2,size.height/2);

Sprite* sp2 = Sprite::create("Images/grossini.png");
sp->setPosition(1.5* size.width,size.height/2);

As you can see from the attached images, the second sprite (sp2), is barely visible. The more you turn to the right, the more it disappears, until you eventually can’t see it.

In my opinion, in 2d, we should make the world “wrap around”. So if we define the design resolution as say 3600x3600, then as you rotate 360 degrees, you should be able to see the whole image…

The VR API is pretty undocumented. Plus it hasn’t been developed in such a long time. It was at a state where we could write basic games. I remember writing one.

Do you have any projects you can share? Any idea how to wrap the design resolution around the screen 360 degrees, instead of looking like a TV in a dark room?

I’m not sure if I have those projects handy. I know Ricardo wrote one here: https://github.com/ricardoquesada/cocosVR