POV-Ray : Newsgroups : povray.binaries.images : Pencil Macro Critique? Server Time
4 Oct 2024 05:21:02 EDT (-0400)
  Pencil Macro Critique? (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Charles Krause
Subject: Pencil Macro Critique?
Date: 26 Apr 1999 23:42:15
Message: <37252407.0@news.povray.org>
Ok - there are a number of pencil models available - but none that did JUST
what I wanted. So I whomped up this one.

_everything_ is controlled by a parameter, and the size is strictly
controllable, known, and it even gives you the bounding cylinder for the
pencil. You should be able to place the models this macro creates precisely
in a scene.

Attached are a few examples, all pencils are created  by the same macro,
just with different parameters.

Any suggestions at how to improve these models is much appreciated.

NOTE : this combines the ideas of several models as well as a few original
ideas, and some staring are real pencils. I could not have done this, had
other people not written, and published their models. Thank you.

Parameters to date
------------------------

The pencil has it's sharpened point at <0,0,0>, extends in the +y direction,
and is completely bound by cylinder
 <0,0,0>,<0,pencil_length,0>,pencil_radius }

FLAGS

Round : If yes, make the pencil round, else, make a hexagonal body.

Sharpened : If yes, trim the pencil body and lead with the shear_cone to
make a pointed pencil. Otherwise, the pencil will be 'brand-new'

Eraser : If yes, shorten the pencil body, add an eraser, and add an eraser
sleeve. The total length of the pencil still equals pencil_length.

Painted : If yes, slap a coat of paint on the pencil (see Matched flag), if
not, leave it bare wood_texture.

Matched : If yes, make the pencil's paint the same color as it's lead. If
not, make the paint paint_texture.

VARIABLES

pencil_radius : The outside radius of the pencil. if the round flag is set,
this will be the radius of the cylinder, if not, the hexagonal prism that
makes up the body of the pencil will be inside this cylinder, making the
midpoints of the sides _less_ distant from the center.

pencil_length : this is the total length of the pencil, including eraser, if
included.

lead_radius : the radius of the cylindrical lead inside the pencil body.

cone_taper : this is the measure of the angle (in radians) of the 'sharp
point' of the pencil. Lower values will make the cone narrower, and make the
sharpened part longer.

Eraser_length : The length of the rubber eraser on the end of the pencil.
Partially hidden by the metal sleeve.

wood_overlap : the amount the metal sleeve fits over the wooden shaft of the
pencil

eraser_overlap : the amount the metal sleeve fits over the eraser.

spacing : the gap between the ends of the eraser sleeve, and the beginning
of the ridged sections. Note : the way that the ridges are constructed
sometimes means the gap on the eraser side is less. This only occurs if the
ridged region is not of a length that is a multiple of 2*ridge_radius.

ridge_radius : the radius of the individual torus ridges on the metal eraser
sleeve.

band_width : the width of the painted band in the middle of the eraser
sleeve. Can be set to zero if no such band is desired.

metal_thickness : the thickness of the eraser sleeve.

Textures

paint_texture : the texture used for the coat of paint, if the pencil is
painted, and if the matched flag is not set.

lead_texture : the texture used for the pencil lead, and the paint_texture
IF the matched flag is set.

Wood_texture : the texture of the wood body of the pencil. NOTE : this is
the texture of the sharpened surfaces, and the trimmed ends only. If the
pencil is trimmed by CSG, the body of the pencil will show the
paint_texture.

eraser_texture : the texture of the eraser, if present.

holder_texture : the texture of the eraser_sleeve, if present

band_texture : the texture of the painted band on the eraser sleeve, if
present.

---------------------------------

I would like to add the ability to put writing on the side of the pencils
before I post the actual macro, provided there is interest.


Suggestions anyone?


Post a reply to this message


Attachments:
Download 'macrotest.jpg' (31 KB)

Preview of image 'macrotest.jpg'
macrotest.jpg


 

From: Thomas Lake
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 03:07:46
Message: <372555A5.56C8FB8B@home.com>
Hay now that's great, especially all the customization flags and variables! One
suggestion though. The wood to the end of the pencil, the sharpened end, should
not be banded like that, instead rotate the wood texture so the band runs up and
down along the y axis, also scale it down a bit. And another thing is the
pencils in this picture are too fat. I know that with the macro its just a
matter of changing some variables, but you asked for comments on how to improve
them. Other than this you've done a great job!

Charles Krause wrote:

