• How do you implement Eyeposing
    13 replies, posted
I've been trying to figure out how to get it to work correctly for ages and have found little to nothing that says how you actually set it up and the only documentation I can find for it is on the ValveWiki, which is increadibly vague on the subject of how you actually set it up (and only talks about 3dsmax which is confusing as i'm not using it). Can anyone explain how to propperly do it as I can't think of what else I can do but ask :) Documentation i've found: [url]http://developer.valvesoftware.com/wiki/Creating_Flex_VTA_files_with_3D_Studio_Max[/url] [url]http://developer.valvesoftware.com/wiki/Eye_Position_Setup[/url] [url]http://developer.valvesoftware.com/wiki/.QC_Commands[/url]
I'd love to know this too if someone would help silver.
Well you need the eyes attachment as well as the forward attachment. (they don't seem to work without it. Essentially when making eyes, the first step is to create a textured patch with your eyeball textures where your eye, eyes will be. (keep in mind you're not limited by an amount of eyes, I have one model with four) Your qc entry will be something like for a right eye [code] eyeball righteye ValveBiped.Bip01_Head1 -1.288 -1.894 65.127 eyeball_r 1.300 4.000 pupil_r 1.400 [/code] eyeball = the state that it's an eye righteye = eyeball name valvebip.... = the bone to which the eyeball is attached to numbers = explained lower eyeball_r = your base eyeball texture - if using hl2 shaders this will be your sclera texture. If using EP2 shaders, this will call the whole eye shader pupil_r = under hl2 shaders - the pupil texture. unimportant under ep2 shaders, as both the pupil and sclera are called up in one texture 4.000 the angle of the eye in degrees away from the center 0.63 - the size of the pupil (.6-0.7 is usually best) Now as those 3 values I mentioned previously. Those are the position and size of the eye. The best way to set them, is to create a sphere in the position of your eye, fire up QCeyes.exe (sourcesdk bin) and enter the right position values for the various vertices it asks you to select. Remember to switch to the correct up value (there's a slider for Maya and max). Another thing to keep watch for - the QC generated by QC_eyes is bad, but gives you the eyes attachment as well as right eye positions. Last though - if you have no facial animation in your model at least create a blank flex, source doesn't seem to like moving the eyes otherwise. edit forward attachment for convenience [code] $attachment "forward" "ValveBiped.forward" 0.00 0.00 -0.00 rotate 0.00 0.00 -0.00[/code] So thinks you have to know for your prefered program of choice a) what axis is up (x in the case of max) b) how to find the exact coordinates of a selected vertex
Thanks ^^ This will be very useful :) So do you not actually have to have a sphere for the eyes, you just need one to work out where to put them? and you don't need a flex to move them it just needs a VTA file for no apparent reason?
Yeah, the spheres are put in just to help you get right positions, they're deleted afterwards. And the flexfile can be empty with, I'm not sure, but it just didn't work without it on my end. Also keep in mind that pupil VTF's are horribly weird. They sometimes work fine, sometimes end up superbright. The only safe way I found was to use an existing working one as a base and just squidly over it my own chosen pupil with no resizing done to the texture.
What do I need in the VMT for the eye texture as I tried "Eye" as the shader and it's just showing up as a wireframe in HLMV. Edit: Also do eyes show up propperly in modelviewer? Edit2: and if I use a normal (VertexLitGeneric) shader the eye doesn't display the pupil but does display the white.
Yeah eyes work fine in the HLMV (sometimes better than in gmod actually) moment, let me grab an EP2 eye sample pupil VTF [url]http://dl.dropbox.com/u/6252145/misc%20ports/eye_iris_bot.vtf[/url] vmt [code] "EyeRefract" { "$Iris" "models/props_tech/eye_iris_bot" //actual pupil texture - also has the actual sclera "$AmbientOcclTexture" "models/props_tech/eyeball_l_ambient" // Ambient occlusion in RGB, A unused "$Envmap" "Engine/eye-reflection-cubemap-" // Reflection environment map "$CorneaTexture" "Engine/eye-cornea" // Special texture that has 2D cornea normal in RG and other data in BA "$EyeballRadius" "0.5" // Default 0.5 "$AmbientOcclColor" "[0.1 0.1 0.1]" // Default 0.33, 0.33, 0.33 "$Dilation" "0.01" // Default 0.5 "$ParallaxStrength" "0.01" // Default 0.25 "$CorneaBumpStrength" "1.25" // Default 1.0 "$halflambert" "1" "$nodecal" "1" // These effects are only available in ps.2.0b and later "$RaytraceSphere" "1" // Default 1 - Enables raytracing in the pixel shader to make the eyeball look round "$SphereTexkillCombo" "0" // Default 1 - Enables killing pixels that don't ray-intersect the sphere } [/code] try to play with the values. They're a bit inhuman since i used the eye for a robot
Are you sure its the same for eye refract as for normal eyes as that is terribly confusing @.@
Was a pain in the ass to figure this out in 3ds max, took me a lot of research, i litterally had to figure out how to create eyes from scratch. i know how you feel.
Just use EP1 eyes. They're much much more simpler. pupil_r.vmt [code] "Eyeball" { "$basetexture" "models/Humans/Male/pupil_r" } [/code] eyeball_r.vmt [code]"eyes" { "$basetexture" "models/Humans/Male/eyeball_r" "$iris" "models/Humans/Male/pupil_r" "$halflambert" 1 } [/code] Make sure you're careful when making the pupil VTF. There's some special options that need to be ticked in VTFEdit, like Clamp S and T and no level of detail. Your model needs both an eyeball_r and eyeball_l material applied to it. You can use one pupil texture if you want to.
That seems to work better thanks Henry :) Problem is now the Pupil still isn't showing, is it that i've got the eyes attachment wrong? and where exactly does the forward attachment have to be and does it have do be on a diffeent bone to the eyes?
The forward attachment isn't important for them to show up, just for them to move. You probably don't have the right vertex positions for the eyes themselves. Alternatively the eyes attachment is wrongly positioned (should be right in between the two eyes)
[QUOTE=wraithcat;24073651]The forward attachment isn't important for them to show up, just for them to move. You probably don't have the right vertex positions for the eyes themselves. Alternatively the eyes attachment is wrongly positioned (should be right in between the two eyes)[/QUOTE] What if you only have 1 eye?
try to take a look at the vortigaunt eye set-up. But I thin the eyes attachment should ideally be in the same place as the eye itself.
Sorry, you need to Log In to post a reply to this thread.