A Beginner’s Guide To Render a Scene with 3ds Max For Gear VR

I’m exploring the VR(Virtual Reality) world and the possibilities that it’s going to give us as developers to solve  problems or create new applications.Here I’m going to share with you my experiences during this road. In this post I’m going to render a scene in 3ds Max and view it in my Gear VR with my Samsung S6 Edge.

Let me make it clear I’m not an expert in 3ds Max. I used to work with it more than a decade ago for some simple projects and it has changed a lot since then but still I can find my way around it.

I should admit render for VR is really simpler than I thought.

Setup Gear VR

You need to have a Samsung Gear VR and a phone that works with it. Oculus app will automatically be downloaded to your phone and just follow the steps it needs to make it work.

Setup 3ds Max

First I downloaded the Trial Version of 3ds Max 2017 from Autodesk. The installation was very simple and straightforward.

Steps to render and view

After installation I run the application for the first time and it gave me a choice to select a template! Awesome! This made my life so easy, no need to create a box and render a plane old 3d box. I picked the “Sample Studio Scene”

Template-Select

The scene is neat and simple. I don’t want to change anything.

Step-one

 

I searched the google read the help and watched some videos so let’s start.

First we should selected the “Template-Camera-Close” for the current Viewport. This will give us a better view after rendering.Step-Camera

Then we need to open the “Render Setup” Window.

Step-two

In render setup screen I didn’t change anything  my renderer by default was “NVIDIA mental ray”.

In the “Output Size” section we should select Custom and set width to 4096 pix and Height to 2048 pix. the aspect ratio is 2:1.

Step-Three

The last thing, from the “Renderer” Tab we should change the Lens to “WrapAround”.

Step-Lens

And that’s it! now hit the “Render” and be patient. After the render is finished save the image as “.jpg”.

If you don’t want to do all the above steps you can download the final render from here.

Now we should transfer the 360 rendered image to the phone.

we can do it with a USB cable and then copy the image to the phone. There is folder phone base folder called “Oculus” we can create a new folder called “360 Render” inside Oculus folder  and copy the .jpg file there.

SaveInFolder

Now put your “Gear VR” on and go to “Oculus 360 Photos” you can find this file inside “My Gallery”.

Enjoy your lovely creation in Virtual Reality world.

My next sample will be a simple Unity app for Gear VR.

Crystal Report .net object data source From Business Layer

To add a .Net object to  Crystal Report as  data source from Business Layer you should do a simple procedure.

Why I needed it? I’m working on an old project of mine. It’s a WinForm project and I’m updating it to WPF and adding more layers to the architecture of the project. In my old project I connected the reports directly to SQL server but now I have a Business Layer that use a Data Access Layer to connect to database. I still want to use my old Crystal Report Reports but feeding them with Business Layer Services. and using the models there. and I store all of my Reports in a Report Project. so here comes the trouble .

If your model is in the same project It’s easy to add it as data source. but if it’s in another project (like Business layer) it’s a little bit tricky.

Open your Database Expert and Under Create New Connection Select Ado.Net Xml and then Create a new Connection

Then You enter the class full name on Class name box and you’re done.

 

Working hard, No blogging

It’s been almost a year since my last post. my life has been changed a lot since my last post. the most important thing that has happened to me is that now I have a lovely daughter and I’m enjoying the amazing feeling of being a father.

I have done lots of projects during this year but currently I’m working on 4 main projects. Two of them are in WPF and Desktop and the other Two are  Asp.net MVC and web based. I’m enjoying doing all of them and learning lots of stuff while I’m doing them so I’m going to share my experience about these projects here, basically for  myself to remember what I have done and also it might help other developers also.

I’ll try to have a post each week and I really hope my next post won’t be a year later.

 

Problem of running Mspec tests with Resharper after updating

Problem

After I updated mspec I tried to run my testes that used to work fine….
it turned out all of my tests were not running….
I got this error:
Method not found: 'System.String Machine.Specifications.Result.get_ConsoleOut()'.

after searching the web I found this post on stackoverflow. I cleaned the solution… Rebuild it…and nothing worked.

Solution

As it mentioned on the Stackoverflow post the problem is mismatching the referenced dll on the project with the dll which is using by the runner…
after 1 hour banging my head over the wall I tried to uninstall the Mspec resharper runner re-install it again.
I’m using Resharper 7.1 so I went to %APPDATA%JetBrainsReSharperv7.1Pluginsmspec…cleaned up everything… then copy Machine.Specifications.dll and Machine.Specifications.ReSharperRunner.7.1.dll from the Mspec folder to the plugin folder.

My tests are back to life…

Brand new blog

I don’t blog much but I had some old posts that I lost them and there was no back up!…

I took me a while to change the server and defiantly this time my choice was WordPress. I have some good experience  with this CMS and I thought I’ll use it for myself so here we go.

I hope this time I’ll blog more.