How To Use Unity Free

bothria
One Eyed Hopeful
Posts: 7
Joined: Mon Mar 25, 2013 1:17 pm

Re: How To Use Unity Free

Post by bothria »

For those getting crashes, make sure the .dll file isn't being blocked by Windows (you can check and disable it on the properties dialog for the file). I haven't tried it myself, but dll blocking has given me headaches in other situations.
anon84
One Eyed Hopeful
Posts: 25
Joined: Wed Dec 05, 2012 5:42 am

Re: How To Use Unity Free

Post by anon84 »

SumRandomGuy wrote:Can't get this to work, the left camera turns black after a few seconds but the corners are fine. The right camera works too. I have the warping and everything, just the left camera isn't working.
same thing happens to me, I had it working before but realised now that I was using the DIY rift camera package that someone posted here, using the rift SDK does not seem to work, leaving the left eye blank

it works perfect during the initial 2 second fadeout, then switches to one eye. I looked through the code to see what happens after the fadeout that breaks it, but to be honest I only skimmed it for a couple minutes then got tired of it, so maybe a more thorough look by someone can sort it out.
Darkmark
One Eyed Hopeful
Posts: 1
Joined: Wed May 15, 2013 12:41 pm

Re: How To Use Unity Free

Post by Darkmark »

Any news on how to fix this. Is there a way to make it work without the warp so we could
work with the free unity.
Vimax
One Eyed Hopeful
Posts: 12
Joined: Fri Aug 02, 2013 1:08 am

Re: How To Use Unity Free

Post by Vimax »

I would also really like to use this as well.

Does anyone know if this is the package mentioned above?
Siduron
One Eyed Hopeful
Posts: 6
Joined: Fri Aug 23, 2013 12:49 pm

Re: How To Use Unity Free

Post by Siduron »

I have been using this workaround successfully for about a week now, except for the left camera not working properly in the editor.
Everything in the built executable worked fine (including the warping), but after reinstalling Win7 i only get a black screen (not even the splash shows up).

My log shows the following:

Code: Select all

Initialize engine version: 4.2.0f4 (38efbd14869d)
GfxDevice: creating device client; threaded=1
d3d: no D3D9 installed
(Complete log attached as file)

It seems by having a clean installation it might be missing some stuff from Direct3d that was previously installed. I have installed the most recent DirectX and even tried installing DirectX 9.0c to make it work again, but without luck.

Anyone has a fix for this?
You do not have the required permissions to view the files attached to this post.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11406
Joined: Sat Apr 12, 2008 8:18 pm

Re: How To Use Unity Free

Post by cybereality »

Looks like it can't create Direct3D so it's falling back to OpenGL.

First try installing the VC++ 2010 Redistributables:
http://www.microsoft.com/en-us/download ... px?id=5555

Then try installing the DirectX runtimes:
http://www.microsoft.com/en-us/download ... px?id=8109
boone188
Cross Eyed!
Posts: 184
Joined: Tue Apr 02, 2013 12:36 pm
Location: Seattle, WA

Re: How To Use Unity Free

Post by boone188 »

cybereality wrote:Looks like it can't create Direct3D so it's falling back to OpenGL.

First try installing the VC++ 2010 Redistributables:
http://www.microsoft.com/en-us/download ... px?id=5555

The try installing the DirectX runtimes:
http://www.microsoft.com/en-us/download ... px?id=8109
Yeah that should do the trick. Thanks for helping out Cyber. I would really like to get a reliable method for using the free edition working. We are coming up on the time that a lot of folks' trials are going to be coming to an end, which could have a very negative impact on the community. There are a lot of devs with a lot of momentum after the game jam. I would hate to see all that momentum lost.
Siduron
One Eyed Hopeful
Posts: 6
Joined: Fri Aug 23, 2013 12:49 pm

Re: How To Use Unity Free

Post by Siduron »

cybereality wrote:Looks like it can't create Direct3D so it's falling back to OpenGL.

First try installing the VC++ 2010 Redistributables:
http://www.microsoft.com/en-us/download ... px?id=5555

Then try installing the DirectX runtimes:
http://www.microsoft.com/en-us/download ... px?id=8109
I have installed both and still it does not work.
I really don't understand why it can't find Direct3D since i clearly have it installed, and you'd expect the latest runtime would be backwards compatible.
boone188
Cross Eyed!
Posts: 184
Joined: Tue Apr 02, 2013 12:36 pm
Location: Seattle, WA

Re: How To Use Unity Free

Post by boone188 »

Siduron wrote:
cybereality wrote:Looks like it can't create Direct3D so it's falling back to OpenGL.

First try installing the VC++ 2010 Redistributables:
http://www.microsoft.com/en-us/download ... px?id=5555

