Home Technical Talk

Light Function material texture tutorial?

polycounter lvl 6
Offline / Send Message
Kligan polycounter lvl 6
Hello.

Is there any tutorials that talk about how to create a mask texture for a light function material in Unreal?
I want to know how to make specific shapes.

Here's what I mean.
I have these two lamps:

Making a circular mask for the light function was fairly straightforward. Just a line across the texture.


But the lamp on the left has octagonal lampshade. So the circular shadow from it is just wrong.

I want to know how to make the mask in a way that the shadow would resemble hexagon?

I couldn't find anything on google.
If anyone has any links or could share some knowledge, I would be very grateful!

Replies

  • poopipe
    Options
    Online / Send Message
    poopipe grand marshal polycounter
    work out what shape the light is mapping the texture to - try a checker pattern / lines / whatever

    once you've worked that out you just need to project the image you want onto that shape and bake the result to a texture

    it's probably a sphere for a point light but ive not tested it so I'm not sure
  • Kligan
    Options
    Offline / Send Message
    Kligan polycounter lvl 6
    poopipe said:
    work out what shape the light is mapping the texture to - try a checker pattern / lines / whatever

    once you've worked that out you just need to project the image you want onto that shape and bake the result to a texture

    it's probably a sphere for a point light but ive not tested it so I'm not sure
    That's basically what I'm trying to do, manually lol...

    I'm trying to trace the shape on the texture.



    I just thought maybe there's a better way of doing it instead of just guessing, haha :D
  • Kligan
    Options
    Offline / Send Message
    Kligan polycounter lvl 6
    Well... I basically just guess the shape by trial and error:


  • poopipe
    Options
    Online / Send Message
    poopipe grand marshal polycounter
    there is - UV  a sphere and then either paint it in painter or bake to it
  • Kligan
    Options
    Offline / Send Message
    Kligan polycounter lvl 6
    Now that I'm thinking about it... 
    I guess what I could've done is make a high-poly sphere, then shrink-wrap an octagon on the top and on the bottom of it. And then bake the result as material ID map, and use it to trace the shape for the mask.
  • Kligan
    Options
    Offline / Send Message
    Kligan polycounter lvl 6
    poopipe said:
    there is - UV  a sphere and then either paint it in painter or bake to it
    Exactly what I thought about a minute ago, as I mentioned in a comment above, haha 
  • Eric Chadwick
    Options
    Offline / Send Message
    You could also just do a polar transform, taking the regular flat shape of the pentagon or whatever shape, and transforming it instantly into the latlong layout. Both Photoshop and Designer have filters for this.
Sign In or Register to comment.