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

Tomas Mikula tomas.mikula at gmail.com
Tue Jul 28 06:49:35 PDT 2009


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
>



More information about the X3D-Public mailing list