would be nice to be able to access the bitmap options for the shadermap, so to be able to rotate an image or use colorcorrections
Announcement
Collapse
No announcement yet.
mr mip_grayball for vray?
Collapse
X
-
here are my two test scenes.
lit material is created the same way, but one time it renders blurry (new scene), the other time sharp (old used scene where i created the same objects).
what is even more strange is, that when i import the teapot from the blury scene, it stays blury in the "sharp" scene
if you have any idea...
and would be great it we could access to some more image control from the map file that is used
thanks anyway for checking
https://dl.dropbox.com/u/14772771/scene.zip
edit: what's even more strange, when i have imported the 2 blury objects in the sharp scene, they remain blury even if i apply the "sharp" looking material (which are anyway 100% identical) Maybe it's object related?Last edited by muoto; 16-06-2012, 04:42 AM.
Comment
-
aha! It can use also as Texture!
Thanks good tip.
Is there any solution which is composite of self shadowing and shadow with one path to a litsphere material? (not AO)
It may be useful if there is matte shadow "texture".
OakCorp Japan - Yuji Yamauchi
oakcorp.net
v-ray.jp
Comment
-
Originally posted by muoto View Posthere are my two test scenes.
lit material is created the same way, but one time it renders blurry (new scene), the other time sharp (old used scene where i created the same objects).
what is even more strange is, that when i import the teapot from the blury scene, it stays blury in the "sharp" scene
if you have any idea...
and would be great it we could access to some more image control from the map file that is used
thanks anyway for checking
https://dl.dropbox.com/u/14772771/scene.zip
edit: what's even more strange, when i have imported the 2 blury objects in the sharp scene, they remain blury even if i apply the "sharp" looking material (which are anyway 100% identical) Maybe it's object related?
The solution, which I hope you find suitable, is to disable the "Real-World Map Size" option of each object, or just have in mind the sizes of the objects.
Please note that in general texture filtering would work just fine if we use the actual texture coordinates themselves.
In this particular fragment shader, we must use the shading normal to calculate the texture sampling (uv) coordinates.
Unfortunately the shading normal is not related to the uvw coordinates of the object, which in this case causes bad filtering problems.
Comment
-
Vlado, I tried taking your GLSL code
Code:uniform sampler2D litspheremap; void main() { vec3 normal = (gl_FrontFacing) ? vr_Normal : -vr_Normal; float u=clamp(normal.x*0.5+0.5, 0.0, 1.0); float v=clamp(normal.y*0.5+0.5, 0.0, 1.0); gl_FragColor=texture2D( litspheremap, vec2(u, v)); gl_FragColor.w=1.0; }
Code:shader MatcapTex ( string LitSphereMap_texture = "color.png", output color result = 1 ) { float U = clamp (N[0] * 0.5 + 0.5, 0.0, 1.0); float V = clamp (N[1] * 0.5 + 0.5, 0.0, 1.0); color Color = texture (LitSphereMap_texture, U, V); result = Color; }
Code:color Color = texture (LitSphereMap_texture, U, V);
Comment
-
Hi,
You need to convert from common space to camera space:
Code:shader MatcapTex ( string LitSphereMap_texture = "color.png", output color result = color(0) ) { normal n_camspace = transform ("common", "camera", N); float f_u = clamp (n_camspace[0] * 0.5 + 0.5, 0.0, 1.0); float f_v = clamp (n_camspace[1] * 0.5 + 0.5, 0.0, 1.0); color c_out = texture (LitSphereMap_texture, f_u, f_v); result = c_out; }
)
Last edited by Rens; 18-12-2015, 12:07 AM.
Comment
Comment