Sunday, 15 February 2015

Drawing a Texture To The Screen

Now having finally got my 'story' assets in place in my environment, I needed to figure out a way for them to be looked at by the player (Magnified to the HUD). After lots of researching online I figured out I was going to have to somehow use the 'drawTexture' node function. I discovered this tutorial that helped a lot with this. This tutorial uses the 'drawText' node but I was able to adapt it to my needs:

https://www.youtube.com/watch?v=jWVUr-i5zaM

With this I managed to get the picture to appear once you entered a trigger box and pressed the 'E' key. Unfortunately even when you left the box trigger, pressing the 'E' key would still display the image:



I then fiddled about with the blueprint and managed to achieve my desired result. This next video was meant to show off the blueprint itself - as it displays what is happening (useful for debugging). Unfortunately the screen capture software I used did not capture this. So in this next video, I am pressing the 'E' key quite often, and as desired, the picture only displays when I am in the trigger box.


I then went ahead and used the same technique, for the other pieces in my environment. At the moment, the images are still rough but at least the functionality works! At first this did not work until I used a 'sequence' node to allow the 'eventDrawHUD' node to connect to multiple outputs. The good thing with this is I can add to it very easily which should help, later on in my project.




Using Trigger Boxes

Blueprint For 'DrawTexture' Function

I am very pleased with the outcome so far. It takes an irritating amount of time to figure these sorts of things out but once they are complete, it helps a lot. I am spending one more day on this bedroom before moving on with my environment. I will definitely be coming back to this but I'd like to move on so I feel more comfortable that my overall environment is nearer completion. What I will look to do in this one day is really make these textures that appear to the user look fantastic as they are a high focus point. I will also fine tune other features of the room.

Personal Notes

Ignoring completing my own lighting, sound and perfecting each asset in the room, I am pretty much finished this part of my environment. As I progress with rest of environment, I can apply the skills learnt so far and when learning new skills - sound etc - I can come back to this part and edit it. This next week I will be asking testing participants to play the environment and see what they think. I will be mainly looking to see if they engaged with each interactive piece in the environment as well as understand who they are and why they are there.

One major thing I still need to look over (which is for my hallway) is the changing of meshes. I noticed an idea of making a wall opaque and therefore having another one appear in it's place. i will be looking at options for this as I think it will really enhance my environment.

No comments:

Post a Comment