Request: Better Flakes

Forums: Request: Better Flakes
Generic forum to discuss Octane Render, post ideas and suggest improvements.
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

Request: Better Flakes

Postby leehenshall » Thu Sep 10, 2020 11:58 am

leehenshall Thu Sep 10, 2020 11:58 am
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.
leehenshall
Licensed Customer
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Re: Request: Better Flakes

Postby bepeg4d » Fri Sep 11, 2020 6:16 am

bepeg4d Fri Sep 11, 2020 6:16 am
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 :roll:

ciao Beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 10000
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Request: Better Flakes

Postby leehenshall » Fri Sep 11, 2020 9:41 am

leehenshall Fri Sep 11, 2020 9:41 am
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:

Flake Triplanar Setup.jpg


If I render this, I get harsh fall off where there are UV seams:

UV_TAG_ON.jpg


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:

UV_TAG_OFF.jpg


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.
leehenshall
Licensed Customer
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Re: Request: Better Flakes

Postby bepeg4d » Fri Sep 11, 2020 9:55 am

bepeg4d Fri Sep 11, 2020 9:55 am
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
  • 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.

ciao Beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 10000
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Request: Better Flakes

Postby leehenshall » Fri Sep 11, 2020 10:32 am

leehenshall Fri Sep 11, 2020 10:32 am
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:

Flake_Orientation_0.5_Bad_Result.jpg


Pardon the pun but I think this is a "Flakey" :roll: 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.
leehenshall
Licensed Customer
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Re: Request: Better Flakes

Postby itsallgoode9 » Sun Sep 13, 2020 11:36 pm

itsallgoode9 Sun Sep 13, 2020 11:36 pm
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.
Intel i7-3930K, 64gb RAM, Asus X79 Deluxe mobo, 2x EVGA 780 6gb (for rendering), 1x PNY quaddro k4000 (for display)
Windows 8.1 x64, Maya 2014, Octane Render v2
itsallgoode9
Licensed Customer
Licensed Customer
 
Posts: 885
Joined: Thu Apr 03, 2014 9:04 am
Location: New York City

Re: Request: Better Flakes

Postby Goldorak » Mon Sep 14, 2020 7:00 pm

Goldorak Mon Sep 14, 2020 7:00 pm
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.


Make sure to add a vote on the feature request list, so we can prioritize this with the rest of the roadmap work. Thanks!
User avatar
Goldorak
OctaneRender Team
OctaneRender Team
 
Posts: 2321
Joined: Sun Apr 22, 2012 8:09 pm

Re: Request: Better Flakes

Postby leehenshall » Thu Sep 24, 2020 12:34 pm

leehenshall Thu Sep 24, 2020 12:34 pm
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 :)
leehenshall
Licensed Customer
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Return to General Discussion


Who is online

Users browsing this forum: No registered users and 15 guests

Sun Jun 16, 2024 9:47 pm [ UTC ]