We currently have OSL Flakes via the script created by Chaos Group:
https://docs.chaosgroup.com/display/OSL ... normal+map
This works well for most cases and achieves a good result if used correctly. I am finding it has a big limitation though. It does require perfect or near perfect UVs to work properly.
In the early days of OSL for Octane a user added the ability to use triplanar projections so it wouldn't rely on UVS but instead added a projection pin to the OSL node allowing for Octane Triplanar/box etc.
For some reason though even though the triplanar projection works just fine, it is still possible to get seams that are caused by the UVS. Maybe it has something to do with how normal maps work or something along those lines. The only work around I have is to take all my car body panels into Rizom UV and create clean seamless UVs. Then the OSL flakes look great.
Maybe someone at Otoy could take a look at the OSL script help find a more fool proof way of procedurally applying the texture. I think though in the long term Octane should have have an advanced procedural flake shader built into the core that does not require any UVs to work properly. This combined with the new layered materials would be perfect.
Request: Better Flakes
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
- leehenshall
- Posts: 184
- Joined: Sun Oct 25, 2015 5:44 pm
- Location: England
- Contact:
Hi,
do you mind to share a a example scene that shows the issue?
Which SDK version are you using exactly?
I have checked OSL Flakes with Triplanar projection few weeks ago for an user, and everything seemed to work as expected
ciao Beppe
do you mind to share a a example scene that shows the issue?
Which SDK version are you using exactly?
I have checked OSL Flakes with Triplanar projection few weeks ago for an user, and everything seemed to work as expected

ciao Beppe
- leehenshall
- Posts: 184
- Joined: Sun Oct 25, 2015 5:44 pm
- Location: England
- Contact:
Thanks for the response.
While trying to create a test setup to show you the issue. I think I may have figured out what is happening.
Here is the triplanar setup in the node editor:
If I render this, I get harsh fall off where there are UV seams:
This only really becomes obvious when the "Flake Normal Orientation" is dialled to higher values. I do find it necessary to dial this value to around 0.7 - 0.95 to get the look I need.
By accident though I think I fixed it by deleting my UV tag from the polygon object.
See the results below:
For some reason the object needs to have no UVs for the triplanar to work properly. I'll do some more tests on my actually production car and see if the fix is really this simple.
While trying to create a test setup to show you the issue. I think I may have figured out what is happening.
Here is the triplanar setup in the node editor:
If I render this, I get harsh fall off where there are UV seams:
This only really becomes obvious when the "Flake Normal Orientation" is dialled to higher values. I do find it necessary to dial this value to around 0.7 - 0.95 to get the look I need.
By accident though I think I fixed it by deleting my UV tag from the polygon object.
See the results below:
For some reason the object needs to have no UVs for the triplanar to work properly. I'll do some more tests on my actually production car and see if the fix is really this simple.
Hi,
thanks for sharing some screenshots.
Please, have a look at C4D Vray manual about Flakes node, and in particular about Flakes Orientation
Flakes Orientation
thanks for sharing some screenshots.
Please, have a look at C4D Vray manual about Flakes node, and in particular about Flakes Orientation
Flakes Orientation
- controls the orientation of the flakes relative to the surface normal. When this is 0.0, all flakes are perfectly aligned with the surface. When it is 1.0, the flakes are rotated completely randomly with respect to the normal. Values above 0.5 are not recommended as they can produce artifacts.
- leehenshall
- Posts: 184
- Joined: Sun Oct 25, 2015 5:44 pm
- Location: England
- Contact:
When the triplanar is working by deleting the UV tag or the UVs are perfect values above 0.9 work fine.
Any values below 0.5 do not look particularly good. Values above this are essential:
Pardon the pun but I think this is a "Flakey"
workflow if the values I need to get the look I want could cause artefacts.
I think the OSL flakes script is good but I think there is a reason Chaos Group never really used it as a workflow. I remember using this osl script back in the day when it appeared in the V-Ray manual, Vlado said it was difficult to anti-alias at the time which is why the Stochastic Flakes white paper technology was integrated into V-Ray 3. Octane seems to handle it like a champ though. V-Ray 5 now also has a fully re-written carpaint shader similar to the one in Arnold.
I think I can work around my issue by deleting the UV tags which looks like it is fixing the bug with the seams. However I think my point still stands - Octane would benefit from having dedicated core level shaders for this kind of thing rather than relying on old OSL code by Chaos Group.
Any values below 0.5 do not look particularly good. Values above this are essential:
Pardon the pun but I think this is a "Flakey"

I think the OSL flakes script is good but I think there is a reason Chaos Group never really used it as a workflow. I remember using this osl script back in the day when it appeared in the V-Ray manual, Vlado said it was difficult to anti-alias at the time which is why the Stochastic Flakes white paper technology was integrated into V-Ray 3. Octane seems to handle it like a champ though. V-Ray 5 now also has a fully re-written carpaint shader similar to the one in Arnold.
I think I can work around my issue by deleting the UV tags which looks like it is fixing the bug with the seams. However I think my point still stands - Octane would benefit from having dedicated core level shaders for this kind of thing rather than relying on old OSL code by Chaos Group.
- itsallgoode9
- Posts: 895
- Joined: Thu Apr 03, 2014 9:04 am
- Location: New York City
- Contact:
on the topic of improving flakes, I've always found this extremely odd to have the flakes be circles. If you're doing extreme closeup the circle shapes can clearly be seen, which looks very odd. Maybe my assumption is wrong but I imagine in real car paint, flakes are much more geometric/organic in shape? Unfortunately I have very limited knowledge of coding, and I have no clue how i'd go about adjusting the OSL to create something like this. I think even having squares instead of circles would look better (and I imagine easier to code than completely random geometric shapes), even if it's not the technically correct shape of real world flakes.
Indeed I agree with eh OP that it would be very helpful if OTOY coded their proprietary flake texture rather than relying on this very old (and IMO incorrect) ChaosGroup shader.
Indeed I agree with eh OP that it would be very helpful if OTOY coded their proprietary flake texture rather than relying on this very old (and IMO incorrect) ChaosGroup shader.
Make sure to add a vote on the feature request list, so we can prioritize this with the rest of the roadmap work. Thanks!itsallgoode9 wrote:on the topic of improving flakes, I've always found this extremely odd to have the flakes be circles. If you're doing extreme closeup the circle shapes can clearly be seen, which looks very odd. Maybe my assumption is wrong but I imagine in real car paint, flakes are much more geometric/organic in shape? Unfortunately I have very limited knowledge of coding, and I have no clue how i'd go about adjusting the OSL to create something like this. I think even having squares instead of circles would look better (and I imagine easier to code than completely random geometric shapes), even if it's not the technically correct shape of real world flakes.
Indeed I agree with eh OP that it would be very helpful if OTOY coded their proprietary flake texture rather than relying on this very old (and IMO incorrect) ChaosGroup shader.
- leehenshall
- Posts: 184
- Joined: Sun Oct 25, 2015 5:44 pm
- Location: England
- Contact:
I have created a feature request for Car Paint specific shaders here:
https://render.otoy.com/requests/
If anyone thinks this would be useful please vote it up
https://render.otoy.com/requests/
If anyone thinks this would be useful please vote it up
