POV-Ray : Newsgroups : povray.binaries.images : Suggestions needed Server Time
4 Nov 2024 17:30:06 EST (-0500)
  Suggestions needed (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Dave Blandston
Subject: Suggestions needed
Date: 26 Apr 2010 09:35:01
Message: <web.4bd595ccbccba2c6cba3fb0f0@news.povray.org>
Hi there,

Currently I'm working on a CSG model of an Mk 2 hand grenade. So far the top
part is finished except for the spoon. I'm having a hard time figuring out how
to construct the actual body of the grenade, though. Does anybody have any
suggestions? Here's a photo of a grenade similar to the one I'm modelling:

http://mysite.verizon.net/moronicon/Mk2Photo.jpg

I know it would be easy to make such a model using modelling software, but I
prefer the challenge of using POV's SDL. I've got a couple ideas about possible
methods but none of my ideas are very good.

Regards,
Dave Blandston


Post a reply to this message


Attachments:
Download 'mk2.jpg' (47 KB)

Preview of image 'mk2.jpg'
mk2.jpg


 

From: Anthony D  Baye
Subject: Re: Suggestions needed
Date: 26 Apr 2010 14:08:50
Message: <4bd5d6b2@news.povray.org>
Dave Blandston wrote:
> Hi there,
> 
> Currently I'm working on a CSG model of an Mk 2 hand grenade. So far the top
> part is finished except for the spoon. I'm having a hard time figuring out how
> to construct the actual body of the grenade, though. Does anybody have any
> suggestions? Here's a photo of a grenade similar to the one I'm modelling:
> 
> http://mysite.verizon.net/moronicon/Mk2Photo.jpg
> 
> I know it would be easy to make such a model using modelling software, but I
> prefer the challenge of using POV's SDL. I've got a couple ideas about possible
> methods but none of my ideas are very good.
> 
> Regards,
> Dave Blandston
> 
> 
> ------------------------------------------------------------------------
> 
I'm seeing an isosurface function combining a sphere (stretched in the y 
direction) and an extruded brick or f_rounded_box...

A.D.B.


Post a reply to this message

From: Le Forgeron
Subject: Re: Suggestions needed
Date: 26 Apr 2010 15:22:45
Message: <4bd5e805$1@news.povray.org>
Le 26/04/2010 20:08, Anthony D. Baye nous fit lire :
> Dave Blandston wrote:
>>
>> ------------------------------------------------------------------------
>>
> I'm seeing an isosurface function combining a sphere (stretched in the y
> direction) and an extruded brick or f_rounded_box...
> 
> A.D.B.

I would suggest a citrus (internal of self-interecting torus: when r>R)
instead of a stretched sphere, without stretch. an enclosing box might
avoid seeing the points of the citrus.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Suggestions needed
Date: 26 Apr 2010 15:53:15
Message: <4bd5ef2b$1@news.povray.org>
Dave Blandston wrote:

> I'm having a hard time figuring out how to construct the actual body
> of the grenade, though.

It's going to end up as a perfume bottle anyway so
why bother with the martial intermediate step? :-P


Post a reply to this message

From: Kenneth
Subject: Re: Suggestions needed
Date: 27 Apr 2010 04:50:00
Message: <web.4bd6a2b55bb1be65ae92d9930@news.povray.org>
"Dave Blandston" <nomail@nomail> wrote:

> Currently I'm working on a CSG model of an Mk 2 hand grenade. So far the top
> part is finished except for the spoon. I'm having a hard time figuring out how
> to construct the actual body of the grenade, though. Does anybody have any
> suggestions?

Would a triangle-mesh object made with POV's HF_Sphere macro qualify as 'SDL'?

Here's a basic idea, some code I came up with (and an image.) It's one way to do
it; there are probably others. Just add a camera and some lights. The code's not
perfect by any means, but it does create that 'pineapple' look. BTW, I could
have used 'pattern' rather than 'pigment' to generate the functions (to do away
with the .gray step)--but the two functions need to be combined anyway, before
being used in the macro. (It accepts only one.)

There's still a problem with the model that I haven't yet been able to solve:
Where the vertical and horizontal indent lines meet, there's a deeper indent at
each intersection. (Or rather, the non-overlapping parts of the lines are raised
farther upward than the intersections.) They *should* all be at the same depth.
Seems there's an odd 'bias' somewhere--probably a result of the pigment values I
used. I just *know* there's a way around this little conundrum. (I may have
solved it years ago, but I can't remember how; I'll have to look back over some
of my old code.)

