I tried to find/create this texture but failed, can you show me how can I make this texture, or if you found this online can you please share it with me?
Update: I am using a tile image but it does not sit right.
I tried to find/create this texture but failed, can you show me how can I make this texture, or if you found this online can you please share it with me?
Update: I am using a tile image but it does not sit right.
The easy way would be to just model the geometry of the star and use a couple of Array modifiers to repeat it:
I also use bevel modifier there to round the corners a bit, because it cannot be sharp when made out of plastic like your reference. Then just render it from above with an orthographic camera to get a depth or normal map. No need to worry about materials or anything(even though I did set them to flat emission shaders just to render faster since I don't really care what the material is), just make sure you have Z, or Mist or Normal passes enabled:
I would use Cycles for this since it renders very quickly in any case. It should be possible to use EEVEE as well, but Cycles tends to be more precise and since it doesn't need many samples and renders really fast anyway, it doesn't matter much. I used 128 samples without any really good reason, just felt like that's definitely more than enough.
To increase precision you should adjust the camera clipping values to match the range your geometry occupies in relation to camera:
If you render to a Multilayer EXR file, you can then access the depth and normal information with the compositor:
Or you could just save the result of this with compositing during rendering with File Output node. I recommend using EXR format, but that's just a recommendation and you could use anything, just remember that normal and depth information is non-color data so you have to set image color space to it later when using the textures in your material. It's OK to leave EXR's default Linear REC 709 since that's pretty much the same thing, unless you feel like semantic meaning of setting it to non-color will let you sleep better.
You could then cut out the repeating part in the Compositor. You can use Crop node in Blender 4.2 and use Translate Node with wrapping in both axes enabled and image translated half way up and to the side to bring the seam to the middle, so you see what you are doing:
At this point you might notice how important it was to find the correct Array modifier values so that the logo is repeated exactly along XY coordinates and doesn't drift up or down like in my case:
But I'll just ignore it for now. Since we repeat only one segment, the resolution can be absolutely insane(as for this purpose) anyway and defects like this will not be visible anyway. It would actually make sense to reduce the resolution to save memory.
Then it's just a matter of using the normal or depth map in your material, adjusting the aspect ratio of the mapping since the image we got was not square and tweaking other stuff: