David Grzesik

FortifiedOatMilk

About Me

EXPERTISE
VFX Artist
INDUSTRY
Advertising / Motion Graphics

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Karma Toon Shader May 15, 2024, 9:58 p.m.

Just bumping this, I absolutely want to use Karma and LOPs for rendering some projects but unable to work out just how to get karma to do what I want. Was thinking of baking a simple diffuse shader into a texture and sample that in the shader. It's effectively what I would do for a toon shader in say Blender to then use to create banding, but its not exactly realistic as a scene gets anything other than small. Im going to keep looking, but wish I knew more about shading :S

Rendering Overlapping Visibility Jan. 15, 2024, 7:09 p.m.


I came across an interesting problem when I was doing some RnD for some toon shaders and effects. I want to render effectively only the geometry that is overlapping from 2 different sources. It's sort of a visual boolean, but I don't want the costly geometry operations from calculating that every frame.
I can understand a way of compositing this effect, it would be simply multiplying the alpha of the two objects together, but that takes extra time to render/comp, would have to be done individually for each set of objects, and does not work with reflections. I'd love to get this effect working purely in render.


This is my general idea, for the blue object to be rendered at all, a ray has to pass through both the pink and blue objects. The pink object does not contribute to any shading color, that is all contributed by the blue object. In the case of this diagram, rays A, B, and C would render the blue object and rays D and E would simply pass right through as they hit only the pink or only the blue object.

Unfortunately my knowledge of Houdini is more in geometry manipulation/simulation and not materials and rendering so this task is a bit difficult for me and I'm having trouble finding out where to start. If anyone has any ideas on where to start for this, I would love to hear them!

PDG doesn't cook full network after a Server Block Nov. 28, 2022, 11:09 a.m.

So I managed to find a work around for this behavior. Referencing this [www.sidefx.com] page on TOPs event handling, I put an event handler for when the "commandserverend" TOP completed cooking. This way immediately as that server block finishes, it will call to cook the output node at the bottom.
Here's the example snippet I placed in the OnCreated script on the HDA so the event is registered each time when the node is loaded in:
import pdg
top_node = kwargs['node'].node("./query_SG/commandserverend2")

top_node.cookWorkItems(tops_only=True)

pdg_context = top_node.getPDGGraphContext()

# Define our event handler
def cookRestOfNetwork(event):
    kwargs['node'].node("./query_SG/output0").cookWorkItems()
    
pdg_context.addEventHandler(cookRestOfNetwork, pdg.EventType.CookComplete)

This had a strange behavior in an earlier test where I was using the ui display message example from the TOPs Events page where everything would work as expected, but if I had it also cook that output node it would endlessly pop up the display message....So I just took that ui stuff out because of course its not needed and it didn't endlessly loop.

I don't know exactly what is up with this, but this seems to be working for the time being.

Would love to not have to do this though and just be able to cook the full graph as usual lol