Waiting for Anima Kernel R&D - C4D - Octane

Forums: Waiting for Anima Kernel R&D - C4D - Octane
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

Waiting for Anima Kernel R&D - C4D - Octane

Postby Rodzik » Mon Feb 27, 2023 11:32 am

Rodzik Mon Feb 27, 2023 11:32 am
Hi to all community.

I'm recently experimenting with blender technics about line rendering from Lino Grandi (https://www.youtube.com/watch?v=HUHF2KWAyQQ&t=736s)
and pattern rendering from these 2 tutorials. (https://www.youtube.com/watch?v=508pwYME-w4&t=265s https://www.youtube.com/watch?v=2ZR5XIjBmho&t=940s)

The goal is to create a shader that will react to the light direction. I run into some problems and I hope someone can help me.
First I will show you some of my early work. In the beginning, I was using a specular ramp in the toon shader but it didn't behave as I want.
The toon ramp just changes the opacity of the patterns, not their thickness.
These are examples:
https://www.dropbox.com/s/9c1iexsseu1poau/08.png?dl=0
https://www.dropbox.com/s/snjkxqp0h9yy0rz/09.png?dl=0
https://www.dropbox.com/s/ulstnpv0kmwge75/10.png?dl=0
https://www.dropbox.com/s/es8pn8n1fgs33se/11.png?dl=0
https://www.dropbox.com/s/sqpe51zm0anzmjs/12.png?dl=0

I also experiment with Dirt node as a mask for specular and roughness:
https://www.dropbox.com/s/z8uax7pmdsoalrw/16.png?dl=0
https://www.dropbox.com/s/g65wv0dutgw6m19/13.png?dl=0
https://www.dropbox.com/s/b1wy4y3g5kigezk/14.png?dl=0
https://www.dropbox.com/s/g8abnq9oe9mfguw/15.png?dl=0
https://www.dropbox.com/s/95xyi4e13cu9e1v/17.png?dl=0
https://www.dropbox.com/s/8vw8x8zf5qlzvvh/18.png?dl=0
But it still doesn't produce the expected results with line and dots behavior. But it works with complex scenes and animated characters.

Then I thought I might use a compere node with some patterns that have values from black to white and gradient based on light direction.
But in Octane, there is no node like in blender (Shader to RGB) so I found an OSL Shader MAlightvec.osl and The shader description says it doesn't work.
To overcome the problem I change the axis point of the object to the position of the light and it starts working but only with static objects and static light.
https://www.dropbox.com/s/95e3xsitjgtl7xz/01.png?dl=0
https://www.dropbox.com/s/jfkftwoet704mei/02.png?dl=0

My second thought was to get Shadow or Light illumination information to the vertex map and use it in the comper node. Like in this C4D plugin (https://cinemaplugins.com/c4d-plugins/t ... rtex-maps/) but this plugin doesn't work in C4D 2023. So with help of Dr. Sassi from cinevercity I was able to use Plight to get this illumination information.
but in one case it works with changing the position of the object but doesn't work with rotation or the opposite. But the results are the best. And it doesn't work with complex meshes and scenes, because it has to calculate the normal of a vertex.
https://www.dropbox.com/s/u798z52iw24464c/19.png?dl=0
https://www.dropbox.com/s/c6v0l4jx195f2em/20.png?dl=0
https://www.dropbox.com/s/nrrqycxd1rimvpd/21.png?dl=0
and dynamic light render
https://www.youtube.com/watch?v=-w2yPYcm8SY

Now I hit the wall because this technique can't be used in complex animated scenes.

Finally my question:
Is there a way to get this gradient ramp based on the light direction in Octan inside Cinema 4d? Maybe someone has an idea of how to fix that OSL shader?
Thank you for all your help.
All the best
Michal
Rodzik
Licensed Customer
Licensed Customer
 
Posts: 1
Joined: Sun May 17, 2015 9:38 pm

Re: Waiting for Anima Kernel R&D - C4D - Octane

Postby orionds » Thu Mar 28, 2024 7:43 pm

orionds Thu Mar 28, 2024 7:43 pm
Hey just wanted to say I really like your progress on these renders. Especially the last sequence, using PLight to pull illumination to the vertex map and use in a comp node. The gradients of dark to light with the linework and the dots look very good!

I've been trying some similar engraving or woodcut looks in C4D Octane. I really appreciate the innovations you have made here, for example, using the Comp node. It was not something I had considered at all. I'm clearly not as knowledgeable in Octane Nodes as you are, but I wanted to share what I've come up with in the hopes that we might be able to help each other out.

https://www.dropbox.com/scl/fi/dfteztlp ... 48qbr&dl=0

in the above example, I first made some JPEGs that imitate real woodcuts, then, for the statue's body texture, ran them through a DIRT node into the NORMAL channel. A FALLOFF Node goes to the diffuse. Not super fancy. The statue's clothing is even more basic - the JPEG woodcuts into the NORMAL channel with no DIRT node. I do like how the DIRT node fades the lines away under the brightest highlights, such as the top of the statue forehead. But it would great to actually be able to vary the line thickness based on the lighting. I realize it may not be possible to achieve this using JPEG textures. It might have to be more procedural such as a SINE node in your example. I do really like the variation in line width that you have achieved.

Scene folder:

https://www.dropbox.com/scl/fo/rwika7uo ... zej7c&dl=0

Thanks for reading! Hope we can discuss.

Orion
orionds
Licensed Customer
Licensed Customer
 
Posts: 10
Joined: Sat Dec 03, 2016 7:07 pm

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: No registered users and 28 guests

Sat Apr 27, 2024 11:04 pm [ UTC ]