# Creating procedural textures for zombies

**URL:** <https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244>\
**Category:** Programming & Scripting\
**Tags:** random, unreal-engine, question\
**Created:** [February 20, 2024, 5:43pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244 "2024-02-20T17:43:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 20, 2024, 5:43pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/1 "2024-02-20T17:43:01Z")

</div>

I have 5 characters with their respective animations and for each of their body materials I have textures of different colours. My wish is that when they appear in the game these textures are applied randomly to each character, so that the same character with the same material looks different from the rest of his clones.

At the moment I’ve only managed to randomise the texture depending on the position of the model. This would be nice if I could stop the changing process at some point, as I can’t do it as soon as the character moves, it changes texture being an absolute chaos.

 ![zoom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/5/1751d58ac173d9dec6e8c478f83b6b29aa35c351.png)

Anybody have any ideas?

Best regards and thanks in advance.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 20, 2024, 6:14pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/2 "2024-02-20T18:14:38Z")

</div>

I’d go with the ‘per instance random’ → frac \* 4 🙂

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 20, 2024, 7:03pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/3 "2024-02-20T19:03:31Z")

</div>

Thank you for answering @ClockworkOcean ! However, although I may have misunderstood you, what you are proposing does not work.

 ![dsd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/9/28980d31d6b5377b5cb6a8adb5a6895ab1b7fe27.jpeg)

Best regards and thanks

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 20, 2024, 7:29pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/4 "2024-02-20T19:29:36Z")

</div>

No floor 😉

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 20, 2024, 7:40pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/5 "2024-02-20T19:40:23Z")

</div>

I had already tried, no change. I suppose it could work if I could “merge actors”(Batch), but they are animated characters.

 ![dsd 2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/f/55fd017fbe1c7df599a389e6203d395ad5efecb3.jpeg)

I’m sorry

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 20, 2024, 7:43pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/6 "2024-02-20T19:43:38Z")

</div>

Ah, you threw me a bit, it would work if they were actually instances…

Gimme a min.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 20, 2024, 7:51pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/7 "2024-02-20T19:51:29Z")

</div>

Then you have to go for

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/4/2f40137691119b85ab139aeffe585fe378e9b250.png)

and

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/0/82014218539fd75fac191d1e36e493897f7498f4.png)

![rand](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/9/009ddeb74ac40c45744480f895e6ce148abc8a0a.gif)

Or, less pastel colors

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/6/a9657bfe6d376333b1b58c490dac4f11b8fa0e6a.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/4/eb44f3376e7a7ab05e10ea0102edeb231c84fdcd.jpeg)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 20, 2024, 7:55pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/8 "2024-02-20T19:55:39Z")

</div>

Excuse me, but is the last gif you posted the final result? I’m already at that point, my problem is that when the zoobes move around the scenery they constantly change texture, like in your gif. What I need is that they change only once.

Thanks again for your answer and for taking the time.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 20, 2024, 8:03pm UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/9 "2024-02-20T20:03:40Z")

</div>

That’s only because I’m running it in the construction script. Once they’re in the level, it will stay constant…

In general, it’s like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/6/2/e6232a606d751f5f5298675eb8708650dc068b90.png)

If you set ‘increment’ around 2, 3 or 4 you get kind of primary colors, any higher, and you get pastels.

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 21, 2024, 8:18am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/10 "2024-02-21T08:18:33Z")

</div>

Hello again,

I’ve tried to reproduce your code but I must be missing something. I don’t know if your code can be implemented if it is a “skeletical mesh comonent”. I’ve tried creating it that way and with a blueprint actor and before setting the random colour, as you can see, it doesn’t seem to affect the object if I make it pink.

 ![zoom2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/7/fc7bf11a9d8a2bc1d59fdc96392b47a5da3c2afc.jpeg)

On the other hand, forgive me for being such a first timer, but where did you get the “Increment” node?

Best regards

Thank you again for your time.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 21, 2024, 8:24am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/11 "2024-02-21T08:24:19Z")

</div>

You need the parameter name 😉

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/e/2fef74d44208d92290485e07e818e937cd073fea.png)

Increment is an integer variable, a good value is 4.

I’m gonna try it with skeletal, but I think it will work… Hmm works fine

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/1/5d1061a17a66cec8ce925fe34596a2da8fb61c75.jpeg)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 21, 2024, 8:40am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/12 "2024-02-21T08:40:08Z")

</div>

