POV-Ray : Newsgroups : povray.binaries.scene-files : Scene Ruler Server Time
1 Sep 2024 14:29:29 EDT (-0400)
  Scene Ruler (Message 1 to 4 of 4)  
From: Randall Sawyer
Subject: Scene Ruler
Date: 28 Nov 2006 08:40:00
Message: <web.456c3bfe44c2d41f8c37caaf0@news.povray.org>
This is the header of the file:
//  Persistence of Vision Ray Tracer version 3.6 Include File
//  File ruler.inc
//  Author: Randall Sawyer
//  Last updated: 2006.11.28
//  Description: Macro which creates a ruler object.  Parameters specify
//  the dimensions and attributes of the ruler including its orientation.
//  The edge of the ruler at the tick marked '0' will be at < 0, 0, 0 >.

I have been participating in the thread at 'POVRay Topics -> general ->
POVRay Includes Standardization'.  One topic of discussion has been the
need (or lack thereof) of standardizing scene metrics.

Whatever the outcome, it occured to me that if someone were to insert a
ruler into their scene with legible numbers on it, then they could better
communicate to a fellow povver the context of their scene's objects and
textures.  This could eliminate some trial-and-error time on the part of
the receiver of the shared include file.

The ruler isn't highly polished, its intended to be useful, not pretty.

Yours,
Randall


Post a reply to this message


Attachments:
Download 'ruler.inc.zip' (2 KB)

From: nemesis
Subject: Re: Scene Ruler
Date: 28 Nov 2006 09:00:01
Message: <web.456c40caf3e082023976a8750@news.povray.org>
"Randall Sawyer" <sra### [at] yahoocom> wrote:
> Whatever the outcome, it occured to me that if someone were to insert a
> ruler into their scene with legible numbers on it, then they could better
> communicate to a fellow povver the context of their scene's objects and
> textures.  This could eliminate some trial-and-error time on the part of
> the receiver of the shared include file.

thank you, Randall!  This is indeed a welcome and useful idea!  except in
the case of whales, buildings and other huge objects. :)


Post a reply to this message

From: Randall Sawyer
Subject: Re: Scene Ruler
Date: 29 Nov 2006 01:05:00
Message: <web.456d21e2f3e082022441c7220@news.povray.org>
"nemesis" <nam### [at] gmailcom> wrote:
> except in the case of whales, buildings and other huge objects. :)

Good point, nemesis.  I'll address that in a moment.  But first, I
discovered a minor bug in my code.

Line 36 reads:
    #local d = floor( min( max( dir, 0 ), 4) );
It should read:
    #local d = floor( min( max( dir, 0 ), 3) );

Now as to nemesis's good point...

I (or any povver with my "ruler.inc") could modify the macro to include an
additional float parameter which expresses a scale.  Let's call this
parameter 'unit_scale'.  Perhaps we could include an additional string
parameter.  Let's call that one 'unit_tag'.

Now, a user could call a ruler() with 'len' = 10000, 'tick_interval' = 200,
'number_interval' = 1000, 'unit_scale' = 1000, and 'unit_tag' = "K".  Then,
the ruler object would appear with the numbers '0' through '10' etched on
its surface with four short ticks between every two consecutive numbers -
AND - on or beside the ruler would appear a text-based object which reads
"1:1000" or maybe "1:1K".

More about "Scene Ruler":
I might revise my current "ruler.inc" file.  Or, I might just make something
better.  I'm thinking about 1D and 2D transparent rulers with ticks and
numbers floating in space.


Why I believe that "scene ruler objects" are a worthwhile pursuit:

Imagine you've gone to the "Public Includes Library" (or whatever it ends up
being called) on the povray.org site, looking for some nice wood textures.

Imagine that you get to view a rendered sample scene of some attractive
blocks of wood which shows you what you'll get if you download povver A's
"woods.inc" file.

Suppose that the scenes you create are in terms of centimeters, but -
unbeknownst to you - povver A creates scenes using cubits.

So, you download the file, create a new scene to try out one of these new
textures, and end up with objects that look like they're made of bland mud.
 Then, you spend the afternoon trying different scale values for the
textures until you get the one that's just right.

Now, image that povver B also has some attractive wood textures to share.
Povver B's sample scene of attractive blocks includes a ruler object off to
the side.

Looking at the blocks in the scene and at the density of their textures, you
think to yourself, "Those blocks are probably 3 cm x 4cm each."  But then,
you glance over at the ruler and see that by povver B's metric, they are
actually about 0.1 x 0.13 each.  (By the way, povver B renders scenes in
terms of feet.  But, you don't need to know that.)  All you need to know is
to scale povver B's textures by 3/0.1 = 30 and you're good to go!

Perhaps the new "Includes Library" will have a section for "Ruler Macro
Includes."


Post a reply to this message

From: nemesis
Subject: Re: Scene Ruler
Date: 1 Dec 2006 09:20:01
Message: <web.45703910f3e08202f2ff13290@news.povray.org>
I guess some "metric negotiation" between include files is required. :)

Things should be much simpler if we get to agree on some metrics standard.
Those wishing to use it will benefit heavily while those who don't want it
will have to do exactly what they've been doing for ages:  manually scaling
stuff...


Post a reply to this message

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