Pages

Showing posts with label 3d. Show all posts
Showing posts with label 3d. Show all posts

Friday, December 2, 2016

3D Abstract High Definition HD Wallpapers for Computer

Abstract 3d green wallpaper3d Digital Abstract Nature WallpaperAbstract orange frames wallpaper

3d Nature Tree Abstract WallpaperAbstract 3d Lake wallpaper3d Pink abstract star wallpaper

Abstract Forest water Wallpaper3d HD Abstract Desktop BackgroundGreen Sphere Desktop Background wallpaper

Abstract WallpapersAbstract forest wallpaperAbstract flower

Abstract Winter WallpaperAbstract Star WallpaperAbstract hd Wallpaper
Read More..

Friday, October 14, 2016

Throwing fireballs with the Kinect and Oculus Rift in Unity 3D

I decided I wanted to make a small game where you were a viking and you threw fireballs at enemy vikings on Unity 3D. The catch is, I wanted to actually throw the fireballs, so I wanted to use the Kinect, and I wanted to actually see if I was the character, so I wanted to use the Oculus Rift.

Here is a quick video of the results before we get on to the discussion:



Basically this started because a colleague at Georgia Tech, Alex Trevor (soon to be Dr,), had an Oculus Rift and mounted a camera on top of it to see the Kinect output with the Oculus Rift. I thought that was really cool and had previously worked on a game that used the Kinect Skeleton to throw fireballs (though I lost all the source code for the first version). I really wanted to combine those ideas and had to start over.

Luckily, Dr. Brian Peasley (now at Microsoft) came to my rescue as always and gifted me an Oculus Rift. 


To explain a bit, the Oculus Rift is an immersive virtual reality headset. The two images are displayed on the screen above because one is projected to the left eye and one to the right eye. As you rotate your head, the images change and it feels like you are looking at a real environment (it is pretty amazing). This is why there are two images in the video (and pretty much all Oculus Rift demos). To appreciate it fully, I recommend wearing an Oculus Rift while watching the video.



The Kinect everyone should know by now. It can yield a really good skeletal estimation of a persons joints from the depth data, which can then be used to represent gestures.

I had some time this week so I grabbed the Unity third person MMO example, added the Kinect scripts provided by CMU here, created my own fireball and fireball related prefabs and scripts, added the Oculus package, changed all the camera stuff to make it first person, and tweaked a lot of stuff. Daniel Castro (also at Georgia Tech) was nice enough to help me film me making a fool of myself.
It was obviously a bit more complicated than that. Lots of tinkering and scripting was involved to get things working but that is the output. Here at RIM, we are working on lots of other cool things and if you are interested, check out some of my other projects.

Ive uploaded the source for public use and you can find it here (just make sure to please cite me):
https://github.com/StevenHickson/UnityKinectOculus

The fireball script just takes two Game objects (the Vikings left hand normalized by your hip) and uses a velocity measurement to determine if you want to throw the fireball, then it creates a fireball and sets its velocity to your hands velocity whenever you throw. This can be done easily with a small amount of code as below:
void Update () {
Vector3 norm_hand = HandPosition.transform.position - HipPosition.transform.position;
Vector3 velocity = (norm_hand - lastPos) / Time.deltaTime;
float dist = velocity.magnitude;
if (Input.GetButtonDown("Fire1") || (dist > THRESH && dist < MAX_THRESH)) {
                        Rigidbody clone;
Vector3 pos = HandPosition.transform.position;
pos.z += 1;
                        clone = (Rigidbody)Instantiate(Projectile, pos, transform.rotation);
clone.velocity = velocity * SPEED;
                }
lastPos = norm_hand;
}

And thats it for the fireball. Then there are some scripts destroying the fireball and vikings when they collide.
For the mapping of the joints to the main Viking, each joint position of the Viking is mapped to the corresponding Kinect Skeleton joints with GameObjects in the KinectControllerScript.
Then the Oculus SDK is used to create the camera and player control mapped to the main viking.
For all the code, see the Github project

Im using a friends version of Unity Pro because Im a poor graduate student. So please donate if you liked this work so I can continue doing it. All of these gadgets are expensive and I do all this and post it for free.

So please consider donating to further my tinkering!!



Places you can find me
Read More..

Wednesday, August 24, 2016

Using Kinect with Unity 3D Game Engine

How to use the Kinect (Microsoft Drivers v. 1.5) with Unity 3D

Here is my current result for fun (The beginning is my own C++ version that doesnt involve unity) in a game where you can throw fireballs:


After spending a while developing a little C++ library to use with the Microsoft Kinect Drivers (which Ive been meaning to release), I decided to try to integrate the Kinect functionality into the popular Unity 3D Game Development software.

I was pretty excited after finding the handy CMU package here. However, it only worked with the beta Microsoft SDK and didnt have some of the more advanced functionality that I needed. Im running version 1.5 hacked together a quick DLL and modified some code.

I use the Microsoft Kinect SDK Version 1.5 which I have available for download here.

The DLL source code can be found here in case you want to modify it for a different version.

The DLL itself (needed for the Kinect to work with Unity) can be found here and should be placed in your Microsoft SDK/Kinect folder like below:
C:Program FilesMicrosoft SDKsKinectv1.5AssembliesUnity

The scripts to control a player and receive information from the Kinect can be found here.

They are used the same way as the CMU ones but are slightly modified with a bit more error checking and some extra flags. All you have to do is follow the same instructions on the CMU page linked above which just involves enabling the Kinect and telling the KinectModelControllerV2 where your joints are. The movement flag is still in beta as Im trying to make it so the character can walk around.

I have a version that is entirely in C++ using OpenGL, FreeGlut, my own version of Blepo, and my own development libraries that is previewed in the beginning of the video that can be found here. It is what I do most of my testing in before I port it over to Unity.

Enjoy!

Consider donating to further my tinkering.


Places you can find me
Read More..

Wednesday, May 11, 2016

Sprout an all in one computer and 3D scanner

This product caught my eye the other day - sprout, by HP, is billed as "a revolutionary all-in-one computer and 3D scanner that makes it easy to go from thought to expression in an instant." Basically sprout combines a digital scanner seamlessly with a home PC enabling 3D models of objects to be easily captured. These can then be manipulated as necessary and printed with a 3D printer. The obvious idea behind this product is to make the 3D model capture process family friendly. Good on HP for trying this and it will be interesting to see if sprout is a success. I can see schools liking it and the odd hobbyist but beyond that Im not so sure. Their product page implies that professional designers might use sprout in their design studios, but Im sure they would use more professional products. It reminds me of the HP TouchSmart PC that I was asked to review a few years ago. This was intended to be a digital hub for a family, probably sitting in the kitchen - HPs promotional photograph showed a nuclear family having a meal with the TouchSmart sitting on a kitchen bench. However, Ive never seen one of these subsequent to my review and can only conclude that TouchSmart didnt catch on and family members now use their personal digital devices (smart phones and tablets) instead. With regard to the sprout I can see hobbyists preferring to use separate, more flexible and powerful digital scanners. So this just leaves schools as sprouts potential market. 



from The Universal Machine http://universal-machine.blogspot.com/

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

Read More..