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

miriam miriam at werple.net.au
Wed Jul 29 04:51:07 PDT 2009


Hi Tomas,

Have you considered using billboards with variable transparency png 
textures on them? If the textures are totally transparent at the edges 
and vary their transparency toward the middle in an irregular fashion 
then there will be no obvious edges. Also, using billboards means you 
can fake the depth without worrying about 3D geometry of things like 
cubes getting in the way.

If you detect the viewer's position and switch the billboards that were 
behind you to further in front again you can (re)use just a limited 
number of billboards so as not to overload the renderer.

I don't know if X3D uses mng format (the animated png format) but if it 
does you could perhaps use that to further add a watery appearance, 
though that might put too much load on the renderer.

Cheers,

	- Miriam

Tomas Mikula wrote:
> 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