POV-Ray : Newsgroups : povray.binaries.images : Spraypaint macro progress Server Time
8 Nov 2024 10:30:42 EST (-0500)
  Spraypaint macro progress (Message 1 to 6 of 6)  
From: Anthony D  Baye
Subject: Spraypaint macro progress
Date: 12 Oct 2012 04:15:01
Message: <web.5077d12a9d67bc36d97ee2b90@news.povray.org>
Nothing fancy, at the moment.  Just a static point emitter with trace and
eval_pigment thrown in.

I still have quite a bit to do:  The scattering is Rand_Normal from rand.inc

Mu = 0.0
Sigma = 1.0

using a spherical angle system (random phi and theta to give particle
trajectory).

Eventually, the emitter will move along a path dictated by one spline, and aim
at a path dictated by another spline -- at least, that's the plan for now.

the stencil image will be optional, so it will be fairly versatile, perhaps even
useful for animations...

comments/suggestions?

Regards,
A.D.B.


Post a reply to this message


Attachments:
Download 'spraycan.png' (243 KB)

Preview of image 'spraycan.png'
spraycan.png


 

From: Thomas de Groot
Subject: Re: Spraypaint macro progress
Date: 12 Oct 2012 07:05:49
Message: <5077f98d$1@news.povray.org>
On 12-10-2012 10:13, Anthony D. Baye wrote:
> comments/suggestions?

Looking good indeed. A close-up would be fine too ;-)

I believe this could become an interesting macro for the Object 
Collection eventually.

Thomas


Post a reply to this message

From: Tek
Subject: Re: Spraypaint macro progress
Date: 12 Oct 2012 08:45:01
Message: <web.50780fe467fa36ca4b0aa1fd0@news.povray.org>
I hope you don't mind, but your post inspired me to try this in an entirely
different way: Instead of placing spray particles through a mask, I just draw
the mask as an object pigment with some turbulence to create the spray effect.

Obviously this is far less realistic, but it's very quick to trace.

Here's the code in case you want to give it a try:
pigment {
 object {
  union {
   sphere_sweep {
    cubic_spline
    5,
    <-1,1>, .1,
    <-.5,0>, .2,
    // move away from the surface to thin out the spray
    <1,0,-.1>, .1,
    <2,1,-.2>, .1,
    <2,2,-.3>, .0
   }
   difference {
    cylinder { -z, z, 1 }
    cylinder { -z, z, .7 }
    #for ( a, 0, 360-45, 45 )
     box { -z, <.15,1,1> translate -x*.7 rotate z*a }
    #end
   }
  }
  rgb 1, rgb <1,0,1>
 }
 #local noiseScale = .004;
 scale 1/noiseScale
 warp { turbulence .1/noiseScale octaves 2 lambda 4 }
 scale noiseScale
}

--
Tek
http://evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'spray_paint.png' (147 KB)

Preview of image 'spray_paint.png'
spray_paint.png


 

From: Anthony D  Baye
Subject: Re: Spraypaint macro progress
Date: 12 Oct 2012 11:40:00
Message: <web.5078395567fa36cad97ee2b90@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote:
> I hope you don't mind, but your post inspired me to try this in an entirely
> different way: Instead of placing spray particles through a mask, I just draw
> the mask as an object pigment with some turbulence to create the spray effect.
>
> Obviously this is far less realistic, but it's very quick to trace.
>
> Here's the code in case you want to give it a try:
> pigment {
>  object {
>   union {
>    sphere_sweep {
>     cubic_spline
>     5,
>     <-1,1>, .1,
>     <-.5,0>, .2,
>     // move away from the surface to thin out the spray
>     <1,0,-.1>, .1,
>     <2,1,-.2>, .1,
>     <2,2,-.3>, .0
>    }
>    difference {
>     cylinder { -z, z, 1 }
>     cylinder { -z, z, .7 }
>     #for ( a, 0, 360-45, 45 )
>      box { -z, <.15,1,1> translate -x*.7 rotate z*a }
>     #end
>    }
>   }
>   rgb 1, rgb <1,0,1>
>  }
>  #local noiseScale = .004;
>  scale 1/noiseScale
>  warp { turbulence .1/noiseScale octaves 2 lambda 4 }
>  scale noiseScale
> }
>
> --
> Tek
> http://evilsuperbrain.com

of course, I don't mind.  I'm only doing it this way because I can't use a
pigment... (see my post in p.general for details)

Regards,
A.D.B.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Spraypaint macro progress
Date: 12 Oct 2012 16:36:08
Message: <50787f38$1@news.povray.org>
Tek wrote:

> Obviously this is far less realistic, but it's very quick to trace.

you can also use object pattern with two textures, this allows
for a more sprinkled interior without destroying the outline

#declare T1 = texture {pigment {color White}}
#declare T2 = texture
{
   pigment
   {
     bozo scale 0.1
     color_map
     {
       [0.3 White]
       [0.7 rgb <1,0,1>]
     }
   }
}

texture
{
   object
   {
     ...
     texture {T1}
     texture {T2}
   }
}


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Spraypaint macro progress
Date: 12 Oct 2012 16:40:11
Message: <5078802b@news.povray.org>
and the image ...


Post a reply to this message


Attachments:
Download 'testspray.jpg' (49 KB)

Preview of image 'testspray.jpg'
testspray.jpg


 

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