 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi,
I came up with this solution. Hope it helps.
Don't know, why my rotation tip failed - but Warp's hint works always albeit
being less flexible.
//______________________
#version 3.6;
#declare RAD = 2;
global_settings {
assumed_gamma 2.2
max_trace_level 16
noise_generator 2
radiosity {
pretrace_start 0.08
pretrace_end 0.04/RAD
count 30*RAD
nearest_count RAD
error_bound 2/RAD
low_error_factor 0.5
recursion_limit 1
gray_threshold 0
minimum_reuse 0.015
brightness 2.3
adc_bailout 0.005
normal on
media off
}
}
camera {
location <0,6,-30>
right x*image_width/image_height
up y
look_at 0
angle 67
}
light_source {
<80000,150000,-5000>,
<2.42,2.23,1.87>
}
sky_sphere {
pigment {
gradient y
color_map {
[0 color <212,221,239>/255]
[1 color < 79,103,170>/255]
}
}
}
plane {
y,-50 hollow
texture {
pigment {color rgb <0.2,0.3,0.1>}
}
}
//______________________________________________________________________________
#include "functions.inc"
#include "transforms.inc"
#declare eye = cylinder {0,y*2,0.4 pigment {color rgb 0.4} finish {ambient
0}}
#declare BSB = sphere {0, 11 scale <1, 0.85, 1>};
#declare Norm = <0,0,0>;
#declare CntX = -90;
#declare CntY = -90;
#declare ZZ = <0,0,-1>;
#declare N1 = seed(12345);
#macro RRand (a,b,c)
rand (c)*(b-a)+a
#end
#while(CntY < 90)
#while(CntX < 90)
#declare POSB = trace(BSB, <CntX, CntY + RRand(-0.95, 0.95,
N1), 0>, ZZ, Norm);
#if (vlength (Norm)!= 0)
merge {
object {eye}
sphere{<0,0,0.55-0.55>, 0.75
texture{pigment{rgb <1, .9, .9>}}
scale <1.3, 1.3, 0.95>
}
rotate <RRand(-20, 20, N1), RRand(-20, 20, N1), 0>
Reorient_Trans (y,Norm)
translate POSB
}
#end
#declare CntX = CntX + 3 + RRand(-0.55, 0.55, N1);
#end
#declare CntX = -90;
#declare CntY = CntY + 2;
#end
object {BSB pigment {color rgb <1,0,0>} finish {ambient 0}}
//________________________________________________________________
Post a reply to this message
Attachments:
Download 'rotation_issue.jpg' (65 KB)
Preview of image 'rotation_issue.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Norbert Kern wrote:
> Hi,
>
> I came up with this solution. Hope it helps.
> Don't know, why my rotation tip failed - but Warp's hint works always albeit
> being less flexible.
> Reorient_Trans (y,Norm)
This method worked just fine, Norbert!
Thanks again for your help!
Post a reply to this message
Attachments:
Download 'eyesphere.jpg' (158 KB)
Preview of image 'eyesphere.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
(oops, I hit the wrong button.)
Artemia Salina wrote:
> . . . Please note the scaled spheres under the eye balls and how they
> are not rotated correctly to lay on the surface of the large sphere.
> I haven't been able to figure out how to do this properly yet. . . .
Can't see the discrepancy myself, but anyway .. I'd put the eye with its
mount at <R,0,0>
#declare Eye = union {
//the eyeball itself and
sphere { 0,1 scale <1,2,2> translate R*x }
}
and then rotate it into place.
For uniformly random placement this is the way to go:
object { Eye
rotate <0,
degrees(asin(1-2*rand(Seed))),
360*rand(Seed)>
}
For a uniform quasi-grid placement:
#declare H = 1/N;
#declare Z = H-1;
#declare Theta = 0;
#declare Magic = 180*(3-sqrt(5));
#while Z < 1
object { Eye rotate <0, degrees(asin(Z)), Theta> }
#declare Z = Z+2*H;
#declare Theta = mod(Theta+Magic,360);
#end//while
--
Anton Sherwood, http://www.ogre.nu/
"How'd ya like to climb this high *without* no mountain?" --Porky Pine
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hallo, Artemia!
The texture of the monster is very interesting: how did you realized it?
Could be interesting with some normal, in order to obtain a vascular system
relief effect.
;-)
Paolo
> "Artemia Salina" wrote:
> Norbert Kern wrote:
> > Hi,
> >
> > I came up with this solution. Hope it helps.
> > Don't know, why my rotation tip failed - but Warp's hint works always
albeit
> > being less flexible.
>
>
> > Reorient_Trans (y,Norm)
>
>
> This method worked just fine, Norbert!
>
> Thanks again for your help!
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Paolo Gibellini wrote:
> Hallo, Artemia!
> The texture of the monster is very interesting: how did you realized it?
It's just a color map using a turbulated mandel pattern. I have it set
up as a macro using a color ("Red" from colors.inc) passed as a
parameter, and rbgt 1 to make it layerable. Depending on how it is
adjusted you can get some interesting textures. The image below shows a
convincing raw meat texture (I've forgotten the parameters to get that
texture) but it was several layers using Red and White.
#macro BloodShot(N, T, C, S)
texture{
pigment {
mandel (5000 * RRand(1, 5, N)) / S
turbulence RRand(0.2, 10.9, N)
rotate <0, 0, RRand(0, 360, N)>
translate T
color_map {
[0.010 rgbt 1]
[0.010 C ]
[0.210 C ]
[0.210 rgbt 1]
[0.900 rgbt 1]
[0.900 C ]
[0.900 C ]
[0.990 rgbt 1]
}
}
}
#end
> Could be interesting with some normal, in order to obtain a vascular system
> relief effect.
I'm thinking of adding actual veins to the monster's head and body. This
thing is far from being done :-)
Post a reply to this message
Attachments:
Download 'meatloaf.jpg' (156 KB)
Preview of image 'meatloaf.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thank you, I'v never dared to use mandel in a texture, but the effect is
very interesting!
;-)
Paolo
> "Artemia Salina" <non### [at] none none> wrote:
>
> It's just a color map using a turbulated mandel pattern. I have it set
> up as a macro using a color ("Red" from colors.inc) passed as a
> parameter, and rbgt 1 to make it layerable. Depending on how it is
> adjusted you can get some interesting textures. The image below shows a
> convincing raw meat texture (I've forgotten the parameters to get that
> texture) but it was several layers using Red and White.
>
> #macro BloodShot(N, T, C, S)
> texture{
> pigment {
> mandel (5000 * RRand(1, 5, N)) / S
> turbulence RRand(0.2, 10.9, N)
> rotate <0, 0, RRand(0, 360, N)>
> translate T
> color_map {
> [0.010 rgbt 1]
> [0.010 C ]
> [0.210 C ]
> [0.210 rgbt 1]
> [0.900 rgbt 1]
> [0.900 C ]
> [0.900 C ]
> [0.990 rgbt 1]
> }
> }
> }
> #end
>
> > Could be interesting with some normal, in order to obtain a vascular
system
> > relief effect.
>
> I'm thinking of adding actual veins to the monster's head and body. This
> thing is far from being done :-)
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |