Changing Textures!
So for this project the goal is to make a small domestic room in which some of the textures can be changed in game. This was probably my most simple task without me realising, The object would be inputted into a multi-gate, which would cycle through the textures which were on texture nodes (they decide what texture to place onto the mesh). This texture node would also have the meshes attached to it so it knows what it is changing and to what texture, This would be controlled by the triggers (Left and right, depending on what you want to change).
The main problem I faced during this was the textures changing at the tick speed (aka super ridiculously fast) to counter this, I added a delay with a 1 second break to stop the incoming ticks from the trigger and allow only one trigger to happen per second, I decided one second as it allowed the user time to release the trigger and also to not have to wait a long time between each texture change.
I have hooked up two pieces of furniture that will cycle textures based on input from the user, I also created a small house scene, which was pretty simple and is made from both cube meshes and actor blueprints for the doors and windows. I textured these so at the beginning of the test the two pieces of furniture would stand out as basic white textures, This was because it allows people who are using it to easily know which pieces should change through the textures.
These are my nodes for this task, They are pretty simple I began with the event begin play into the enable input and the set player controller, This would allow for the input to be read as the input tick for an event.
I had to then go to making sure each button would correlates to a particular texture and object, The objects would cycle throughout textures that were pre chosen and connected to a multi-gate, This has a option to allow me to cycle within the pre chosen results for the texture. Within my nodes for the left grab (bed) it starts with the input sensor and this then goes into a delay branch then multi-gate which feeds the textures and in which order to set the texture for the object.
The Right side was pretty much the same with different set textures and the input set to the right grab instead, these nodes were pretty simple overall, and i just changed the textures that the bed would change to.
I also created a sofa which followed the same rules as the bed, The coding wasn't too different all the difference was just in which objects texture would change.
The designs of the bed and sofa were quite simple, with the design for the bed had two changeable textures, while sofa would all change within the tick event. the delay was added to add of these otherwise the textures would go through each texture too fast whereas with the delay they change with enough time in-between the change within the time to make it still feel instant and still allowing for the blocking of the instant flash past textures. Below are the designs for the sofa and the bed.
After testing the project I can see it works and pretty well with the controller triggers controlling individual pieces and functioning as intended. I really like how this has came out and think it works well. i think i could've added to it more such as adding a collision instead of using the controller buttons. I think this task has come out well it could've been better if i had the knowledge of how to do a collision change instead but overall from my knowledge i think its come out really well. Below is the room where all of my objects were placed.
https://drive.google.com/file/d/156nwUUD0G3guBUg7ER0Gp_dSHrXkpFWp/view?usp=shari...
I really like how this task has came out and think it works well and is quite simple to use!
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.