Announcement

Collapse
No announcement yet.

OSL + PTC is it supported?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OSL + PTC is it supported?

    hi,
    I have been experimenting with point clouds in OSL shaders in vray and so far I wasn't able to get the shader to read them.

    1. I have been testing it on PTC generated in renderman. I assume I don't need some vray specific one. is it correct?
    2. Is there a way to generate PTC in vray for maya?
    3. is there a way to expose path input on OSL shader? string inputs are converted to a texture by VrayTexOSL


    my simple test shader:
    Code:
    shader ptc_read
    (
    	float r = 30.0,
    	output color result = color(0.0, 0.0, 0.0),
    	output float alpha = 1.0
    )
    {
    
    	point pos[10];
    	color col[10];
    	int n = pointcloud_search("c:/temp/aaaaa.ptc", P, r, 10, 1, "_uv", col);
    	printf ("Found %d particles within radius %f of (%p)\n", n, r, P);
    	for (int i = 0; i < n; ++i)
    		printf (" position (%f) -> color (%g)\n", pos[i], col[i]);
    
    	if(n>0)
    		result=col[0];
    }
    any tips will help. thank you!
    Pawel

  • #2
    No, we don't support ptc files right now. V-Ray can deal with point clouds, but the OSL specification doesn't seem to include any information about this particular file format so we don't know what to do with it.

    For the path input, you need to use the string widget metadata parameter, like mentioned here:
    http://docs.chaosgroup.com/display/V...ationSpecifics

    Best regards,
    Vlado
    Last edited by vlado; 18-12-2014, 04:17 PM.
    I only act like I know everything, Rogers.

    Comment

    Working...
    X