|
|
Here is the code for this scene:
// Begin code
#version unofficial MegaPov 1.21;
// Macro straight from Megapov documentation
#macro WriteClothFile(filename, n1, n2, nlng, ks, ht)
#fopen file filename write
#write(file, n1, ", ", n2, ", ", nlng, ", ", ks, ",\n")
#local l1 = nlng*(n1-1);
#local l2 = nlng*(n2-1);
#local st = seed(1234);
#local i=0;
#while (i < n1)
#local j=0;
#while (j < n2)
#local tempx = -l1/2 + i*nlng;
#local tempz = -l2/2 + j*nlng;
#local tempy = ht + (-1+2*rand(st))*nlng*0.1;
#write(file, tempx, ",", tempy, ",", tempz, ", 0.0, 0.0, 0.0,\n")
#set j=j+1;
#end
#set i=i+1;
#end
#fclose file
#end
WriteClothFile("temp.cth", 50, 50, 0.2, 0.95, 0)
#declare stuff =
sphere {
<02.5, -2, 02.5>, 1
pigment {color rgb <0, 1, 0>}
};
simcloth {
environment stuff
friction 0
gravity -0.4*y
damping 0.9
intervals 0.03
iterations 1000
input "temp.cth"
mesh_output "cloth.msh"
smooth_mesh on
uv_mesh on
}
mesh {
#include "cloth.msh"
uv_mapping
texture {
pigment {
checker
color rgb <1, 0, 0>
color rgb 1
scale 0.1
}
}
}
object {stuff}
camera {
location <5, 1, -10>
look_at <5, 0, 5>
}
light_source {
<5, 15, -5>
color rgb 1
}
// end code
Why is the sphere showing through the cloth in the final scene? I'm
going nuts trying to figure out what I screwed up. Did I just hit a bug
in Cloth-ray?
--
William Tracy
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|a|f|i|s|h|i|o|n|a|d|o|@|g|m|a|i|l|.|c|o|m|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|w|t|r|a|c|y|@|c|a|l|p|o|l|y|.|e|d|u|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
You know you've been raytracing too long when www.povray.org is your
default homepage in your web browser.
fish-head
Post a reply to this message
Attachments:
Download 'clthtest.png' (7 KB)
Preview of image 'clthtest.png'
|
|
|
|
Thomas de Groot wrote:
> This is fairly normal behaviour with ClothRay.
Okay. I'd just never seen ClothRay do this before, and was wondering how
I'd triggered it in this scene.
I was originally using this scene to play with some macros of my own,
and this was making me think I'd screwed up my macros. But between being
able to reproduce it with the "default" macro, and your reassurance that
this is normal :-) I'm feeling better now.
--
William Tracy
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|a|f|i|s|h|i|o|n|a|d|o|@|g|m|a|i|l|.|c|o|m|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|w|t|r|a|c|y|@|c|a|l|p|o|l|y|.|e|d|u|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
You know you've been raytracing too long when your ophthalmologist
examines you for complaints of eye strain and blurred vision and asks
you why the words Pov, #declare, #include, sphere, translate, rotate,
texture, and pigment are permanently burned into your retina.
Ken Tyler
Post a reply to this message
|
|