reproduce Vray "invert normal" option for occlusion
#1
Posted 07 August 2011 - 05:32 AM
like in this example :
http://www.spot3d.co...raydirt.htm#ex6
the only thing I could think of trying for now is invert N begore pluging it in occlusion vop, but it has no effect on my render.
Does anyone have a clue ?
#2
Posted 07 August 2011 - 06:14 AM
I inverted geometric normals this time
it seems we have a problem where geometry is interpenetrating though. I haven't tried this configuration with Vray dirt yet, but I don't think I'll the same result.
But I like that already, it could give some nice details on the edges.
#3
Posted 07 August 2011 - 09:42 AM
I used the inverted occlusion to drive emission color of a standard Surface model Vop.
It gives a pretty good result. Sort of a SSS look, but cheaper I guess.( this image took 1 hour and a half, but I think the blurry reflection is responsible for a big part of the render time.)
#4
Posted 07 August 2011 - 10:25 AM
I have done the same method you're speaking of in renderman, and this will cut out the extra geometry, or normal re-working.
#5
Posted 07 August 2011 - 11:33 AM
By the way, correct me if I am wrong, but vex code seems much easier to read, passed a certain point of complexity,
would it be better for me to code that shader instead of building it with Vops ?
#6
Posted 07 August 2011 - 05:18 PM
MrGAG, on 07 August 2011 - 11:33 AM, said:
By the way, correct me if I am wrong, but vex code seems much easier to read, passed a certain point of complexity,
would it be better for me to code that shader instead of building it with Vops ?
Whatever manner gets the job done easier for you. Doing vops and vex are two great parallel structures, each having their pros and cons. I personally understand working in vops better when it comes to complex shading, or any nodal based shading system. Almost everyone that looks at my node based shader networks get confused, but looking at tons of vex code for me gets confusing.
On a completely personal belief, I think you will do a vops or vexs based work flowed depending on how you think. I am a very strong spatial learner. I've meet a few other people that do vops and they are of the same type of learning style. Where as many vex/coders are better with other skill sets.
If you haven't heard of what I am a talking about here is a quickly found article on it.
Theory of Multiple Intelligence
In the end it don't matter how you do it, as long as you get it done. So you're not wrong or right.
#7
Posted 08 August 2011 - 05:26 AM
Quote
I can only agree that
but I might be a bit on the other side to ... I have a background in web scripting, max script, a little of python.
Don't really know why I didn't tried vex already. Maybe because it's so easy to use any function you want in vex, node base representation of function is a bliss. But on the other hand, I find that doing a simple "if / then " or a while loop become really tedious sometimes. ( especially regarding point clouds iterations .... ) I guess coding it would be easier for me sometimes.
#8
Posted 08 August 2011 - 07:01 AM
MrGAG, on 08 August 2011 - 05:26 AM, said:
lol... yeah, point clouds and while loops are still unsolved in my book, too... if/then blocks I finally got covered. Having practical applications to use the concepts makes them a lot easier.
-Ben
#9
Posted 13 August 2011 - 04:39 AM
I have a little vex script :
sop
sop_pc_test()
{
int handle = pcopen("op:/obj/pointCloud/OUT_pc","P",P,1,1);
vector myPos = pcfilter(handle,"P");
float dist = distance(P,myPos);
Cd = clamp(dist,0.0,0.1);
}
as you can see, this vex script runs in sop context. and it runs well.
When I try this in "surface" context, as a shader, it doesn't work at all. Of course I remembered to switch from "Cd" to "Cf", but besides that why wouldn't it work ?
surface
sop_pc_test()
{
int handle = pcopen("op:/obj/pointCloud/OUT_pc","P",P,1,1);
vector myPos = pcfilter(handle,"P");
float dist = distance(P,myPos);
Cf = clamp(dist,0.0,0.1);
}
#10
Posted 13 August 2011 - 05:31 AM
you need to reference geometry object on disk as your pointcloud texture
Generalist
Slovakia
#11
Posted 13 August 2011 - 09:22 AM
anim, on 13 August 2011 - 05:31 AM, said:
... or create at run time for that matter.
The clocks had ceased their chiming, and the deep river ran on.
#12
Posted 12 June 2012 - 04:23 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users