Then try installing the DirectX runtimes:
http://www.microsoft.com/en-us/download ... px?id=8109
I have installed both and still it does not work.
I really don't understand why it can't find Direct3D since i clearly have it installed, and you'd expect the latest runtime would be backwards compatible.
Does the error message go away if you remove d3d9.dll?
Siduron
One Eyed Hopeful
Posts: 6
Joined: Fri Aug 23, 2013 12:49 pm

Re: How To Use Unity Free

Post by Siduron »

boone188 wrote:
Siduron wrote:
cybereality wrote:Looks like it can't create Direct3D so it's falling back to OpenGL.

First try installing the VC++ 2010 Redistributables:
http://www.microsoft.com/en-us/download ... px?id=5555

Then try installing the DirectX runtimes:
http://www.microsoft.com/en-us/download ... px?id=8109
I have installed both and still it does not work.
I really don't understand why it can't find Direct3D since i clearly have it installed, and you'd expect the latest runtime would be backwards compatible.
Does the error message go away if you remove d3d9.dll?
Yes it does. The logfile is now the following:

Code: Select all

Initialize engine version: 4.2.0f4 (38efbd14869d)
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 9.0c [nvd3dum.dll 9.18.13.2680]
    Renderer: NVIDIA GeForce GTX 660 Ti
    Vendor:   NVIDIA
    VRAM:     1990 MB (via DXGI)
    Caps:     Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 DF24=0 INTZ=1 RAWZ=0 NULL=1 RESZ=0 SlowINTZ=0
It seems that in this case Direct3d 9 can be found.
boone188
Cross Eyed!
Posts: 184
Joined: Tue Apr 02, 2013 12:36 pm
Location: Seattle, WA

Re: How To Use Unity Free

Post by boone188 »

Well since you have side by side working, you can try rift overlay: https://developer.oculusvr.com/forums/v ... f=29&t=299
Siduron
One Eyed Hopeful
Posts: 6
Joined: Fri Aug 23, 2013 12:49 pm

Re: How To Use Unity Free

Post by Siduron »

I could try that, but the dependency on an entire framework (XNA) to get the other one (Unity) working seems a bit problematic for any possible demo distribution.
boone188
Cross Eyed!
Posts: 184
Joined: Tue Apr 02, 2013 12:36 pm
Location: Seattle, WA

Re: How To Use Unity Free

Post by boone188 »

Siduron wrote:I could try that, but the dependency on an entire framework (XNA) to get the other one (Unity) working seems a bit problematic for any possible demo distribution.
Very true, but it could allow you to continue developing and testing until a better solution gets worked out.
Siduron
One Eyed Hopeful
Posts: 6
Joined: Fri Aug 23, 2013 12:49 pm

Re: How To Use Unity Free

Post by Siduron »

Here's a theory: What if d3d9.dll being injected does not match my installed d3d9.dll?
Can you confirm your injector should work for DirectX 9.0c?

I have attached my d3d9.dll (rename to dll, not actually a zip) which is located in system32, hopefully you find something.
You do not have the required permissions to view the files attached to this post.
User avatar
mattyeatsmatts
Binocular Vision CONFIRMED!
Posts: 315
Joined: Wed Mar 06, 2013 5:02 pm

Re: How To Use Unity Free

Post by mattyeatsmatts »

Im having a instant crash when i run the unity game with d3d9.dll in the project folder on 1 pc and a black screen on another pc that plays just the audio.
boone188
Cross Eyed!
Posts: 184
Joined: Tue Apr 02, 2013 12:36 pm
Location: Seattle, WA

Re: How To Use Unity Free

Post by boone188 »

mattyeatsmatts wrote:Im having a instant crash when i run the unity game with d3d9.dll in the project folder on 1 pc and a black screen on another pc that plays just the audio.
But without d3d9.dll does non-warped side by side and tracking work?
User avatar
mattyeatsmatts
Binocular Vision CONFIRMED!
Posts: 315
Joined: Wed Mar 06, 2013 5:02 pm

Re: How To Use Unity Free

Post by mattyeatsmatts »

But without d3d9.dll does non-warped side by side and tracking work?
yep that works fine, Im using the overlay at the moment but its a little bit of a pain to use compared to the other way
Siduron
One Eyed Hopeful
Posts: 6
Joined: Fri Aug 23, 2013 12:49 pm

Re: How To Use Unity Free

Post by Siduron »

Same for me. Side by side works but with the injector I get a black screen.
The layover is really a pain to use indeed.
brknhrt16
One Eyed Hopeful
Posts: 1
Joined: Sun Oct 06, 2013 3:40 pm

Re: How To Use Unity Free

Post by brknhrt16 »

Hey,

If you're experiencing bugs:

1) Try removing the OVR Main Menu from the OVR Player

2) Try making sure your VSync in all your Quality Settings is VBlank or VSecondBlank
LazyGunn
One Eyed Hopeful
Posts: 3
Joined: Tue Oct 08, 2013 6:40 am

Re: How To Use Unity Free

Post by LazyGunn »

