eyes!

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

eyes!

Postby dark poulpo » Mon Mar 04, 2013 7:12 pm

hi,
i modify a shader to make any eyes

do u want add this shader to manage the eyes ?
Attachments
Capture.PNG
Capture.PNG (143.76 KiB) Viewed 6909 times
540.jpg
dark poulpo
 
Posts: 37
Joined: Tue Oct 09, 2012 11:02 am

Re: eyes!

Postby dark poulpo » Tue Mar 05, 2013 11:14 am

dark poulpo
 
Posts: 37
Joined: Tue Oct 09, 2012 11:02 am

Re: eyes!

Postby Nadow » Tue Mar 05, 2013 9:13 pm

Wow! Pretty impressive! :shock:
Desaster Games
// Lead artist
Nadow
 
Posts: 61
Joined: Fri Mar 28, 2008 3:11 pm

Re: eyes!

Postby rfairhurst » Sat Apr 13, 2013 6:23 pm



I used the png of the blue eye iris to create a standard eye png in the library. It is static like the other mh eyes, but at least it gives me a nice blue eye (See screen shot) It was not difficult to set up in gimp.

grab.png


Are you able to produce other color eyes with this shader? Grey, hazel, Amber, etc? http://en.wikipedia.org/wiki/Eye_color Where in the code is color controlled?
rfairhurst
 
Posts: 101
Joined: Sun Feb 10, 2013 7:29 am

Re: eyes!

Postby rfairhurst » Sat Apr 13, 2013 7:50 pm

Using gimp I have been able to do variants of blue and green from the original iris png above. I am not very happy with the light-brown eyes, but it has some use still. The first is the original (which I am calling light-blue) and the rest are the variants I made with Gimp.

light-blue.png

dark-blue.png

light-green.png

dark-green.png

light-brown.png
rfairhurst
 
Posts: 101
Joined: Sun Feb 10, 2013 7:29 am

Re: eyes!

Postby rfairhurst » Sat Apr 13, 2013 8:17 pm

Here is a dark brown with slightly larger pupils as compared to the original brown. I have made them more doe eyed, but that can be lessened without a lot of trouble.

dark-brown.png

brown.png
rfairhurst
 
Posts: 101
Joined: Sun Feb 10, 2013 7:29 am

Re: eyes!

Postby rfairhurst » Sat Apr 13, 2013 10:04 pm

After going to Costco and looking at Black, Asian and Mexican people, their eyes are almost uniformly darkest brown to nearly black eye coloring. This is more true to those races:

darkest-brown.png
rfairhurst
 
Posts: 101
Joined: Sun Feb 10, 2013 7:29 am

Re: eyes!

Postby dark poulpo » Sat Apr 20, 2013 2:04 pm

rfairhurst wrote:After going to Costco and looking at Black, Asian and Mexican people, their eyes are almost uniformly darkest brown to nearly black eye coloring. This is more true to those races:

The attachment darkest-brown.png is no longer available


use the shader in the shadertoy https://www.shadertoy.com/view/XslGR8 and uncomment the //p *= 1.5; // coeff to scale
and change this value to have a good size.

you can change the colors too, to obtain a more realistic effect than "the gimp".

all lines of colors are comment by "// you can invert the color rgb to obtain any colors" in the main()

you must add this pictures to add more effects.
Attachments
eye-right256.png
eye-right256.png (99.18 KiB) Viewed 6641 times
eye-left256.png
eye-left256.png (98.7 KiB) Viewed 6641 times
eye-right.png
eye-right.png (54.43 KiB) Viewed 6641 times
eye-left.png
eye-left.png (54.92 KiB) Viewed 6641 times
dark poulpo
 
Posts: 37
Joined: Tue Oct 09, 2012 11:02 am

Re: eyes!

Postby maksimyang » Mon Sep 30, 2013 3:37 am

where is the .mhstx file?
maksimyang
 
Posts: 1
Joined: Mon Sep 30, 2013 3:06 am

Re: eyes!

Postby duststorm » Mon Sep 30, 2013 3:52 pm

I experimented with this shader today and managed to get it into MH without too much effort.
Behold:
mh_eye_shader.png
Iris shader at work in MH


I extracted some of the color values that you proposed to be editable and made them uniforms so they can be configured.
As you can see on the screenshot the material editor (Utilities > Material Editor tab) allows you to tweak the values and preview them in MH.
mh_eye_shader2.png
Eye shader closeup -- without texture backdrop


I also added the option of using a texture for the white area of the eye, activated by clicking the Diffuse checkbox (which enables diffuse in the shadingConfig, and defines the DIFFUSE preprocessor directive in the shader code).
mh_eye_shader3.png
Eye shader closeup -- with texture backdrop added (check the Diffuse shader config checkbox)

I am just using the default 'brown' eye texture for it, with the iris shader simply replacing the pupil.

You can get the material package here to try it out yourself:
mh_iris_shader.zip
MakeHuman material package for the iris shader. Place this eye material in data/eyes and select it using the material chooser (with eyes seleted).
(4.07 KiB) Downloaded 384 times

You can install it by unpacking the zip file in the makehuman/data/eyes folder in your My Documents or home folder.
Note that this is for the A8 version of makehuman! Get the latest version from svn to try it out.


Dark Poulpo, maybe you're interested in experimenting some more with this?
I have some remarks on improvements. First of all, the number of color parameters is a little much and it's unclear what each does. Maybe you could reduce the number of variables to 1, 2 or 3 at max. I had some succes experimenting with having only one color value. It would be nice if we can change the eye color into green or brown by just setting one or two color values.
Also, there is a visible discontinuity at the center of the eye, where you can clearly see a circle. It's visible when the pupil is not at its largest value. Can you get rid of that? I realize that it is because you want to have a different pattern around the pupil, but maybe it can be blended more gradually with the other pattern.
The pupil itself should probably not be controlled by a time value (MH does not support the concept of time so it is just set to a static value that you can change), but just have a pupilDilation uniform variable that you can set (for example a float between 0 and 1).
It might need a brightness/contrast control. The eye looks a bit bright with the default settings.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Next

Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest

cron