V4 Eye Surfaces

Various informations and discussions about DAZ Studio
User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

Post by Lakys » Tue Dec 26, 2006 6:15 pm

cowdog wrote:
Cornea = 1.336/1.376=0.97
Lakys, can you explain this?

What I do know is that sin theta1/sin thetat2 = IOR 2/ IOR 1 and that the inverse sin of the above quotient gives us the critical angle for internal reflection. I just don't get why you would assign this quotient as the IOR for the cornea...
edit (as the first post was not accurate)
You are correct about Snell's Law.

However, you forgot how it is used into the shader.

The D|S shader considers only the material index of refraction (let's call this n) and assumes the outside is air (or physically speaking vacuum with an index of refraction of 1.0).

So you can write it this way sin өi = n sin өr where өi is the incident angle and өr the refracted angle (from the normal).
n is there the index of refraction involved to calculate the refraction of a ray passing throught outside to the inside of a surface.
The shader uses 1/n for the reverse operation (inside to outside).

If instead of this, you wish to create a surface reproducing the behaviour of the refraction resulting from a material with an index of refraction n1 and an index of refraction n2, you will still use the same law

sin ө1 = n2/n1 sin ө2

so it is equivalent to use the shader with the input n parameter replacing it with n2/n1.

So if n1 = 1.376 and n2 = 1.336, n = n2/n1 = 0.97 (approximatively).

The rays will be bended (refracted) the same way.

Rather simple no? ;)

cowdog
Specialist
Specialist
Posts: 225
Joined: Tue May 09, 2006 2:32 am
Location: Sitting in front of my computer, just like you.

Post by cowdog » Thu Jan 04, 2007 5:52 pm

Here's something I stumbled on today:

http://mythologic.info/V4Eyes_Workshop.pdf

Haven't read it yet but it might be informative...

cowdog
Specialist
Specialist
Posts: 225
Joined: Tue May 09, 2006 2:32 am
Location: Sitting in front of my computer, just like you.

Post by cowdog » Thu Jan 04, 2007 6:57 pm

sin ө1 = n2/n1 sin ө2

so it is equivalent to use the shader with the input n parameter replacing it with n2/n1.

So if n1 = 1.376 and n2 = 1.336, n = n2/n1 = 0.97 (approximatively).

The rays will be bended (refracted) the same way.
Yes, this all makes sense when you realize that D|S always assumes that the outside IOR is 1.0. Then, as you pointed out, balancing the equations yields the above. Thank you.

User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

Post by Lakys » Fri Jan 05, 2007 12:30 am

cowdog wrote:Here's something I stumbled on today:

http://mythologic.info/V4Eyes_Workshop.pdf

Haven't read it yet but it might be informative...
Nothing really new, however it is well written and illustrated.
But it doesn't involve any advanced effects (refraction, reflection, bump mapping, displacement), it may produce glowing eyes (iris), it looks rather flat or unatural to me.

But I shall keep the link for further reference.
cowdog wrote:Yes, this all makes sense when you realize that D|S always assumes that the outside IOR is 1.0. Then, as you pointed out, balancing the equations yields the above. Thank you.
You're welcome. It helps to know how the default shaders work. ;)

User avatar
weimart
Future Engineer
Future Engineer
Posts: 866
Joined: Sat Dec 31, 2005 2:17 pm

Post by weimart » Fri Jan 05, 2007 12:24 pm

Lakys wrote:
cowdog wrote:Here's something I stumbled on today:

http://mythologic.info/V4Eyes_Workshop.pdf

Haven't read it yet but it might be informative...
Nothing really new, however it is well written and illustrated.
But it doesn't involve any advanced effects (refraction, reflection, bump mapping, displacement), it may produce glowing eyes (iris), it looks rather flat or unatural to me.

But I shall keep the link for further reference.
I agree, the results are far from convincing, the eye mapping is very well described though.
I'm begining to get some nice looking eyes using specular/reflexion maps. Not very elegant but faster :oops:

User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

Post by Lakys » Fri Jan 05, 2007 2:00 pm

weimart wrote:I'm begining to get some nice looking eyes using specular/reflexion maps. Not very elegant but faster :oops:
Render speed is also an important criteria. Especially when it comes to render some animations, or that the effects are limited because GL-SL shaders are used.

I am looking forward to see your renders.

User avatar
weimart
Future Engineer
Future Engineer
Posts: 866
Joined: Sat Dec 31, 2005 2:17 pm

Post by weimart » Sat Jan 06, 2007 5:13 pm

Here is one, not as good as I would like...
I had a better one on my laptop but the charger burned and I'm not sure what I will find when/if it's fixed. :twisted:
Attachments
v4-5.jpg
v4-5.jpg (448.14 KiB) Viewed 437 times

cowdog
Specialist
Specialist
Posts: 225
Joined: Tue May 09, 2006 2:32 am
Location: Sitting in front of my computer, just like you.

Post by cowdog » Tue Feb 13, 2007 3:19 am

Here's a test run using V4 Emma w/ green eyes.
Attachments
emmat1.jpg
emmat1.jpg (250.93 KiB) Viewed 400 times

User avatar
weimart
Future Engineer
Future Engineer
Posts: 866
Joined: Sat Dec 31, 2005 2:17 pm

Post by weimart » Fri Feb 16, 2007 2:10 pm

I'm working on a green eyed Emma too. :wink:
I have a very hard time setting the eyes, on this one I'm pretty happy with how the reflexions turned out but the iris is not refracting properly on the cornea... :roll:
Attachments
v4eyes5.jpg
v4eyes5.jpg (404.67 KiB) Viewed 378 times

User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

Post by Lakys » Fri Feb 16, 2007 2:19 pm

weimart wrote:I'm working on a green eyed Emma too. :wink:
I have a very hard time setting the eyes, on this one I'm pretty happy with how the reflexions turned out but the iris is not refracting properly on the cornea... :roll:
You know I still have hard time too with V4 Eyes. It seems like a big pain to get just a (specular) highlight on the corneas.

I wonder whether there is not some issue (or big trick to use) with V4 double surfaces and D|S.

Even if V3 eyes were less realistic, I could get really cool effects. *sighs*

We shall find out something hopefully.

User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

Post by Lakys » Fri Feb 16, 2007 4:23 pm

Ok I think I understood a few things. :)

Got an eye a little more convincing. This one uses raytracing with a double refraction (on both eyesurface and cornea).

By the way, that's still Emma's green eyes.
Attachments
Emma-eye02.jpg
Emma-eye02.jpg (98.12 KiB) Viewed 366 times

User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

And a render...

Post by Lakys » Fri Feb 16, 2007 4:44 pm

Well... there we go.

Now big question, how to make this thing works with AO. *lol*.
Attachments
Emma-eye03.jpg
Emma-eye03.jpg (223.94 KiB) Viewed 365 times

User avatar
weimart
Future Engineer
Future Engineer
Posts: 866
Joined: Sat Dec 31, 2005 2:17 pm

Post by weimart » Fri Feb 16, 2007 5:24 pm

Great, I gave up using refraction on the eyesurface because I had a weird effect on the eyewhite (like it's popping out it's a little noticeable on the outer part of the left eye of your render).
Do you use the settings you posted before?

cowdog
Specialist
Specialist
Posts: 225
Joined: Tue May 09, 2006 2:32 am
Location: Sitting in front of my computer, just like you.

Post by cowdog » Fri Feb 16, 2007 6:09 pm

Lakys,

That looks excellent. I think this particular texture also lends itself to good results.
Ok I think I understood a few things.
So, my question is: what have you learned? :)

User avatar
Lakys
Site Admin
Site Admin
Posts: 5189
Joined: Sun Dec 12, 2004 3:30 am
Contact:

Post by Lakys » Fri Feb 16, 2007 6:53 pm

weimart wrote:Great, I gave up using refraction on the eyesurface because I had a weird effect on the eyewhite (like it's popping out it's a little noticeable on the outer part of the left eye of your render).
Do you use the settings you posted before?
Absolutly (for the popping out thing). Refraction settings were the one I used before.

Actually it seems that even using V4 DAZ cornea transparency map that you cannot make a smooth transition between cornea/iris and scera.
I have also tried using this map as a refraction map, but it doesn't work I guess it is meant to use environmental maps, and then not intended to be used that way.

So to fix it in the render bellow, I have removed the cornea refraction. Then the trans map works and you get a smooth edge.
cowdog wrote:Lakys,

That looks excellent. I think this particular texture also lends itself to good results.
Thank you :)
So, my question is: what have you learned?
- First that I need to stop thinking just like the way I use to work with V3 eyes. (nothing really new as you know).
- Cornea trans map is required to fix things
- I can get my highlights! :)
- Highlights (specular) should be set to eyesurface (I use 40% specular strength). Reflections amplifies naturally highlights with the cornea.
- Sclera can use skin shader (but don't use any specular on it)
- True raytracing model renders almost correctly (see Weimart's comment) with V4 where the same causes dramatically a lense effect with V3.
- I need a new surface shader to handle transmission correctly.
- It will be a pain to make this thing working with AO. I need to handle transparency/transmission correctly.

Disclaimer : of course that's -a- way to approach it. None of those ideas/points are in any way absolute facts or rules. It is probably possible to get amazing results with very different or opposite settings.
Attachments
Emma-eye04.jpg
Emma-eye04.jpg (221.09 KiB) Viewed 358 times

Post Reply

Return to “DAZ Studio”

Who is online

Users browsing this forum: No registered users and 1 guest