POV-Ray : Newsgroups : povray.binaries.images : Playing with Monsters Server Time
3 May 2024 12:13:20 EDT (-0400)
  Playing with Monsters (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Norbert Kern
Subject: Re: Playing with Monsters
Date: 2 Jul 2006 16:55:01
Message: <web.44a8318f5c8cac3a9db1fe880@news.povray.org>
Artemia Salina <y2k### [at] sheayrightcom> wrote:

> I tried Norbert's suggestion last night (see his article in this thread)
> and it didn't work. I played with swapping the sign for the x and z axes
> but still no luck.

It should work, believe me!
Here a bit more code, which shows what I mean -

#declare Norm = <0,0,0>;
#declare loc = trace (M1, start, <0,0,0>, Norm);
#if (vlength(Norm) != 0)
        object {
                eye
                rotate <degrees (atan2 (Norm.z,Norm.y)),0,-degrees (atan2
(Norm.x,Norm.y))>
                translate loc
        }
#end

If the difficulties persist, please post the relevant code part.


Norbert Kern


Post a reply to this message

From: Artemia Salina
Subject: Re: Playing with Monsters
Date: 2 Jul 2006 17:19:22
Message: <pan.2006.07.02.21.19.21.472772@sheayright.com>
On Sun, 02 Jul 2006 16:50:23 -0400, Norbert Kern wrote:

> Artemia Salina <y2k### [at] sheayrightcom> wrote:
> 
>> I tried Norbert's suggestion last night (see his article in this thread)
>> and it didn't work. I played with swapping the sign for the x and z axes
>> but still no luck.
> 
> It should work, believe me!
> Here a bit more code, which shows what I mean -
> 
> #declare Norm = <0,0,0>;
> #declare loc = trace (M1, start, <0,0,0>, Norm);

Oh, I think I see what's going on. Instead of <0,0,0> for the direction
vector I'm using <0,0,-1>! I don't know how or why I did that. I'll retry
with your suggestion, Norbert.

Thanks again for the assistance!


Post a reply to this message

From: Norbert Kern
Subject: Re: Playing with Monsters
Date: 2 Jul 2006 17:35:00
Message: <web.44a83b515c8cac3a9db1fe880@news.povray.org>
My fault, <0,0,0> doesn't work!
I don't know, how you come to your start coordinates for trace (start), but
if the base sphere is centered at <0,0,0>, the direction has to be -start.

Norbert Kern


Post a reply to this message

From: Artemia Salina
Subject: Re: Playing with Monsters
Date: 2 Jul 2006 18:03:58
Message: <pan.2006.07.02.22.03.54.579706@sheayright.com>
On Sun, 02 Jul 2006 17:32:01 -0400, Norbert Kern wrote:

> My fault, <0,0,0> doesn't work!
> I don't know, how you come to your start coordinates for trace (start), but
> if the base sphere is centered at <0,0,0>, the direction has to be -start.
> 
> Norbert Kern

Here's a the code that I'm using (with most texturing removed for clarity). The
RRand() just provides some irregularity to the final positioning of the eyes
and makes the eyeballs look in different directions (rotating them in their
sockets).

So Start would be

<-90, -90 (plus some randomness), 0>

And it would end the scanning at

<90 (plus some randomness), 90 (plus some randomness), 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);

#while(CntY < 90)
        #while(CntX < 90)
                #declare POSB = trace(BSB, <CntX, CntY + RRand(-0.95, 0.95, N1), 0>,
ZZ, Norm);

                #if (!VZero(Norm))
                merge{
                        object {Eye(Green*0.5, .70)
                                // Make eyes look in different directions
                                rotate <POSB.y*RRand(4, 20, N1), -POSB.x*RRand(4, 20,
N1), 0>
                                pigment{rgbt 1}
                        }
                        sphere{<0,0,0.55>, 0.75
                                texture{pigment{rgb <1, .9, .9>}}
                                // Flatten the spheres a bit
                                scale <1.3, 1.3, 0.95>
                                // This rotation was what I was using and it was
close:
                                // rotate <POSB.y*8, -POSB.x*8, 0>
                                rotate <degrees (atan2 (Norm.z,Norm.y)),0,-degrees
(atan2(Norm.x,Norm.y))>
                        }
                        translate POSB
                }
                #end
                #declare CntX = CntX + 3 + RRand(-0.55, 0.55, N1);
        #end
        #declare CntX = -90;
        #declare CntY = CntY + 2;
#end

-- 
Today's Alliterative Monomania Headlines:
Laputan Laryngeal Law-fall Liquidly Litters Lachrymary Law-fall
Degloried Deflective Decession Disfavorably Disincorporates Dihedral Decahedron
Redivivus Rapid-fire Refait Retroactively Roentgenizes Retrousse Redif


Post a reply to this message

From: Norbert Kern
Subject: Re: Playing with Monsters
Date: 3 Jul 2006 06:10:01
Message: <web.44a8ec985c8cac3ac398b7380@news.povray.org>
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'
rotation_issue.jpg


 

From: Artemia Salina
Subject: Re: Playing with Monsters
Date: 4 Jul 2006 13:11:08
Message: <44aaa12c@news.povray.org>
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'
eyesphere.jpg


 

From: Anton Sherwood
Subject: Re: Playing with Monsters
Date: 4 Jul 2006 20:31:38
Message: <44ab086a$1@news.povray.org>
(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

From: Paolo Gibellini
Subject: Re: Playing with Monsters
Date: 5 Jul 2006 05:33:16
Message: <44ab875c$1@news.povray.org>
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

From: Artemia Salina
Subject: Re: Playing with Monsters
Date: 10 Jul 2006 12:40:35
Message: <44b28303@news.povray.org>
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'
meatloaf.jpg


 

From: Paolo Gibellini
Subject: Re: Playing with Monsters
Date: 11 Jul 2006 04:28:44
Message: <44b3613c@news.povray.org>
Thank you, I'v never dared to use mandel in a texture, but the effect is
very interesting!
;-)
Paolo

> "Artemia Salina" <non### [at] nonenone> 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

<<< Previous 6 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.