Jump to content
  • Advertisement
  • entries
  • comments
  • views

Creating a VR Teleporter in Leadwerks

Josh Klint


I'm building the VR project template for Leadwerks 4.5.  Although you can enable VR in any project, this template is specifically designed to provide some of your most common room-scale VR features:

  • Teleportation movement, which prevents motion sickness.
  • Picking up and throwing objects. (It's actually really fun!)

To start with I am creating the art assets for the teleport effect. This is basically what I want:


Your controller shoots a beam which ends in an indicator when it hits an upwards-facing slope. Typically this beam will be somewhat arced.  Why the curve? This allows you to climb up to areas above you:


As always, I am starting with the game assets. I don't believe in using programmer art because it hurts your understanding of what you are trying to create, it's uninspiring, and you will end up writing your code twice once you get the final artwork and realize all the mistakes you made.

I started with textures. I know I want a circular indicator on the floor, a misty spinning effect rising off it, and a beam. I'm going to make all my textures grayscale so that I can control the color with the entity color value and dynamically change it in the game.  Here are my textures I created in about ten minutes in Paint Shop Pro:




The first texture above is clamped along the X and Y axes and the second one is clamp along the Y axis.  I am using uncompressed textures for all of these because they have a lot of soft gradients.

I created my materials with the following settings, again leaving everything white:


In 3ds Max I created my indicator model. It's just a plane with a cylinder on top, with the end caps removed:


When I import it into Leadwerks and apply my materials, the model looks like this:


I'll show you why I am using uncompressed textures. You can see in this shot the edge of the ring has some ugly artifacts when texture compression is used:


Here's a closeup. Not something I want to see in VR:


Now I am going to create an instance of the model in the editor and adjust the color. I want a bright blue glowy color. I am setting the color to RGB 128,255,255 and cranking the intensity way up to 2.0. This effectively sets the entity color to 256,512,512. This color is multiplied by the texture color at each pixel and then clamped to 0-255 (the maximum color range of the monitor). That means that the brightest spots on the material will reach a full 255,255,255 white color and look really intense, while darker parts will be tinted blue:


Notice the object isn't just a flat color, but has a range of color from blue to white. To get this effect I had to increase the intensity over 1.0 to create colors brighter than RGB 255,255,255, and I had to have some red in the color. If I had set the color to RGB 0,255,255 the red channel would never increase and I would have a flat color like this. Not so good:


If I had set the color to RGB 128,255,255 but left the intensity at 1.0 I would also have a solid color:


Finally I added a script to the model and saved it as a prefab. The script just rotates the model around slowly on its Y axis, which I think will look pretty good. I'm going to perform the rotation in the Draw() function so it doesn't get called if the object is hidden or offscreen, and I don't think anyone will notice if the rotation doesn't update when they look away:

function Script:Draw()
	self.entity:Turn(0, 0.1 * Time:GetSpeed(), 0)

That's it for now. The next step will be to create my teleportation mechanic in VR.


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By UnificationIndeed
      Its almost 4 AM in here, i am foreigner who lives in south Korea, married and i have also a stable job. i live in Seoul, and i am looking for a serious group that willing to design and develop a game as a hobby. I am kinda dead serious about it. I made a game but its far form being finished, because lack of ideas and code lines.
      I am looking for group of friends who live in south Korea and are willing to sit down, have a coffee, discuss ideas, and start bringing these ideas to life. (Online, Offline, card or mobile) game. I am good with Unity3d, and a good painter and illustrator, furthermore experienced with WACOM tabs. 
      Many games started from a garage by a small groups of developers, and now they reached the sky with their dreams and ideas. Please contact me or comment here, if your passion fall in this direction.
      Here is couple of screenshots of the project i am working on. called "chronicles of SORFIA" 

    • By Jacob McGivern
      Currently, I am a beginner to intermediate level UE4. I wanted to expand into VR using the engine as well. I do not have any VR equipment and wanted to make an educated choice based on how it works to develop it using unreal.
      The main question is tethered vs untethered for development purposes. When you are actively playtesting and running your game while devloping, how does an untethered (occulus quest) work? Do I have to fully deploy and download the game everytime I want to see how it plays in the headset? For tethered systems (Rift S), when you hit play in UE4 and it is plugged in, can you see the game being played as if you were working with it on the PC? 
      Note: I'm not asking what VR system is better, i'm asking how does the debugging and actively playtesting the game work through UE4 based on a tethered vs untethered VR headset.
    • By boadle
      Hi all, 

      My name is Lewis Boadle, and I'm an experienced illustrator, designer and 2D/3D games artist with several dozen released titles under my belt, across all types of platforms. I've worked on big games (Star Wars, James Bond, Harry Potter), mobile (the Quell series of puzzle games), and indie stuff (most recently American Fugitive, from my Indie studio Fallen Tree Games).

      I'm a big advocate of VR, and would love to work on one or more small (limited environment but high-concept) VR experiences that have been kicking around in my head for a few years. I'm hoping to establish a fun and relaxed remote relationship with a Unity games programmer to try out some ideas and develop a prototype. If it goes well, I would be happy to consider a commercial release, but of course this is not a guarantee. To be clear, this is not a paid project, but a voluntary collaboration initially.

      Should have own VR set-up, ideally Oculus.

      Drop me a line if you'd like to know more.
    • By EndLessDreamsnCream
      Hey to all!! My name is Billy and I have a game/world idea that I want to very much bring to fruition. It would basically be a new world where anyone can live out their fantasies. Sort of a "Westworld" if you will except my world would focus mostly on stimulating ones private area senses to induce a strong Orgasm. Theres so much new technology and we can now make this happen. Im open to ideas and open to joining other developers who need help with anything. Hope to hear from you guys soon.
    • By ThomasG_art
      A complete scene and prefabs created in unity. allow you to get you started rapidly.
      Mountains, ruins and cave areas are all included:


      The cliffs/rocks and ruins feature a trilanar shader, you can customize the colors/textures and overlays. The water and vegetation shader are also customisable. 
      The trees/vegetation prefabs are using unity's terrain system and are already set-up for you. The ruins prefabs are modular and fit on a grid. 
      The cloths prefabs are using unity cloth's system and can be adjusted. 
      Particle effects, air particles, clouds, mist , butterflies, etc...


  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!