Hello everyone
I want to create a tile material as in the attached file (Reference material). I have 4 sets of maps (diffuse, roughness, normal, displacement) for 1 element of the pattern and I want to place them randomly inside the pattern. I tried using some OSL textures from Octane OSL utilities and SimpleTile.OSL https://github.com/ADN-DevTech/3dsMax-O ... eTiles.osl, but unfortunately I could not achieve the desired result. If someone has experience in creating such materials, I would be very grateful for help. For convenience, I created a simple test scene, it can be found in the attachment.
OSL Random Tile Texture
Moderators: ChrisHekman, aoktar
- Attachments
-
- OSL_Tile.zip
- Test scene
- (182.1 KiB) Downloaded 74 times
Hi, as I know there is no working OSL script for that in Octane but you can use three methods :
1. Using Octane Instance ID for different objects :
It needs some preparation. Individual polygons should be extracted to objects using C4D Polygon Islands to Objects. After that Octane Object tag is needed for all of them, select them all and in Instance ID put "num+1" to make every object individual Instane ID number.
2. Using random Vertex Map :
Select polygons and use random_vertex_color.py script to create Vertex Map with random colors. 3. Using Fracture but this is buggy at the moment ( reported it ) but there is limited workaround.
For this method you can use build-in nodes or using OSL : All examples with materials using three methods:
Just replace RGB Spectrum nodes with your Texture Images
I see that this code from your link works fine. Also we have built-in nodes like Tile patterns, OSL c4d-tiles.osl.
Some threads :
viewtopic.php?f=9&t=79536
viewtopic.php?f=30&t=74396
viewtopic.php?f=30&t=78482
but the best is Q-Tile Pro : https://3dtools.info/tilepro
1. Using Octane Instance ID for different objects :
It needs some preparation. Individual polygons should be extracted to objects using C4D Polygon Islands to Objects. After that Octane Object tag is needed for all of them, select them all and in Instance ID put "num+1" to make every object individual Instane ID number.
2. Using random Vertex Map :
Select polygons and use random_vertex_color.py script to create Vertex Map with random colors. 3. Using Fracture but this is buggy at the moment ( reported it ) but there is limited workaround.
For this method you can use build-in nodes or using OSL : All examples with materials using three methods:
Just replace RGB Spectrum nodes with your Texture Images
I see that this code from your link works fine. Also we have built-in nodes like Tile patterns, OSL c4d-tiles.osl.
Some threads :
viewtopic.php?f=9&t=79536
viewtopic.php?f=30&t=74396
viewtopic.php?f=30&t=78482
but the best is Q-Tile Pro : https://3dtools.info/tilepro
Architectural Visualizations http://www.archviz-4d.studio
Yeah this comes up sometimes, there are a few ways to achieve this. It depends on whether you have the tiles as separate images or as one texture atlas, and whether the tiles are separate objects or one mesh.
For the one mesh / separate image tiles case, one way is to load the sets of images into an image tiles node, and use a to use an OSL shader as UV input. This image tiles node is similar in concept as UDIM, although the OSL shader I attached assumes the images are arranged in one vertical row.
The custom OSL shader by itself has a projection and transform input similar to any built-in texture, so you can put it on a wall with box mapping.
For the one mesh / separate image tiles case, one way is to load the sets of images into an image tiles node, and use a to use an OSL shader as UV input. This image tiles node is similar in concept as UDIM, although the OSL shader I attached assumes the images are arranged in one vertical row.
The custom OSL shader by itself has a projection and transform input similar to any built-in texture, so you can put it on a wall with box mapping.
Thank you it looks that great script you presented here but why it looks different in Cinema 4D, without plank size ?roeland wrote:
The custom OSL shader by itself has a projection and transform input similar to any built-in texture, so you can put it on a wall with box mapping.
Architectural Visualizations http://www.archviz-4d.studio
It is possible that the Cinema4D plug-in is not able to map the type of that input to a UI widget. This is a version with 2 float inputs for the tile size:SSmolak wrote:Thank you it looks that great script you presented here but why it looks different in Cinema 4D, without plank size ?
- Attachments
-
- laminate tiles example.orbx
- (33.61 KiB) Downloaded 66 times
It looks good now except text strings :roeland wrote: It is possible that the Cinema4D plug-in is not able to map the type of that input to a UI widget. This is a version with 2 float inputs for the tile size:
Thank you for creating this. I will test it soon

Architectural Visualizations http://www.archviz-4d.studio
If someone interested I added option to offset tiles between rows and moving whole pattern by X and Y.
- Attachments
-
- Tiles Projection.zip
- (863 Bytes) Downloaded 62 times
Architectural Visualizations http://www.archviz-4d.studio