Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Apply tracesets to lights and secondary rays in c++ shader

0 REPLIES 0
Reply
Message 1 of 1
Fred_Blueroom
163 Views, 0 Replies

Apply tracesets to lights and secondary rays in c++ shader

Hi,

I'm trying to achieve an effect to make a 'trace set filter' and am currently using a surface shader on a plane in front of my camera and triggering rays that I attach trace sets to, when I hit that plane.


This is part of my surface shader for that plane,


AtRay wi_ray = AiMakeRay(AI_RAY_CAMERA, sg->P, &sg->Rd, AI_BIG, sg);
wi_ray.traceset = trace_set;
wi_ray.inclusive_traceset = true;

 if( !AiTrace(wi_ray, AI_RGB_WHITE, scrs))
        AiTraceBackground(wi_ray, scrs);
 }


It works as I was hoping in that it removes non trace set tagged objects from being primary visible.

But the problem is the objects are still visible to shadow rays and also visible in reflections.


How could I make it so that the object also doesn't show up in reflections or casts shadows?


Cheers

Tags (1)
Labels (1)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report