I'm trying to make a lens texture but i'm kinda stumped and google really isnt helping me one bit >.<.... I understand the basics for reflections and cubemapping showing on the lens but thats almost as far as I go....so my question I guess is how do you texture a lens material for a diffuse which gives the lens a thick glass look while reflecting the environment like most scopes in video games (forgive meh if I sound like a horrid amateur)
lens i'm trying to make...its a spyglass
PS: ignore the atrocious textures...
what I desire to achieve lens-wise (model by
Fewes)http://fewes.se/images/temp/aimpoint_01.jpg
Replies
In the first case you don't to that much on the diffuse. make it bit darker so you get a nice contrast to the cubemap
if you paint it in you can start with a blured and distorted photo of the scene the spyglass is most likely looking at.
@rollin I'm using xoliushader 2 so yea i have a cubemap and imah try ur tips and see how it goes >.<
thx for tips btw
btw...does anyone know how to actually save the alpha channel in a diffuse folder in psd with Vtools...it doesnt really seem to work for me (using cs4 btw) (vtools is supposingly able to only support cs3)
It depends on your setup, but I use "associate with marked sets" and what you have to do is name a certain alpha channel the name of the set you want it save out with. IE: if you had a "diffuse" layer set, you would name the correspondiong alpha channel "diffuse".
and you need to use the object spacenfor the refraction
@arrangemonk....I know this is gonna sound bad but...do you mind telling me how i could create refractions using object space >.<.... would you use the diffuse with a gradient? I only recently learned about environment reflections and its basic (forgive meh if i sound like a spoon feeder btw)
if i was to implement such a shader, i would somehow find the right way (after alot of thinking), but i cant tell without trying
but refraction n 3dgraphics is basically the same as reflection(cubemaps), but using a refraction vector instead of a reflection vector
i talked to some codeguru,
there are several possibilities, but thats some work.
1. half cubemap for inside, which has to use the objectspace of the spyglass
assuming that the 0 point of the spyglass is the cenmter of the lense
+ 1 cubemap for environment
+ calculations for reflection and refraction(or you use normalmap for reflection and make a refraction map)
an then you just blend them together (dotproduct of lens and normal vector is your blendvalue)
2nd is almost the same but you use a spheremap for the spyglass interiour
would be about the same result but with better performence)
3rd you render without lens then draw the lens over it with specific calculations (code)
I have one more question tho.....from what ur saying in your last paragraph...would it be possible to do the scope-styled reflection w/o using Vray and mentalray (this is what i think ur describing by rendering the lens then drawing the lens over it)
thx for all the help you've been providing tho and for ur patience with meh
half life water is done somewhat like that
i'm still a FAR way from doing reflections and refractions properly...but i'll get there someday!