POV-Ray : Newsgroups : povray.general : Feature Request: Items belongng to groups Server Time
2 Aug 2024 10:20:31 EDT (-0400)
  Feature Request: Items belongng to groups (Message 1 to 6 of 6)  
From: Allen
Subject: Feature Request: Items belongng to groups
Date: 29 Nov 2004 10:25:00
Message: <web.41ab3eac68021735b6f79dd70@news.povray.org>
This is just a crazy idea and I'm just wondering if anyone thinks this would
be a nice feature if it could even be done.

The idea is that all POV-Ray elements would have support or a 'group'
keyword.  This keyword would take a string parameter that would contain a
comma seperated list of groups that the item belongs to.  Also, special
groups might exist, like 'all'.  Then, you could define some interaction of
various items based on what groups they belong to.  Other keywords would
have to exist for this.

For example, if you had 4 mirrors pointing two 2 sphere (one on top, one on
bottom), and you only wanted the first and third mirror to reflect the top
sphere and the second and fourth to reflect the bottom you could.

In the object for mirror 1 and 3 you could say something like: group
"m1,mirrors"

In 2 and 4 you could say: group "m2, mirrors"

Then, with other additional functionality, in the top sphere you could say:
cast_reflection "-all,+m1"  and int the bottom sphere you could say:
cast_reflection "-all,+m2"

Also, this could be used for group transforms.  You could move many items
belonging to a group or even be more specific and only move items in one
group that is not in another.

For example, this would rotate all items in group m1 that are not in group
m2
group_transform {
  affects "-all,+m1,-m2"

  rotate x*90
}

Again, this is just a crazy idea of mine and I'm curious what others think
of it.


Post a reply to this message

From: ingo
Subject: Re: Feature Request: Items belongng to groups
Date: 29 Nov 2004 11:31:19
Message: <Xns95B0B23DB961Bseed7@news.povray.org>
in news:web.41ab3eac68021735b6f79dd70@news.povray.org Allen wrote:

> The idea is that all POV-Ray elements would have support or a 'group'
> keyword.  This keyword would take a string parameter that would
> contain a comma seperated list of groups that the item belongs to.

You can use 'unions' for most of that. #declare your objects, then 
#declare unions containing more or less of these objects. Objects can be 
in multiple unions.

Ingo


Post a reply to this message

From: =Bob=
Subject: Re: Feature Request: Items belongng to groups
Date: 29 Nov 2004 12:18:38
Message: <41ab59ee@news.povray.org>
"ingo" <ing### [at] tagpovrayorg> wrote in message
news:Xns95B0B23DB961Bseed7@news.povray.org...
[deletions]

: Objects can be in multiple unions.

Would that create the object more than once?
=Bob=


Post a reply to this message

From: Shay
Subject: Re: Feature Request: Items belongng to groups
Date: 29 Nov 2004 13:17:35
Message: <41ab67bf$1@news.povray.org>
Allen wrote:

Light groups are very useful. I think that extending the concept of 
'groups' would be nice. I know nothing about the implementation of such 
a thing, however.

  -Shay


Post a reply to this message

From: ingo
Subject: Re: Feature Request: Items belongng to groups
Date: 1 Dec 2004 14:34:42
Message: <Xns95B2D154D6C6seed7@news.povray.org>
in news:41ab59ee@news.povray.org =Bob= wrote:

> Would that create the object more than once?
> 

I guess so yes, although I don't see a coincident surface effect here:

---%<------%<---
#version 3.6;
global_settings {assumed_gamma 1}
camera {location <2,0,-6.0> look_at <2,0,0>}
light_source {<500,500,-500> rgb 1}

#declare S1=sphere { <0,0,0>, 1}
#declare S2=sphere { <2,0,0>, 1}
#declare S3=sphere { <4,0,0>, 1}

#declare U12=union {
  object {S1}
  object {S2}
}

#declare U23=union {
  object {S2}
  object {S3}
}

object {
  U12
  pigment {rgb 1}
}

object {
  U23
  pigment {rgb <1,0,0>}
  //translate <0,1,0>
}
---%<------%<---
    
 Ingo


Post a reply to this message

From: =Bob=
Subject: Re: Feature Request: Items belongng to groups
Date: 1 Dec 2004 14:55:20
Message: <41ae21a8$1@news.povray.org>
"ingo" <ing### [at] tagpovrayorg> wrote in message
news:Xns95B2D154D6C6seed7@news.povray.org...
: in news:41ab59ee@news.povray.org =Bob= wrote:
:
: > Would that create the object more than once?
: I guess so yes, although I don't see a coincident surface effect here:

Wouldn't it slow rendering way down if there were
repeated transparent objects with media?
=Bob=


Post a reply to this message

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