I may have made this request a few years ago, but I can't find it here as a thread so here it is! texCube support please
Announcement
Collapse
No announcement yet.
VRayGLSL - Support for textureCube
Collapse
X
-
You've got everything right so far.
Yes it accepts a single image file in a horizontal cross configuration, more specifically:
....+Y.........
-X +Z +X -Z
....-Y.........
The image you attached is in the correct format.
Now the only thing left we need to make sure is OK is the fragment shader itself.
I've attached an example that uses a cubemap texture as a reflection environment.
Rename the extension to frag and load it in a VRayGLSLTex or a VRayGLSLMtl plugin.
Just attach a standard Max Bitmap texture to the GLSL plugin and load the cubemap image.
To get rid of the edge seams turn off texture filtering.
If this is not an option try and create a cubemap on your own but make sure to extend the image tiles (the cube sides) in any way you find appropriate into the the black areas.
That way the filter will not reach them and will not create artifacts. The easiest way I can think of is painting the black spaces adequately.
We had a thread discussing this next problem but I want to mention it just in case.
You see, to sample the texture we use a direction (a vector) that is not necessarily related to the texture coordinates of the object.
This may lead to very bad filtering artifacts if "Real-World Map Size" option is activated.
Please try and keep it off or just mind the size of the object (it must be really, really small).Attached Files
Comment
-
Interior mapping could get a bit tricky.
Luckily there is a pretty decent example here with all the materials you need:
http://www.humus.name/index.php?page=3D&ID=80
If you don't mind I could offer an example vrayGLSL translation of the above method attached to this post.
Note that for the cube map texture you should not use an environment one as it holds projection distortion.
I stitched the room textures provided by the web site into a single cube map using the template from my previous post.
Here it is, hope you find it useful.
P.S. For the exterior texture use the <download_folder>\InteriorMapping\Textures\Window. dds and set the Bitmap texture's alpha source to "Image Alpha".Attached Files
Comment
Comment