[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Holographic foil shader, where to begin? My instinct is to

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 43
Thread images: 12

File: 1287645_large.jpg (226KB, 940x528px)
1287645_large.jpg
226KB, 940x528px
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
>>
>>492263
Change metalness using fresnel or something like that.
>>
>>492263
Bump is too strong.
>>
>>492263
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.
>>
>>492263
use a linear light falloff.
control it with a ramp.
set a math node to divide.
have it controlled by the alpha channel of your texture.

then tweak it.
>>
that looks really sexy
>>
>Blue eyes
Please kill yourself you stupid fucking nostalgia faggot
>>
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.
>>
File: holo.gif (4MB, 403x452px) Image search: [Google]
holo.gif
4MB, 403x452px
Got a basic effect, going to try some more complex layering, trying something like >>492302
suggested.
>>
File: shaderforge.png (191KB, 822x785px) Image search: [Google]
shaderforge.png
191KB, 822x785px
>>492408
Here is the shaderforge build, nothing complicated, but it's a start at helping me break down the effect.
>>
>>492408

That is actually looking awesome.

Thanks for the node view too.
>>
File: holo_2.gif (4MB, 248x248px) Image search: [Google]
holo_2.gif
4MB, 248x248px
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


>>492421
thanks, and no probalo
>>
>>492409
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..
>>
File: facet_02.jpg (63KB, 1024x1024px) Image search: [Google]
facet_02.jpg
63KB, 1024x1024px
>>492464
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.
>>
>>492518
Shaderforge.
>>
>>492518
i'd see if i could control the spec ray to the camera so it only showed rainbow.
>>
>>492518
I'd love a tutorial on this because HLSL sometimes seems more like magic to me.
>>
>>492522
Nope.

>>492524
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:
http://docs.unity3d.com/Manual/SL-SurfaceShaders.html

>>492534
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:
https://unity3d.com/learn/tutorials/topics/graphics/gentle-introduction-shaders?playlist=17102

http://docs.unity3d.com/Manual/SL-SurfaceShaders.html
>>
>>492535
If your doing cards, make a /3/ card.
>>
>>492535
>You don't want just rainbow for holographic films
indeed.
but you could then shape the separated rays in real time with an animated alpha map on the card it self.
light textures.
(fake) holographic spec maps.
>>
File: urafgt.png (246KB, 419x610px) Image search: [Google]
urafgt.png
246KB, 419x610px
>>492536
Hey OP I hope this will help.
>>
>>492535
pretty neat. would like to see this in unity/UE. try it out maybe?
>>
>>492518
>>492535
cool shit
>>
>>492637
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.
>>
>>492600
0/10 for being an auto include for any competitive deck.
>>
>>492637
It is in Unity 5 actually.

>>492655
It is technically CG yes, which is really just HLSL in a nice package that lets it be easily converted to other languages. So that shader is multi-platform.
>>
>>492600
Thank you for making my day.
>>
All you need is a weird specular map. There's nothing to holofoil besides a transparent but reflective surface.
>>
>>492680
an example
>>
>>492680
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.
>>
>>492681

Bro. that card is worth lotsa money. I'd hold onto it.
>>
>>492763
Bruh, it's like $15 bucks on Ebay.
>>
>>492763
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.
>>
>>492768
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.
>>
>>492692
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.
>>
>>492801
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.
>>
File: holofoilCharizard.jpg (313KB, 1024x768px) Image search: [Google]
holofoilCharizard.jpg
313KB, 1024x768px
>>492842
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.
>>
File: nitto.jpg (2MB, 1020x1016px) Image search: [Google]
nitto.jpg
2MB, 1020x1016px
Thanks for crackin the code
>>
File: charizard.webm (265KB, 486x500px)
charizard.webm
265KB, 486x500px
>>492880
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.
>>
>>494955
looks sexy, makes me wish someone would make a tv show with a new card game thats similar to early yugioh
>>
>>494955
those edges
>>
>>494955
damn that's cool.
Thread posts: 43
Thread images: 12


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.