Home Technical Talk

I'm trying to find the specific name of this technique/shader

polycounter lvl 5
Offline / Send Message
Moctor polycounter lvl 5
so I've made a quick mockup up what I'd like to recreate before explaining (it's not perfect but hopefully it gets the idea across)

I've been trying to find out the name of this effect/shader/technique for a while now after seeing it around, and because I don't know the exact name of it I can't research it any further.

basically what I'd like to achieve is being able to see a skybox/cubemap through an object. like a window or portal that actually moves as you would expect it to. I've heard a few things like "screenspace texture" and "unmoving plaid" but those terms don't seem to lead anywhere useful.

any kind of insight or a point in the right direction would be hugely appreciated, thanks!

Replies

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    A screen aligned texture would look similar to this. In that case, you would simply use the screen xy coordinates as texture coordinates. Where do you want to create this effect? I mean which engine or renderer?
  • Moctor
    Offline / Send Message
    Moctor polycounter lvl 5
    Obscura said:
    A screen aligned texture would look similar to this. In that case, you would simply use the screen xy coordinates as texture coordinates. Where do you want to create this effect? I mean which engine or renderer?
    I was thinking of both in engine (ue4 or unity) and in maya, I've heard of screen aligned textures but they don't rotate with the player/camara movement, which is ideally what I'd like to figure out.

    I'd like to be able to apply it onto moving meshes like clothes or skin.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Then you could use camera vector with a cubemap. Just plug the camera vector into the coordinates of the cubemap. Using camera vector instead of reflection vector would make it look such "flat" just like on your example gif. Like its a plane and the normals of the mesh isn't taken into account, but it would rotate with the camera rotation, like its a window as you said.
  • Moctor
    Offline / Send Message
    Moctor polycounter lvl 5
    Obscura said:
    Then you could use camera vector with a cubemap. Just plug the camera vector into the coordinates of the cubemap. Using camera vector instead of reflection vector would make it look such "flat" just like on your example gif. Like its a plane and the normals of the mesh isn't taken into account, but it would rotate with the camera rotation, like its a window as you said.
    I'm still pretty stuck at the moment, but this is perfect - basically what I was trying to do, I've found a few people that have mentioned plugging the worldspace view direction into the cubemap somehow but I can't quite find any decent documentation for either maya or UE4. so I can't really find out how to get that working.

    thanks for the help though, it's made my search a little easier.
  • Moctor
    Offline / Send Message
    Moctor polycounter lvl 5
    also I've been unable to make the texture flat using a cubemap (flat to the screen, still don't know the term for this), only by plugging the perspective camera into a texture projection node like so:

    which results in this, 


    even if I could find a way to rotate the cubemap with the camera, I still wouldn't be able to see it flat through the object.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    The first gif looks like a simple cubemap /skybox to me.

    If you want it to move with the object just offset the uvs by some function of the object's position 

    Or am I missing something  
  • Moctor
    Offline / Send Message
    Moctor polycounter lvl 5
    poopipe said:
    The first gif looks like a simple cubemap /skybox to me.

    If you want it to move with the object just offset the uvs by some function of the object's position 

    Or am I missing something  
    I think you get what I mean, are you familiar with valve hammer editor? with that you can texture a surface with a "skybox" material and it shows an infinitely distant skybox through it - that's what I'm aiming for. though I've not yet figured out how to replicate that.

    unfortunately searching "cubemap skybox" isn't really helping at the moment, but thanks though.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    In that case just do as obscura describes,  plug a reflection vector into the uvs of your texture. 
    Or just plug a reflection map thingy into the color.  I forget exactly what's available in hypershade. 

    I remember that functionality   couldn't remember which.engine it was though... 
  • Shrike
    Offline / Send Message
    Shrike interpolator
    Its a frontal projection or a screen space aligned material, its so niche there is no "word" for it, you can just describe it by how its done
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    It's not in screen space,  it's in world space
Sign In or Register to comment.