> Ok - there are a number of pencil models available - but none that did JUST
> what I wanted. So I whomped up this one.
>
> _everything_ is controlled by a parameter, and the size is strictly
> controllable, known, and it even gives you the bounding cylinder for the
> pencil. You should be able to place the models this macro creates precisely
> in a scene.
>
> Attached are a few examples, all pencils are created  by the same macro,
> just with different parameters.
>
> Any suggestions at how to improve these models is much appreciated.
>
> NOTE : this combines the ideas of several models as well as a few original
> ideas, and some staring are real pencils. I could not have done this, had
> other people not written, and published their models. Thank you.
>
> Parameters to date
> ------------------------
>
> The pencil has it's sharpened point at <0,0,0>, extends in the +y direction,
> and is completely bound by cylinder
>  <0,0,0>,<0,pencil_length,0>,pencil_radius }
>
> FLAGS
>
> Round : If yes, make the pencil round, else, make a hexagonal body.
>
> Sharpened : If yes, trim the pencil body and lead with the shear_cone to
> make a pointed pencil. Otherwise, the pencil will be 'brand-new'
>
> Eraser : If yes, shorten the pencil body, add an eraser, and add an eraser
> sleeve. The total length of the pencil still equals pencil_length.
>
> Painted : If yes, slap a coat of paint on the pencil (see Matched flag), if
> not, leave it bare wood_texture.
>
> Matched : If yes, make the pencil's paint the same color as it's lead. If
> not, make the paint paint_texture.
>
> VARIABLES
>
> pencil_radius : The outside radius of the pencil. if the round flag is set,
> this will be the radius of the cylinder, if not, the hexagonal prism that
> makes up the body of the pencil will be inside this cylinder, making the
> midpoints of the sides _less_ distant from the center.
>
> pencil_length : this is the total length of the pencil, including eraser, if
> included.
>
> lead_radius : the radius of the cylindrical lead inside the pencil body.
>
> cone_taper : this is the measure of the angle (in radians) of the 'sharp
> point' of the pencil. Lower values will make the cone narrower, and make the
> sharpened part longer.
>
> Eraser_length : The length of the rubber eraser on the end of the pencil.
> Partially hidden by the metal sleeve.
>
> wood_overlap : the amount the metal sleeve fits over the wooden shaft of the
> pencil
>
> eraser_overlap : the amount the metal sleeve fits over the eraser.
>
> spacing : the gap between the ends of the eraser sleeve, and the beginning
> of the ridged sections. Note : the way that the ridges are constructed
> sometimes means the gap on the eraser side is less. This only occurs if the
> ridged region is not of a length that is a multiple of 2*ridge_radius.
>
> ridge_radius : the radius of the individual torus ridges on the metal eraser
> sleeve.
>
> band_width : the width of the painted band in the middle of the eraser
> sleeve. Can be set to zero if no such band is desired.
>
> metal_thickness : the thickness of the eraser sleeve.
>
> Textures
>
> paint_texture : the texture used for the coat of paint, if the pencil is
> painted, and if the matched flag is not set.
>
> lead_texture : the texture used for the pencil lead, and the paint_texture
> IF the matched flag is set.
>
> Wood_texture : the texture of the wood body of the pencil. NOTE : this is
> the texture of the sharpened surfaces, and the trimmed ends only. If the
> pencil is trimmed by CSG, the body of the pencil will show the
> paint_texture.
>
> eraser_texture : the texture of the eraser, if present.
>
> holder_texture : the texture of the eraser_sleeve, if present
>
> band_texture : the texture of the painted band on the eraser sleeve, if
> present.
>
> ---------------------------------
>
> I would like to add the ability to put writing on the side of the pencils
> before I post the actual macro, provided there is interest.
>
> Suggestions anyone?
>
>  [Image]


Post a reply to this message

From: Charles Krause
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 03:11:30
Message: <37255512.0@news.povray.org>
Thomas Lake wrote in message <372555A5.56C8FB8B@home.com>...
>Hay now that's great, especially all the customization flags and variables!
One
>suggestion though. The wood to the end of the pencil, the sharpened end,
should
>not be banded like that, instead rotate the wood texture so the band runs
up and
>down along the y axis, also scale it down a bit.

Yep - this is just a case of defining the wood texture properly.

>And another thing is the
>pencils in this picture are too fat.

The scale here is 1 Pov = 1 inch, and to fit in the picture, these are all
2-4 inches long. So these are stubby pencils :) I'm aware they're not the
proper length.

>I know that with the macro its just a
>matter of changing some variables, but you asked for comments on how to
improve
>them. Other than this you've done a great job!


Thanks :)


Post a reply to this message

