POV-Ray : Newsgroups : povray.binaries.images : Barkeep! Another round! Server Time
2 Oct 2024 14:16:55 EDT (-0400)
  Barkeep! Another round! (Message 1 to 3 of 3)  
From: Charles Krause
Subject: Barkeep! Another round!
Date: 8 Apr 2000 20:22:52
Message: <38efcd5c@news.povray.org>
Here's a test run from a Macro/Model that I'm working on, which is a fully
parameterized model of a bar glass.

Except for the tabletop, every object in the scene, even the tray, is
created by sending different parameters to the macro.

The macro is called like this,

#macro bar_glass
        (
        glass_height,
        glass_radius,
        wall_thickness,
        base_thickness,
        outer_rounding_radius,
        inner_rounding_radius,
        glass_material,
        drink_material,
        filled                  // Valid values 0 to 1.0. Determines
       // how 'full' of the drink_material the
       // glass is.
        )

which should be pretty self-explanatory, I hope.

The objects are my attempts at guessing the rough dimensions of a highball
glass (far left and right glasses), a regular drink glass, and a shot glass.
The left and right highball glasses are of slightly different design, even
though they are the same dimensions. The parameter values were just pulled
out of the air, so if you think the glasses are mis-proportioned  that's the
modeler's fault, not the model :> In fact, more realistic dimensions would
be appreciated if any of you happen to know them :>

The 'bottle' in the middle of the tray is just a really big and thick-walled
glass made of from T_Vicksbottle_Glass in glass.inc, and the tray is just a
very short and wide glass made of Soft_Silver from textures.inc.

The 'contents' of the glasses is a very simple material, just a

         texture { pigment { color rgbf<1.0,0.5,0.5,1> } }

statement. Glass material is standard T_Glass2 from Glass.inc. (acrylic
plastic). If you don't like the materials, the model will take any material
as a parameter.

Empty glasses are created by setting the 'filled' parameter to zero, even
though a dummy parameter must by included in the macro call for
'drink_material'.

It's not a terribly complex model, but I've tried to make it as flexible,
yet as easy to use, as possible.

I want to add some code to check and adjust parameters so you don't
accidentally cut holes in the sides of the glass by misadjusting the
parameters, but other than than the model is pretty much done, barring any
really good suggestions from the public at large (you! :>).

Comments, suggestions, and criticism welcome.


Post a reply to this message


Attachments:
Download 'Glasses.jpg' (86 KB)

Preview of image 'Glasses.jpg'
Glasses.jpg


 

From: David Fontaine
Subject: Re: Barkeep! Another round!
Date: 9 Apr 2000 14:22:59
Message: <38F0CA26.905A525F@faricy.net>
Great, now put an olive in it ;-)
A little tip for doing filled glasses; in real life, of course, the refraction
difference from the glass to the liquid makes the liquid appear to go all the
way to the outside edge of the glass, but if you have them actually touch in POV
you get coincident surfaces. To fix it have a slight overlap between the glass
and the beverage, eliminating the air space but without coincident surfaces.

--
___     _______________________________________________
 | \     |_          <dav### [at] faricynet> <ICQ 55354965>
 |_/avid |ontaine        http://www.faricy.net/~davidf/

"The only difference between me and a madman is that I'm not mad." -Dali


Post a reply to this message

From: Charles Krause
Subject: Re: Barkeep! Another round!
Date: 9 Apr 2000 14:32:38
Message: <38f0ccc6@news.povray.org>
David Fontaine wrote in message <38F0CA26.905A525F@faricy.net>...
>Great, now put an olive in it ;-)
>A little tip for doing filled glasses; in real life, of course, the
refraction
>difference from the glass to the liquid makes the liquid appear to go all
the
>way to the outside edge of the glass, but if you have them actually touch
in POV
>you get coincident surfaces. To fix it have a slight overlap between the
glass
>and the beverage, eliminating the air space but without coincident
surfaces.


Thanks :) I was wondering if anyone was going to comment :)

Yes - I know about coincidental suface problems - but I had taken the other
approach - I has scaled the liquid object by <0.999,0.999,1.0>  to avoid
this. I hadn't thought about the airspace problem.


Post a reply to this message

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