There are two things that you should definitely play around with, to see the
interesting effect: The HF's resolution, and adding/not adding 'smooth' to it.
The lower the resolution, the more 'slanted' the pineapple chunks become. (It's
a consequence of the rez not being high enough to actually reproduce the
indents' pigment functions.) In this case, it's quite useful!

Ken
--------
#include "shapes.inc"

sky_sphere{pigment{color rgb .7*<.8,.9,1>}}

plane{y,0 pigment{color rgb .8}}

#declare vertical_pigment_function =
function{
 pigment{
  gradient x scale .090
  color_map{
   [0.0 rgb 1]
   [0.75 rgb 1]
   [0.75 rgb 0]
   [1.0 rgb 0]
   }
  warp{spherical orientation y dist_exp 0}
  }
 }

#declare horizontal_pigment_function =
function{
 pigment{
  gradient y scale .10
  color_map{
   [0.0 rgb 1]
   [0.8 rgb 1]
   [0.8 rgb 0]
   [1.0 rgb 0]
   }
  warp{spherical orientation z dist_exp 0}
  }
 }

#declare final_function =
function{
vertical_pigment_function(x,y,z).gray*.5
+ horizontal_pigment_function(x,y,z).gray*.5
        }

// Just to show what the values represent...
//HF_Sphere(
//     Function,
//       UseUVheight,
//         UseUVtexture,
//           Res,
//             Smooth,
//               FileName,
//                 Center,
//                   Radius,
//                     Depth)

object{
HF_Sphere(final_function,0,0,<110,110>,0,"",0,1,.13)
 pigment{color rgb <.5,1,.5>}
 //double_illuminate
 scale <1,1.4,1>
 rotate -5*y
 translate 1.5*y
 }


Post a reply to this message

From: Kenneth
Subject: Re: Suggestions needed
Date: 27 Apr 2010 04:50:01
Message: <web.4bd6a4c65bb1be65ae92d9930@news.povray.org>
Oops, forgot to include the image...


Post a reply to this message


Attachments:
Download 'hand_grenade_test.jpg' (167 KB)

Preview of image 'hand_grenade_test.jpg'
hand_grenade_test.jpg


 

From: Kenneth
Subject: Re: Suggestions needed
Date: 27 Apr 2010 04:55:00
Message: <web.4bd6a5e15bb1be65ae92d9930@news.povray.org>
BTW, I *really* like your rust texture--especially the normal(?) that you used.
It looks bumpy/grainy, but with sort of flattened tops to the bumps. Nice! Care
to share??

Ken


Post a reply to this message

From: Dave Blandston
Subject: Re: Suggestions needed
Date: 27 Apr 2010 05:50:00
Message: <web.4bd6b31e5bb1be65cba3fb0f0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> It's going to end up as a perfume bottle anyway so
> why bother with the martial intermediate step? :-P

That's really funny, but I'm afraid to show my wife your comment in case it
gives her the idea!!!


Post a reply to this message

From: Dave Blandston
Subject: Re: Suggestions needed
Date: 27 Apr 2010 06:05:00
Message: <web.4bd6b5be5bb1be65cba3fb0f0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> BTW, I *really* like your rust texture--especially the normal(?) that you used.
> It looks bumpy/grainy, but with sort of flattened tops to the bumps. Nice! Care
> to share??
>
> Ken

Oops, I forgot to credit the original texture author, Xplo Aristotle. This is a
very useful texture.

//Iron, Rust, and RustyIron by Xplo Aristotle
#local Iron = texture {
   pigment {color rgb .25}
   normal {granite .3 scale .2}
   finish {specular .5 roughness .01 reflection .05 diffuse .8}
} //texture

#local Rust = texture {
   pigment {
      granite
      color_map {
         [0.0 rgb <0.809995, 0.299123, 0.113405> * .8]
         [0.4 rgb <0.209995, 0.096941, 0.031510> * 1.2]
         [0.6 rgb <0.209995, 0.096941, 0.031510> * 1.2]
         [1.0 rgb <0.569986, 0.052720, 0.005707> * .9]
      } //color_map
      scale .5
      turbulence 1
   } //pigment
   normal {wrinkles}
} //texture

#local RustyIron = texture {
   bozo
   texture_map {
      [0 Iron]
      [1 Rust]
   } //texture_map
   turbulence 1
   omega .5
   lambda 2
} //texture


Post a reply to this message

From: Dave Blandston
Subject: Re: Suggestions needed
Date: 27 Apr 2010 06:35:00
Message: <web.4bd6bd1c5bb1be65cba3fb0f0@news.povray.org>
Thank you guys very much for the suggestions. I'm constantly amazed and humbled
by everyone's abilities. This may be a good time to learn some new things that
I've never tried. The isosurface features, as suggested by Anthony D Baye and Le
Forgeron, sound promising.

Kenneth, I'm going to experiment with your code a little. I'm wondering if
increasing the resolution a lot and using a gradient defined by a non-linear
function instead of an abrupt pigment transition could create the curved edges
of the "pineapple" bumps. And, unioning in a plain sphere scaled just right
could cover up those extra indentations handily. Thanks so much for your help!

Regards,
Dave Blandston


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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