From: Charles Krause
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 03:48:19
Message: <37255db3.0@news.povray.org>
Here you go, a more realistically scaled pencil.

It is 7" long, 1/3 inch in diameter, the lead is 1/8 inch in diameter, the
erase 1/3 inch long (doesn't look like the user makes a lot of mistakes
:) ). I didn't fix the wood grain though.


Post a reply to this message


Attachments:
Download 'macrotest.jpg' (25 KB)

Preview of image 'macrotest.jpg'
macrotest.jpg


 

From: bankspad
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 04:11:41
Message: <37216A8F.F140EBDD@pacbell.net>
Wow, this is definetly incredible. The first, and I feel the most important,
thank you for giving proper credit where credit is due, i.e. those whose works
allowed you to accomplish this work. Your idea for lettering on the pencils
would be a great addition - I'm wondering about including "wear" and "use" for
the erasers - you know, where the eraser is worn away and has sublte graphite
smears. My second suggestion may be a bit nit-picky but not meant to be: Where
the lead and wood meet is never so cleanly clipped - at least never has it been
for the some-odd-millions of pencil I've chewed through in life. My third
suggestion: The ability to vary the sharpness/dullness of the lead tip. Based on
the resulting image, your macro seems a very nice (and useful) piece of work, I
can't wait to try it out when you're ready to share.    ;-]

KB-

Charles Krause wrote:

> Ok - there are a number of pencil models available - but none that did JUST
> what I wanted. So I whomped up this one.
>
> _everything_ is controlled by a parameter, and the size is strictly
> controllable, known, and it even gives you the bounding cylinder for the
> pencil. You should be able to place the models this macro creates precisely
> in a scene.
>
> Attached are a few examples, all pencils are created  by the same macro,
> just with different parameters.
>
> Any suggestions at how to improve these models is much appreciated.
>
> NOTE : this combines the ideas of several models as well as a few original
> ideas, and some staring are real pencils. I could not have done this, had
> other people not written, and published their models. Thank you.
>
> Parameters to date
> ------------------------
>
> The pencil has it's sharpened point at <0,0,0>, extends in the +y direction,
> and is completely bound by cylinder
>  <0,0,0>,<0,pencil_length,0>,pencil_radius }
>
> FLAGS
>
> Round : If yes, make the pencil round, else, make a hexagonal body.
>
> Sharpened : If yes, trim the pencil body and lead with the shear_cone to
> make a pointed pencil. Otherwise, the pencil will be 'brand-new'
>
> Eraser : If yes, shorten the pencil body, add an eraser, and add an eraser
> sleeve. The total length of the pencil still equals pencil_length.
>
> Painted : If yes, slap a coat of paint on the pencil (see Matched flag), if
> not, leave it bare wood_texture.
>
> Matched : If yes, make the pencil's paint the same color as it's lead. If
> not, make the paint paint_texture.
>
> VARIABLES
>
> pencil_radius : The outside radius of the pencil. if the round flag is set,
> this will be the radius of the cylinder, if not, the hexagonal prism that
> makes up the body of the pencil will be inside this cylinder, making the
> midpoints of the sides _less_ distant from the center.
>
> pencil_length : this is the total length of the pencil, including eraser, if
> included.
>
> lead_radius : the radius of the cylindrical lead inside the pencil body.
>
> cone_taper : this is the measure of the angle (in radians) of the 'sharp
> point' of the pencil. Lower values will make the cone narrower, and make the
> sharpened part longer.
>
> Eraser_length : The length of the rubber eraser on the end of the pencil.
> Partially hidden by the metal sleeve.
>
> wood_overlap : the amount the metal sleeve fits over the wooden shaft of the
> pencil
>
> eraser_overlap : the amount the metal sleeve fits over the eraser.
>
> spacing : the gap between the ends of the eraser sleeve, and the beginning
> of the ridged sections. Note : the way that the ridges are constructed
> sometimes means the gap on the eraser side is less. This only occurs if the
> ridged region is not of a length that is a multiple of 2*ridge_radius.
>
> ridge_radius : the radius of the individual torus ridges on the metal eraser
> sleeve.
>
> band_width : the width of the painted band in the middle of the eraser
> sleeve. Can be set to zero if no such band is desired.
>
> metal_thickness : the thickness of the eraser sleeve.
>
> Textures
>
> paint_texture : the texture used for the coat of paint, if the pencil is
> painted, and if the matched flag is not set.
>
> lead_texture : the texture used for the pencil lead, and the paint_texture
> IF the matched flag is set.
>
> Wood_texture : the texture of the wood body of the pencil. NOTE : this is
> the texture of the sharpened surfaces, and the trimmed ends only. If the
> pencil is trimmed by CSG, the body of the pencil will show the
> paint_texture.
>
> eraser_texture : the texture of the eraser, if present.
>
> holder_texture : the texture of the eraser_sleeve, if present
>
> band_texture : the texture of the painted band on the eraser sleeve, if
> present.
>
> ---------------------------------
>
> I would like to add the ability to put writing on the side of the pencils
> before I post the actual macro, provided there is interest.
>
> Suggestions anyone?
>
>  [Image]


