View Full Version : surface and reference object problem

01-26-2011, 04:13 AM
Here is my current problem :
I try to have some dots on a complex surface (not a plane like in the following illustration), controlled by Null objects.
The problem is, as you can see on the attached illustration, in my node setup, the dot size is related to the distance from the spot and the reference Null. But, what I want is a constant size for the dot, wherever the Null is located. This problem also applies to Rman 'Marker Pen'.
I am quite sure it is possible to get the intersection point between the surface and the vector from the reference Null to the surface and define this evaluated position as the reference for the gradient (used to define the spot).
If I am not mistaken, 'Ray Intersect' from DPKit might be helpful, but so far I haven't found how.
'Sticky Surface' or any other way to constraint the reference Null to the surface object of is not an option in my case.
Any help would be appreciated. Thanks.

01-26-2011, 06:49 PM
I could not get the result I think you want with your setup olivier but managed to hack something together with Ray Intersect so maybe this setup can help you out.

The only issue with that approach is that if you want dots on the underlying surface you will need dots as the mesh for your object(s) - hidden if need be.

Hopefully it works for what you need :thumbsup:

PS: Love your work ! Stunning !

01-27-2011, 02:25 AM
Thanks for your help, adk !
The odd thing is I don't get the green dots here, on LW 9.6 :(
Unfortunately, I think this trick will not work in my current situation.
My fault, I probably made a too simple description of the problem.
The surface I need to 'paint' on is a 3D object, not just a displaced 2D plane, and I need to find a solution that works for any kind of shader (Marker Pen, Particle Paint, gradient,...) that could be driven by a reference object, but just like the reference itself was more a 'target' item, meaning the distance between the surface and the reference would not influence the 'paint effect' radius.
I am pretty sure it could be done with nodes. I am still trying, anyway.
Please, let me know if you have any other idea after reading this more accurate description of the problem.
Thanks also for your nice comment about my work :)

01-27-2011, 01:38 PM
Finally, I am not sure it could be possible with Marker Pen and Particle Paint nodes since the reference has to be selected from the node itself.

01-27-2011, 07:23 PM
From your further description yeah it's trickier than I imagined at first. It's the distance thing that has me beat at this stage & I can't figure out (the math is beyond me) how to get that to work. You could also muck about with DP_Kit Nearest point node ... which works well across any mesh and not just a simple plane.

I'll keep on trying but I'm afraid you'll need the help of someone that's way more node savvy than me :D

01-28-2011, 03:14 AM
No problem, adk. I'll try to investigate more on the Nearest point node.
If my math teacher had told me I would need those vector things one day I would have been more attentive ;)