Holographic foil shader, where to begin?
My instinct is to have a color ramp in a reflection channel, and mask text/image/whatever in a specular channel, but the results are not quite right.
Specifically interested in a shader for Unity, but any insight would be helpful.
pic related is Vray: https://www.youtube.com/watch?v=c_D1QuJ1vUE
You need a normal map that doesn't affect the "regular" lighting, then you can map the different vectors to different colors. You could use the reflection angle for further color mapping on top of it.
I'm afraid you won't get around writing a custom HLSL/GLSL shader.
Layered shader. left view shader, normals facing left, + fresnel reflection with reflection mask to create the sparkly effect
right view shader same thing but opposite facing normals and change reflection mask / colour.
Got a basic effect, going to try some more complex layering, trying something like >>492302
Here is the shaderforge build, nothing complicated, but it's a start at helping me break down the effect.
Here's some experimenting with layers. I was not able to figure out how to make a single layered shader in SF, or if I even can. This is four different meshes each with its own shader, each shader with a different normal map pattern blended with a normal map directional color, and a different specular color.
It's really shoddy, but it has given me some ideas to better it with my limited shader knowledge. Things to do:
>to get a better look, I will probably make patterns using one normal map directional color with a bit of variation for depth, as there is currently too much pattern bleeding in the different directions
>meshes are currently all at 25% opacity, an opacity mask from the pattern will probably look better, and will play nicer with an image on the holograph
>experiment more with the simpler holographic started in >>492408
thanks, and no probalo
dont have a clue about engines but know vray/mantra etc, so what makes this work?
IS the screen position the normals of the mesh (ie like the pass you render out to help relight) or literally screen position? Thats diffuse and color, normal spec, why is the normal map you added to it all spiraly (artistic choice, or necessary?)? Dont get this at all..
the screen position on the spec is not really necessary. It makes the rainbow effect look a bit better imo, but it looks fine with regular UVs. The normal is spirally for visual interest for the foil effects. Any normal would work, I was just trying to capture the faceted look of some holographic foils.
pic related is the normal map, shader forge fucks with the preview for some reason. (as well as the specular texture, it is just a rainbow gradient)
Thread got me interested in trying to make my own purely through HLSL. No textures used for this, just code. Still workin on it tho.
You don't want just rainbow for holographic films, there's also a portion where it shouldn't be colored, at least usually. But yeah, I will have to play around with some ideas later. Getting the camera angle in a Unity surface shader isn't too hard, just define it as 'float3 viewDir; in your Input struct, and it will be exposed for usage in the SURF function as IN.viewDir. Same goes for worldRefl which I'm currently using. More info here:
If you know other programming languages like C# or Python, it's not too hard to get into. Also GLSL and HLSL are very similar and easy to translate between, most of the time just a few words to search replace with their other language equivalent. (and understanding how to handle vert/frag in HLSL+CG).
Just start with the tuts Unity provides. They just came out with new one today apparently:
>You don't want just rainbow for holographic films
but you could then shape the separated rays in real time with an animated alpha map on the card it self.
(fake) holographic spec maps.
just looking at the skybox, im pretty sure thats unity 5.
im curious why the dude specifically states hes using hlsl though. i would expect sl cg or glsl to be used. maybe i missed something.
It all depends on the holofoil effect you're going for. There's the cheap-as-fuck kind like that which is sometimes used, then there's the laser-film version that actually has bands of rainbow color depending on the viewed surface angle, not so much a light source being reflected. Just like the back of any CD/DVD.
Are old pokemans card still worth anything?
Last time I checked they said the cards lose their playability after two years or so (you are officially not allowed to use cards when playing older than 2 years)
I still have a drawer full of cards.
Yes. Legality of cards in tournament play has very little effect on card price, as most people buy them for personal play or just as a collectible. Most MTG cards that are super expensive are also illegal in any worthwhile tournament.
Hmm I see. After reading your post I tried a different strategy. I had the quad with the card texture and then I made another quad thay floated above the first. I gave that one a ramp shader and gave it different colored specular maps. It didn't seem to really work. Though it was hard to test. Even viewport 2.0 refused to show the specular maps in real time and I didn't want to batch render. But having a seperate material for the holofoil affect is probably the solution you really need.
You don't need to use two pieces of geometry. In Maya, just use blend nodes and a mask on their Blend value, so you can have two different results on the same material controlled by a mask. Your mask would just be black for the card area and white for the foil area (or the other way around).
There's a tutorial floating around by Lester I believe which shows you how to create a rainbow foil effect in Maya. I'm just trying to do it procedurally within shader code in Unity. Havn't had the time to play with it some more yet though.
yeah that occurred to me after I posted, and here's that. All cards have the same layered shader which uses a regular diffuse for the card art and a ramp shader for the specular. The specular maps are just noisy ramps I duplicated and changed the color on. But you COULD have completely different maps, or an animation in sequence, to create some other kinds of holographic affects.
goddamn. I spent all this time rendering out this thing and making it a high quality webm. THEN my fucking rabbit chomps my ethernet cable.
I went through too much bullshit to NOT share.