Post a reply to this message

From: Charles Krause
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 04:23:52
Message: <37256608.0@news.povray.org>
>Wow, this is definetly incredible. The first, and I feel the most
important,
>thank you for giving proper credit where credit is due, i.e. those whose
works
>allowed you to accomplish this work. Your idea for lettering on the pencils
>would be a great addition - I'm wondering about including "wear" and "use"
for
>the erasers - you know, where the eraser is worn away and has sublte
graphite
>smears.

Both can be accomplished by varying the length of the eraser (although this
makes for perfectly even wear I guess ), and altering the eraser texture.
for uneven wear, maybe truncating with a slightly angled, slowly changing,
very smooth heightfield?

I would also think that adding a variation to the normal for the paint
texture would be a good idea, as most pencils I have are beat up. Heck -
most have teeth marks :)

>My second suggestion may be a bit nit-picky but not meant to be: Where
>the lead and wood meet is never so cleanly clipped - at least never has it
been
>for the some-odd-millions of pencil I've chewed through in life.

Yeah - this bothered me as well. Not 100% sure how to do this though, unless
one makes the shear_cone and slightly wavering mesh?

>My third
>suggestion: The ability to vary the sharpness/dullness of the lead tip.

Yes - this occured to me as well, and should not be hard, just truncate the
lead point, and cap it with a sphere. In fact you could have a %age rounding
variable.

>Based on
>the resulting image, your macro seems a very nice (and useful) piece of
work, I
>can't wait to try it out when you're ready to share.    ;-]
>


Thanks :)


Post a reply to this message

From: bankspad
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 04:47:39
Message: <3725677A.AC8BEDFA@pacbell.net>
Charles Krause wrote:

> >Wow, this is definetly incredible. The first, and I feel the most
> important,
> >thank you for giving proper credit where credit is due, i.e. those whose
> works
> >allowed you to accomplish this work. Your idea for lettering on the pencils
> >would be a great addition - I'm wondering about including "wear" and "use"
> for
> >the erasers - you know, where the eraser is worn away and has sublte
> graphite
> >smears.
>
> Both can be accomplished by varying the length of the eraser (although this
> makes for perfectly even wear I guess ), and altering the eraser texture.
> for uneven wear, maybe truncating with a slightly angled, slowly changing,
> very smooth heightfield?

That sounds like a good place to start. The eraser shouldn't wear evenly seeing
as they never do in real life (ever have trouble proving a solution in Trig? -
@#%&* ) - there were many a time when my erasers were haggard and badly mishapen
before the lead wore through it's first sharpening.     ;-]

>
>
> I would also think that adding a variation to the normal for the paint
> texture would be a good idea, as most pencils I have are beat up. Heck -
> most have teeth marks :)

;-]    We used to have "pencil fights" in school where one person would hold a
pencil by both ends and the other would then try to break it by 'snapping' their
pencil onto it, they would then switch roles and continue this back and forth
until a pencil broke - winner recieved a fresh pencil from the loser. So, along
with the abused eraser and teeth marks were cracks and dents.

>
> >My second suggestion may be a bit nit-picky but not meant to be: Where
> >the lead and wood meet is never so cleanly clipped - at least never has it
> been
> >for the some-odd-millions of pencil I've chewed through in life.
>
> Yeah - this bothered me as well. Not 100% sure how to do this though, unless
> one makes the shear_cone and slightly wavering mesh?

Would it be possible to layer or map the wood and lead textures, then apply it
as a  _planar_ with some turbulence?
really quick example:
 texture {
   planar
   turbulence 0.099
   texture_map {
      [0.6 Wood_texture ]
      [1.0 Lead_texture   ]
    }
}

>
> >My third
> >suggestion: The ability to vary the sharpness/dullness of the lead tip.
>
> Yes - this occured to me as well, and should not be hard, just truncate the
> lead point, and cap it with a sphere. In fact you could have a %age rounding
> variable.
>
> >Based on
> >the resulting image, your macro seems a very nice (and useful) piece of
> work, I
> >can't wait to try it out when you're ready to share.    ;-]
> >
>
> Thanks :)