There's a guy over on the Unity forums released as asset giving RenderToTexture and post process abilities to Unity Free (http://forum.unity3d.com/threads/204481 ... ity-Pro%29) - Havent used it but will purchase it soon as its not very dear and it uses the old readpixel thing so i'll have to test its performance really (Although he seems to feel performance isnt too much an issue), but I asked him in the thread if he'd be willing to add a barrel distortion shader for Rift use and I figured I better ask here to see if there is any interest. I do feel like adding it that way rather than with a wrapper or whatever is a little more 'professional' if you intend to distribute your demo, but as i'm ignorant to the technicalities fully i'm open to being corrected

If using the SDK .dll is fiddly btw it seems this might work http://www.mtbs3d.com/phpbb/viewtopic.p ... 80#p111853 which again avoids dlls and suchlike I gather, and might avoit problems like one of the eyes not working in the editor that ive seen talked about here

If such a shader is desired by the way and you dont mind spending $20 on his 'solution' then i'll continue to nag him, and try purchase it myself soon for performance checking
User avatar
Dakor
Binocular Vision CONFIRMED!
Posts: 213
Joined: Sat Nov 03, 2012 8:58 am
Location: Dortmund, Germany
Contact:

Re: How To Use Unity Free

Post by Dakor »

Nice it works! (with newest Oculus SDK)

If you get a black screen on the left eye, just comment out everything in the onGui Method inside the OVRMainMenu class but the "Crosshair.OnGUICrosshair();"
(I had not time to check what exactly causes this, but disabling the Oculus VR Gui works.)

In case mouse rotation stops working, you commented the crosshair line out.

The distortion seems a bit off to me, though. You notice it specially while moving your head.
I noticed it more with 1920*1080 than with 1280*800 but you still notice it.
German blogger, enthusiast and developer.
Image
LazyGunn
One Eyed Hopeful
Posts: 3
Joined: Tue Oct 08, 2013 6:40 am

Re: How To Use Unity Free

Post by LazyGunn »

Alright, well it's working, you'll have to buy the asset I used for the rendertextures, it's 19 euros from the Unity asset store called FXLab by Maaark but, working, not terribly quickly (90fps in-editor or so in the simplest of simple scenes on a 580 with a touch of resolution loss) or well programmed either and you'll need to run a small websockets server beforehand but yeah! If you can be bothered with all that i'll be happy to make everything i can available

It's 100% DIY, nothing from the OR SDK was used (as far as I can tell) apart from a some stuff for a small wrapper to get the orientation values for the sockets server thing, so hopefully noone can complain!

Noone seems that interested, mind, but its there if you want it

Some experience of Unity is probably needed too, as it's very much barebones
LazyGunn
One Eyed Hopeful
Posts: 3
Joined: Tue Oct 08, 2013 6:40 am

Re: How To Use Unity Free

Post by LazyGunn »

Well, it's here if anyone will find it useful

http://www.pourfoi.co.uk/OculusFree/OculusFree.zip
virror
Sharp Eyed Eagle!
Posts: 427
Joined: Fri Jan 18, 2013 7:13 am
Location: Gothenburg, Sweden

Re: How To Use Unity Free

Post by virror »

Just for your information, latest 4.3 version have working rendertextures AND image effects using the free version.
Just works in the editor though.
Also, i have heard from a source inside Unity that they really want to make the Rift work with free, so lets hope they can make it happen : )
damian3k
One Eyed Hopeful
Posts: 9
Joined: Sat Aug 10, 2013 8:53 am

Re: How To Use Unity Free

Post by damian3k »

I had black screen problem as well.
This helped : http://www.mtbs3d.com/phpbb/viewtopic.php?f=141&t=17562
Copy d3d9.dll from bin folder inside archive to the same dir as the games .exe
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: How To Use Unity Free

Post by xhonzi »

Are these instructions still valid?
zalo
Certif-Eyed!
Posts: 661
Joined: Sun Mar 25, 2012 12:33 pm

Re: How To Use Unity Free

Post by zalo »

The only way to know is to try it. Did your 4-Month trial run out?
Mel
Binocular Vision CONFIRMED!
Posts: 287
Joined: Sat Nov 10, 2007 7:45 am

Re: How To Use Unity Free

Post by Mel »

FYI to everyone: I just tried this technique with Unity Free v.4.3.4, and it all worked well.

I used the 'Perception Warp Only' Dx3d9.dll, found in this thread:

http://www.mtbs3d.com/phpbb/viewtopic.p ... 62#p126664

(Note: I did not try any of the other DLLs found in this thread...they may work too)

I also had to implement the first suggestion given by brknhrt16, elsewhere in this thread:

1) Try removing the OVR Main Menu from the OVR Player

Failure to do this step resulted in the right-eye camera showing on the right, and the Rift menu showing on the left, with no way to remove the Rift menu at run-time (at least that I could figure out).
Post Reply

Return to “Oculus VR”