That was the last piece of information I was missing, YES!!! IT WORKS!!! you don’t know how much I appreciate it, I’ve had this error for days and I thought there was no possible solution:  
 ![Vídeo sin título ‐ Hecho con Clipchamp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/9/719e747f8ce8bc9115410824bf6c2efe5e568100.gif)

Lastly, if I can ask for a bit more of your time, how can I do that instead of randomizing colours, it randomizes textures? I think this is a good start but I don’t know how to set up a “noso” that, depending on a number, as with the vector colour, selects one texture or another in a “switch”.

 ![TTT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/f/81fa7d52e299883537c46069b7e9fa5e173ee21d.png)  
My attempts don’t work, I must be too rough XD

Thank you very, very much, you are my angel @ClockworkOcean

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 21, 2024, 8:46am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/13 "2024-02-21T08:46:54Z")

</div>

Very similar, except you make the material like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/7/ac7fe025651fe49aef420c1bbf2b954ad34f4ad3.png)

and the BP like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/3/bc38bba8ca1fe0a75f04f602429e78175b88e1d2.png)

It’s just an array of textures

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/0/470a47e6fa9c8a49e776659fdb258d1d6efa6a48.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/7/4e722b4b4a619424c8c63a6b09491a39efd58d43.jpeg)

( You can have a more complex material, of course, but this is how you switch textures )

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 21, 2024, 8:57am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/14 "2024-02-21T08:57:25Z")

</div>

That idea is fantastic! but I can’t find the “Texture” variable, again I’m a first timer, how did you get it? @ClockworkOcean

 ![Das](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/c/88c53af185e0f8270a20fee77a4dafaeace346f9.png)  
I can’t seem to join that node with the “random” node if it is not exactly the variable “texture”.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 21, 2024, 9:00am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/15 "2024-02-21T09:00:39Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/4/b84e64cda1168f1fd6b982216a4be71f45af5bca.png)

Then you have to pull from the array variable, and search for the random node.

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 21, 2024, 9:10am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/16 "2024-02-21T09:10:57Z")

</div>

Thank you!!, that was it. However, I am not able to get it to work for some reason.

 ![error](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/4/284967c809a78bf4008d26ed36d2638d69471e8e.png)

However, with the previous option you gave me for the vector colour, I have managed to get the black colour parameter to work as a random element and this method suits me better.

 ![el modo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/4/2/a4246d15980c1ef0af6681372e9f2f6b55c4e265.png)

I don’t know if you can think of a reason why the last method doesn’t work, but if you want I can close the subject/question of forums-unrealengine by answering your first code.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 21, 2024, 9:15am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/17 "2024-02-21T09:15:42Z")

</div>

You don’t have a texture parameter in the material, you can only talk from the blueprint to a ‘parameter’ 🙂

Also, you don’t do the texture choosing in the material now. No switch there. ONE texture, and you change it from the blueprint.

Just put one texture in the material and

![text param](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/a/03a88d6579a6767783ae743aefdbb198ed6a8c21.gif)

and in the BP

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/a/f5a8daef272aff95c7ca39ccd78ca074e995326a.png)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 21, 2024, 9:22am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/18 "2024-02-21T09:22:00Z")

</div>

Maybe I am not understanding you, I think I have already done what you are telling me, I have recreated the texture node as a parameter and I have renamed it as you did; but no change happens.

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/c/89cb29ef69e6ddd1fd9c270f02d102ca5585fd9b.png)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/1/f21a79d87d2c44f27409549a60dc923bf66eab20.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 21, 2024, 9:30am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/19 "2024-02-21T09:30:19Z")

</div>

If it’s a cube, it only has one material, so this would be a zero

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/f/9df2aafe8ebe56bfa464df05a7d2211611016c62.jpeg)

I only used 1 in my example, because I was dealing with the third person mesh, which has two materials.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/3/d63d970c774fd61bf0a0f6dd92ff406f46636cf1.png)

---

<div class="post-metadata">

**Author:** ![TijerinArtStudio](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tijerinartstudio/32/482290_2.png) [@TijerinArtStudio](https://forums.unrealengine.com/u/TijerinArtStudio)\
**Post date:** [February 21, 2024, 9:34am UTC](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244/20 "2024-02-21T09:34:52Z")

</div>

IT WAS THAT!!! You’re great, thank you so much. I’m going to close the subject. Now I have even don ways to get the result; Thank you very much @ClockworkOcean

[Next page](https://forums.unrealengine.com/t/creating-procedural-textures-for-zombies/1702244.md?page=2)