Post a reply to this message

From: Charles Krause
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 05:43:19
Message: <372578a7.0@news.povray.org>
>
>Would it be possible to layer or map the wood and lead textures, then apply
it
>as a  _planar_ with some turbulence?
>really quick example:
> texture {
>   planar
>   turbulence 0.099
>   texture_map {
>      [0.6 Wood_texture ]
>      [1.0 Lead_texture   ]
>    }
>}


Hmmm - you mean something like a gradient map?
Above a certain level it's paint, below a certain level it's wood, and then
put a bit of
turbulence in it, so there is a little paint in the wood area, and a little
wood in the paint area?

This would work for ROUND pencils, where the dividing line is a circle
contained in a plane, but what about the hex pencils? the dividing line is a
complex shape.

It also occurred to me that for the most part, your camera is not going to
be doing a zoom in on the sharpened point :) If it's a desk scene, pencils
might just be decor. Maybe it's more trouble than it's worth to fix this? I
don't know.

A CSG solution that I might tinker with, is subtracting a number of small
diameter, short cylinders, whose long axis is aligned with the side of the
shear_cone and randomly distributed around the perimeter of the pencil.
Alternatively, small, unevenly scaled spheres might work better. This would
approximate 'dings and dent' along that border. Again - the hex pencil is a
much tougher problem.


Post a reply to this message

From: bankspad
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 11:11:14
Message: <3725C15F.3C5D477D@pacbell.net>
Charles Krause wrote:

> >
> >Would it be possible to layer or map the wood and lead textures, then apply
> it
> >as a  _planar_ with some turbulence?
> >really quick example:
> > texture {
> >   planar
> >   turbulence 0.099
> >   texture_map {
> >      [0.6 Wood_texture ]
> >      [1.0 Lead_texture   ]
> >    }
> >}
>
> Hmmm - you mean something like a gradient map?
> Above a certain level it's paint, below a certain level it's wood, and then
> put a bit of
> turbulence in it, so there is a little paint in the wood area, and a little
> wood in the paint area?

No, not a gradient but planar, and not for the paint, just for the tip. The same
method you are using to define the graphite of the pencil (it's lead) remains
the same only you are including two textures stacked on top of eachother and
with some turbulence which cause the two to interact with eachother.

>
>
> This would work for ROUND pencils, where the dividing line is a circle
> contained in a plane, but what about the hex pencils? the dividing line is a
> complex shape.

The above could work for any shape because you are only adjusting the texturing
for the tip which is round ( or conical ) for all pencils.

> It also occurred to me that for the most part, your camera is not going to
> be doing a zoom in on the sharpened point :) If it's a desk scene, pencils
> might just be decor. Maybe it's more trouble than it's worth to fix this? I
> don't know.

(*hee hee*) You're right  ;-]   --  sometimes though it's the small details that
can lead to much larger solutions. This apple I'm working on; Apples are red or
green - we all know that and that is fine - until you try to render one. It
doesn't look right and you wonder why -- apples are red, my apple is red - yet
it looks nothing like an apple. An apple, in fact, is red and/or green and is
the result of several layers of hundreds of shades <rgb&f&t madness - I tell
you>. Realizing this I've struggled to emmulate as well as possible the mapping
and layering of these shades. Am I being completely anal about this pursuit?
Yes, very much so - but also, my scenes have improved off the scale as a result
of a knew, improved and far more impressive understanding of texture, pigments,
normals and interactions. Will I ever finish the apple? I doubt it, it is for me
my Moby Dick - but thanks to it I am a better captain.

>
>
> A CSG solution that I might tinker with, is subtracting a number of small
> diameter, short cylinders, whose long axis is aligned with the side of the
> shear_cone and randomly distributed around the perimeter of the pencil.
> Alternatively, small, unevenly scaled spheres might work better. This would
> approximate 'dings and dent' along that border. Again - the hex pencil is a
> much tougher problem.

that is a very good idea for a solution and holds potential for future affects.


KB-


Post a reply to this message

From: Charles Krause
Subject: Re: Pencil Macro Critique?
Date: 27 Apr 1999 12:27:45
Message: <3725d771.0@news.povray.org>
>
>No, not a gradient but planar, and not for the paint, just for the tip. The
same
>method you are using to define the graphite of the pencil (it's lead)
remains
>the same only you are including two textures stacked on top of eachother
and
>with some turbulence which cause the two to interact with eachother.
>


Oh - you seem to think the lead is a textural device - while I never thought
of that - although NOW it seems obvious. The lead is another cylinder
entirely.


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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