[X3D-Public] Can I create a colored shape without any lighteffects?

Bederov, Sergey bederov at cortona3d.com
Tue Jul 28 08:33:30 PDT 2009


Hello Tomas,

The boundary between boxes is actually the second box looking through
the first one. Since the boxes are transparent, they are visible through
each other.

It seems that, if you are modeling a liquid, you really need the boxes
to be semitransparent. Then I'm afraid that there is no universal
solution to this problem. Since the boxes are semitransparent, the
pixels where one box is visible and where two boxes are visible will
have different perceived color.

To make the demonstration more visually appealing, you will have to use
some tricks. For example, if the user is always looking from the same
side, then you can replace boxes by squares. To accommodate for moving
camera, you can divide each box into six squares and change their
transparency based on the viewer position. Though, this can be very
slow...

                                                   Sergey



-----Original Message-----
From: x3d-public-bounces at web3d.org [mailto:x3d-public-bounces at web3d.org]
On Behalf Of Tomas Mikula
Sent: Tuesday, July 28, 2009 5:50 PM
To: x3d-public at web3d.org
Subject: Re: [X3D-Public] Can I create a colored shape without any
lighteffects?

Hello Sergey,

thank you, this is a better result than I had before, but is not
exactly what I wanted. The boundaries between boxes are still visible,
even if the color and transparency of adjacent boxes are the same.
Below is my minimal example. I use the FreeWRL browser.

Regards,
Tomas

<Scene>
       <Transform translation="-0.5 0 0">
               <Shape>
                       <Box size="1 1 1"/>
                       <Appearance>
                               <Material diffuseColor="0 0 0"
emissiveColor="1 0 0" transparency="0.5"/>
                       </Appearance>
               </Shape>
       </Transform>
       <Transform translation="0.5 0 0">
               <Shape>
                       <Box size="1 1 1"/>
                       <Appearance>
                               <Material diffuseColor="0 0 0"
emissiveColor="1 0 0" transparency="0.5"/>
                       </Appearance>
               </Shape>
       </Transform>
</Scene>


On Tue, Jul 28, 2009 at 9:57 AM, Bederov, Sergey<bederov at cortona3d.com>
wrote:
> Hello Tomas,
>
> You can get this effect using the emissiveColor field. This is the
field
> of the Material node and works in both VRML and X3D. The color
specified
> in emissiveColor is added to the lighting calculated according to
> diffuseColor. The default value of diffuseColor is light grey (0.8 0.8
> 0.8), therefore, you will have to disable lighting by setting
> diffuseColor to black (0 0 0). Transparency is specified in the
> transparency field and works with all combinations of diffuseColor and
> emissiveColor.
>
>                                            Sergey Bederov
>
>
>
> -----Original Message-----
> From: x3d-public-bounces at web3d.org
[mailto:x3d-public-bounces at web3d.org]
> On Behalf Of Tomas Mikula
> Sent: Monday, July 27, 2009 10:37 PM
> To: x3d-public at web3d.org
> Subject: [X3D-Public] Can I create a colored shape without any light
> effects?
>
> Hello!
>
> I would like to create a box with specified color and transparency,
> but with no light effects on its faces (all faces would have the same
> color regardless of the angle to the viewer.
>
> What I'm trying to immitate is a liquid environment divided into 1x1x1
> boxes. The color and transparency of each box is determined by the
> concentration of substances in this box. The problem is that the
> borders of the boxes are visible and disturbing. I would like the
> liquid to look continuous.
>
> Thanks for your suggestions!
> Tomas
>
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>

_______________________________________________
X3D-Public mailing list
X3D-Public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org



More information about the X3D-Public mailing list