Heya people,
Quick question, does anyone have a quick and dirty idea on how one would go about creating an 'internal' bounce of the Specular/Reflection?
Basically I have a sphere mesh, and one part of it is masked to show the reflection, I inverted this reflection 180 to fake the refection, but cannot for the life of me fake the 'bounce' as if it's pushed in internally, it still looks like its 'floating' ontop of the mesh itself.
I tried an inverted my normal map and using a Bumpoffset to try this effect, but no avail.
Anyone have tips? Cheers!
Replies
http://img442.imageshack.us/i/eyeballrefraction.jpg/
Basically, I'm trying to get that internal bounce as seen in the image in shader format, all on a single mesh.
The math in theory suggests that I flip my RG channels of my Normal map with a decent Parallax map, and it should fake the effect correctly. I tried that over and over again, but it seems like inverting my Red and Green channels for said effect breaks my Specular and Cubemap setup.
So I was wondering if any kind soul had any tips or snippets on which they might have the solution.
Cheers!
It's not physically accurate, really, but it works fairly well.
Flipping the y component would probably give a similar result...
edit: That should have been reflection instead of specular... read your post wrong But the idea's still the same.
For some reason, inverted Normal Maps don't help (even dented ones) I had to end up 'inverting' my whole formula's for some reason (like my Blinn had to be inverted), I guess it's a UDK issue since that's where I'm doing my shaders, I tried Max and Maya shaders, but they worked alright with inverted Normal channels only.
Also, I just wanted to add that I forgot one thing that made me run in circles, and that is an inverted Diffuse term, if anyone tries it out, you'll know what I mean when you see the results for you pupil :P
Once again, cheers to all and thanks for everything!
I'm not sure why you want to invert normal maps or whatever, if you're trying to recreate an eye why not break down what's actually happening in the physical world to create your material?
I have two Specs currently, one is the Cornea on the Iris (I will call this IC) and and the other is the internal one is for the Iris.
I'm using the math of the bulge of the Cornea as the 'inverted' math to fake the refraction internally, when it comes to the light bounce in the inside, at angles as a buildup for 'wet' light on the internal iris.
The ideal solution as you said, would be for me to simply model in low poly the stuff I need and base it physically, with the proper shaders later on and it would be much more simple, but then I would need another layer that is Translucent for the Bulge, usually bring in it's own issues, like Depth sorting with hair, I still haven't found a solution to that in which I could tell UDK on how much it can clip in distance.
And yes, I have quite a few characters who have their hair ontop of their eye balls, very niche market, but I make it happen baby!
And soft masked is not an option, since I need the smooth keratoplasty build up and scatter of light near the edges between the said rims.
Plus, I also have a dilation setup going for the texture, I'm not too sure how well I can do that in vertex format to fake the stretching of the Pupils details.
Plus, many artists I know tend to be abit lazy when it comes to creating them maps, so I'm trying to explore my options of fallback math for such stuff.
Yep, that's the idea, but for some reason in UDK, when I invert the G channel, it ends up 'skewing' location of the highlight slightly to the side from where the light is coming, rather then inverting it to the opposite location outright as hoped, so I ended up inverting my whole formula, which works correctly now. No idea why this happening, but it's the current work around.
or as was mentioned just use the geometry normals 0,0,1 if you are using one piece of geometry for the eye (which is the way to go imo); mask with vert color would be a decent option if you have more to the mesh pieces than just the eye. You could use bump offset (can store a heightmap -1 to 1 in the blue of the normal) to get a refraction type effect applied to the iris texture and spec but not the sclera/cornea reflections so that it appears there are two separate layers even though it's one piece of geo.