[X3D-Public] Can I create a colored shape without any lighteffects?
Tomas Mikula
tomas.mikula at gmail.com
Thu Aug 6 09:36:48 PDT 2009
Hello Sergey,
thank you for explanation, now I understand the idea.
Unfortunately, my browser (FreeWRL) crashes on your example. I append
the output, as John S. might be interested in it.
Tomas
$ freewrl billboards.x3dv
*** glibc detected *** freewrl: free(): invalid next size (fast): 0x08146950 ***
======= Backtrace: =========
/lib/libc.so.6[0xb72b66d0]
/lib/libc.so.6(cfree+0x89)[0xb72b8059]
/usr/lib/libFreeWRL.so.1(do_possible_textureSequence+0x3d1)[0xb7d62431]
/usr/lib/libFreeWRL.so.1(loadTextureNode+0x2a0)[0xb7d63ed0]
/usr/lib/libFreeWRL.so.1(render_PixelTexture+0x25)[0xb7d37d15]
/usr/lib/libFreeWRL.so.1(render_node+0x2d5)[0xb7d16ab5]
/usr/lib/libFreeWRL.so.1(child_Appearance+0x179)[0xb7d4ab89]
/usr/lib/libFreeWRL.so.1(render_node+0x213)[0xb7d169f3]
/usr/lib/libFreeWRL.so.1(child_Shape+0xe9)[0xb7d4ae29]
/usr/lib/libFreeWRL.so.1(render_node+0x213)[0xb7d169f3]
/usr/lib/libFreeWRL.so.1(normalChildren+0x45)[0xb7d4c305]
/usr/lib/libFreeWRL.so.1(child_Billboard+0x42)[0xb7d4ba22]
/usr/lib/libFreeWRL.so.1(render_node+0x213)[0xb7d169f3]
/usr/lib/libFreeWRL.so.1(normalChildren+0x45)[0xb7d4c305]
/usr/lib/libFreeWRL.so.1(child_Transform+0x70)[0xb7d2b4f0]
/usr/lib/libFreeWRL.so.1(render_node+0x213)[0xb7d169f3]
/usr/lib/libFreeWRL.so.1(normalChildren+0x45)[0xb7d4c305]
/usr/lib/libFreeWRL.so.1(child_Group+0xdc)[0xb7d2b65c]
/usr/lib/libFreeWRL.so.1(render_node+0x213)[0xb7d169f3]
/usr/lib/libFreeWRL.so.1(normalChildren+0x45)[0xb7d4c305]
/usr/lib/libFreeWRL.so.1(child_Group+0x84)[0xb7d2b604]
/usr/lib/libFreeWRL.so.1(render_node+0x213)[0xb7d169f3]
/usr/lib/libFreeWRL.so.1(render_hier+0xb7)[0xb7d17097]
/usr/lib/libFreeWRL.so.1(EventLoop+0x386)[0xb7c94bb6]
/usr/lib/libFreeWRL.so.1[0xb7c953e3]
/lib/libpthread.so.0[0xb790f19b]
/lib/libc.so.6(clone+0x5e)[0xb73169ee]
======= Memory map: ========
08048000-0804b000 r-xp 00000000 03:07 7037692 /usr/bin/freewrl
0804b000-0804c000 r--p 00002000 03:07 7037692 /usr/bin/freewrl
0804c000-0804d000 rw-p 00003000 03:07 7037692 /usr/bin/freewrl
0804d000-08161000 rw-p 0804d000 00:00 0 [heap]
b3f00000-b3f21000 rw-p b3f00000 00:00 0
b3f21000-b4000000 ---p b3f21000 00:00 0
b400d000-b400e000 rw-s 00000000 00:07 5668908 /SYSV00000000 (deleted)
b400e000-b400f000 rw-s 00000000 00:07 5636139 /SYSV00000000 (deleted)
b400f000-b404f000 rw-s e3d71000 00:0c 11646 /dev/nvidia0
b404f000-b414f000 rw-s e8113000 00:0c 11646 /dev/nvidia0
b414f000-b4150000 rw-s 36544000 00:0c 11646 /dev/nvidia0
b4150000-b4151000 rw-s e3db1000 00:0c 11646 /dev/nvidia0
b4151000-b4155000 rw-s 36540000 00:0c 11646 /dev/nvidia0
b4155000-b4156000 rw-s e3dc3000 00:0c 11646 /dev/nvidia0
b4156000-b4157000 rw-s 34a4b000 00:0c 11646 /dev/nvidia0
b4157000-b4158000 rw-s 34a4a000 00:0c 11646 /dev/nvidia0
b4158000-b4159000 rw-s ec820000 00:0c 11646 /dev/nvidia0
b4159000-b425a000 rw-s e8011000 00:0c 11646 /dev/nvidia0
b425a000-b4280000 rw-p b425a000 00:00 0
b4280000-b4281000 ---p b4280000 00:00 0
b4281000-b4a81000 rwxp b4281000 00:00 0
b4a81000-b4ac2000 rw-p b4a81000 00:00 0
b4ac2000-b4b26000 rw-p 00000000 00:0c 1116 /dev/zero
b4b26000-b4b27000 rw-s ec001000 00:0c 11646 /dev/nvidia0
b4b27000-b535b000 rw-s e0000000 00:0c 11646 /dev/nvidia0
b535b000-b5384000 rw-p b535b000 00:00 0
b5384000-b53a6000 rw-s 00000000 00:07 0 /SYSV00000000 (deleted)
b53a6000-b53a7000 ---p b53a6000 00:00 0
b53a7000-b5ba7000 rwxp b53a7000 00:00 0
b5ba7000-b5ba8000 ---p b5ba7000 00:00 0
b5ba8000-b63a8000 rwxp b5ba8000 00:00 0
b63a8000-b640f000 rw-p b63a8000 00:00 0
b640f000-b6410000 r-xp 00000000 03:07 5656337
/usr/lib/opengl/nvidia/tls/libnvidia-tls.so.173.14.18
b6410000-b6411000 rw-p 00000000 03:07 5656337
/usr/lib/opengl/nvidia/tls/libnvidia-tls.so.173.14.18
b6411000-b6fbf000 r-xp 00000000 03:07 5656326
/usr/lib/opengl/nvidia/lib/libGLcore.so.173.14.18
b6fbf000-b714c000 rwxp 00bae000 03:07 5656326
/usr/lib/opengl/nvidia/lib/libGLcore.so.173.14.18
b714c000-b7151000 rwxp b714c000 00:00 0
b7151000-b715c000 r-xp 00000000 03:07 6784451
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc_s.so.1
b715c000-b715d000 r--p 0000a000 03:07 6784451
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc_s.so.1
b715d000-b715e000 rw-p 0000b000 03:07 6784451
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc_s.so.1
b715e000-b715f000 rw-p b715e000 00:00 0
b715f000-b7241000 r-xp 00000000 03:07 6784484
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libstdc++.so.6.0.10
b7241000-b7245000 r--p 000e1000 03:07 6784484
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libstdc++.so.6.0.10
b7245000-b7246000 rw-p 000e5000 03:07 6784484
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libstdc++.so.6.0.10
b7246000-b724c000 rw-p b7246000 00:00 0
b724c000-b7383000 r-xp 00000000 03:07 7311639 /lib/libc-2.9.so
b7383000-b7385000 r--p 00137000 03:07 7311639 /lib/libc-2.9.so
b7385000-b7386000 rw-p 00139000 03:07 7311639 /lib/libc-2.9.so
b7386000-b7389000 rw-p b7386000 00:00 0
b7389000-b739d000 r-xp 00000000 03:07 1760592 /usr/lib/libICE.so.6.3.0
b739d000-b739e000 r--p 00013000 03:07 1760592 /usr/lib/libICE.so.6.3.0
b739e000-b739f000 rw-p 00014000 03:07 1760592 /usr/lib/libICE.so.6.3.0
b739f000-b73a1000 rw-p b739f000 00:00 0
b73a1000-b73a4000 r-xp 00000000 03:07 4988691 /lib/libuuid.so.1.2
b73a4000-b73a5000 r--p 00002000 03:07 4988691 /lib/libuuid.so.1.2
b73a5000-b73a6000 rw-p 00003000 03:07 4988691 /lib/libuuid.so.1.2
b73a6000-b73ad000 r-xp 00000000 03:07 4641696 /usr/lib/libSM.so.6.0.0
b73ad000-b73ae000 r--p 00006000 03:07 4641696 /usr/lib/libSM.so.6.0.0
b73ae000-b73af000 rw-p 00007000 03:07 4641696 /usr/lib/libSM.so.6.0.0
b73af000-b73b0000 rw-p b73af000 00:00 0
b73b0000-b73b2000 r-xp 00000000 03:07 7312156 /lib/libdl-2.9.so
b73b2000-b73b3000 r--p 00001000 03:07 7312156 /lib/libdl-2.9.so
b73b3000-b73b4000 rw-p 00002000 03:07 7312156 /lib/libdl-2.9.so
b73b4000-b73b8000 r-xp 00000000 03:07 2207139 /usr/lib/libXdmcp.so.6.0.0
b73b8000-b73b9000 rw-p 00003000 03:07 2207139 /usr/lib/libXdmcp.so.6.0.0
b73b9000-b73bb000 r-xp 00000000 03:07 6246030 /usr/lib/libXau.so.6.0.0
b73bb000-b73bc000 r--p 00001000 03:07 6246030 /usr/lib/libXau.so.6.0.0
b73bc000-b73bd000 rw-p 00002000 03:07 6246030 /usr/lib/libXau.so.6.0.0
b73bd000-b74a5000 r-xp 00000000 03:07 6809179 /usr/lib/libX11.so.6.2.0
b74a5000-b74a6000 r--p 000e8000 03:07 6809179 /usr/lib/libX11.so.6.2.0
b74a6000-b74a9000 rw-p 000e9000 03:07 6809179 /usr/lib/libX11.so.6.2.0
b74a9000-b74f4000 r-xp 00000000 03:07 2207890 /usr/lib/libXt.so.6.0.0
b74f4000-b74f7000 rw-p 0004b000 03:07 2207890 /usr/lib/libXt.so.6.0.0
b74f7000-b74f8000 rw-p b74f7000 00:00 0
b74f8000-b7505000 r-xp 00000000 03:07 4641966 /usr/lib/libXext.so.6.4.0
b7505000-b7506000 r--p 0000c000 03:07 4641966 /usr/lib/libXext.so.6.4.0
b7506000-b7507000 rw-p 0000d000 03:07 4641966 /usr/lib/libXext.so.6.4.0
b7507000-b7508000 rw-p b7507000 00:00 0
b7508000-b751d000 r-xp 00000000 03:07 4642337 /usr/lib/libXmu.so.6.2.0
b751d000-b751e000 r--p 00014000 03:07 4642337 /usr/lib/libXmu.so.6.2.0
b751e000-b751f000 rw-p 00015000 03:07 4642337 /usr/lib/libXmu.so.6.2.0
b751f000-b752e000 r-xp 00000000 03:07 2907366 /usr/lib/libXpm.so.4.11.0
b752e000-b752f000 r--p 0000e000 03:07 2907366 /usr/lib/libXpm.so.4.11.0
b752f000-b7530000 rw-p 0000f000 03:07 2907366 /usr/lib/libXpm.so.4.11.0
b7530000-b7583000 r-xp 00000000 03:07 6803373 /usr/lib/libXaw7.so.7.0.0
b7583000-b7584000 r--p 00052000 03:07 6803373 /usr/lib/libXaw7.so.7.0.0
b7584000-b758a000 rw-p 00053000 03:07 6803373 /usr/lib/libXaw7.so.7.0.0
b758a000-b758b000 rw-p b758a000 00:00 0
b758b000-b7591000 r-xp 00000000 03:07 556226 /usr/lib/libXp.so.6.2.0
b7591000-b7592000 rw-p 00006000 03:07 556226 /usr/lib/libXp.so.6.2.0
b7592000-b75b6000 r-xp 00000000 03:07 7312145 /lib/libm-2.9.so
b75b6000-b75b7000 r--p 00023000 03:07 7312145 /lib/libm-2.9.so
b75b7000-b75b8000 rw-p 00024000 03:07 7312145 /lib/libm-2.9.so
b75b8000-b75c9000 r-xp 00000000 03:07 4925387 /lib/libz.so.1.2.3
b75c9000-b75ca000 r--p 00010000 03:07 4925387 /lib/libz.so.1.2.3
b75ca000-b75cb000 rw-p 00011000 03:07 4925387 /lib/libz.so.1.2.3
b75cb000-b75cc000 rw-p b75cb000 00:00 0
b75cc000-b75ee000 r-xp 00000000 03:07 7141875 /usr/lib/libpng12.so.0.37.0
b75ee000-b75ef000 r--p 00021000 03:07 7141875 /usr/lib/libpng12.so.0.37.0
b75ef000-b75f0000 rw-p 00022000 03:07 7141875 /usr/lib/libpng12.so.0.37.0
b75f0000-b760e000 r-xp 00000000 03:07 2899028 /usr/lib/libjpeg.so.62.0.0
b760e000-b760f000 r--p 0001d000 03:07 2899028 /usr/lib/libjpeg.so.62.0.0
b760f000-b7610000 rw-p 0001e000 03:07 2899028 /usr/lib/libjpeg.so.62.0.0
b7610000-b7847000 r-xp 00000000 03:07 7147166 /usr/lib/libXm.so.4.0.2
b7847000-b7849000 r--p 00237000 03:07 7147166 /usr/lib/libXm.so.4.0.2
b7849000-b785f000 rw-p 00239000 03:07 7147166 /usr/lib/libXm.so.4.0.2
b785f000-b7860000 rw-p b785f000 00:00 0
b7860000-b7864000 r-xp 00000000 03:07 4642046 /usr/lib/libXxf86vm.so.1.0.0
b7864000-b7865000 r--p 00003000 03:07 4642046 /usr/lib/libXxf86vm.so.1.0.0
b7865000-b7866000 rw-p 00004000 03:07 4642046 /usr/lib/libXxf86vm.so.1.0.0
b7866000-b78ee000 r-xp 00000000 03:07 5656323
/usr/lib/opengl/nvidia/lib/libGL.so.173.14.18
b78ee000-b7909000 rwxp 00088000 03:07 5656323
/usr/lib/opengl/nvidia/lib/libGL.so.173.14.18
b7909000-b790a000 rwxp b7909000 00:00 0
b790a000-b791e000 r-xp 00000000 03:07 7310772 /lib/libpthread-2.9.so
b791e000-b791f000 r--p 00013000 03:07 7310772 /lib/libpthread-2.9.so
b791f000-b7920000 rw-p 00014000 03:07 7310772 /lib/libpthread-2.9.so
b7920000-b7923000 rw-p b7920000 00:00 0
b7923000-b792b000 r-xp 00000000 03:07 4642218 /usr/lib/libXi.so.6.0.0
b792b000-b792c000 r--p 00007000 03:07 4642218 /usr/lib/libXi.so.6.0.0
b792c000-b792d000 rw-p 00008000 03:07 4642218 /usr/lib/libXi.so.6.0.0
b792d000-b7997000 r-xp 00000000 03:07 6810454 /usr/lib/libGLU.so.1.3.070300
b7997000-b7998000 r--p 0006a000 03:07 6810454 /usr/lib/libGLU.so.1.3.070300
b7998000-b7999000 rw-p 0006b000 03:07 6810454 /usr/lib/libGLU.so.1.3.070300
b7999000-b79c7000 r-xp 00000000 03:07 1636106 /usr/lib/libglut.so.3.8.0
b79c7000-b79cc000 rw-p 0002d000 03:07 1636106 /usr/lib/libglut.so.3.8.0
b79cc000-b79ea000 r-xp 00000000 03:07 5654562 /usr/lib/libexpat.so.1.5.2
b79ea000-b79ec000 r--p 0001d000 03:07 5654562 /usr/lib/libexpat.so.1.5.2
b79ec000-b79ed000 rw-p 0001f000 03:07 5654562 /usr/lib/libexpat.so.1.5.2
b79ed000-b7b08000 r-xp 00000000 03:07 6592815 /usr/lib/libxml2.so.2.7.3
b7b08000-b7b0c000 r--p 0011b000 03:07 6592815 /usr/lib/libxml2.so.2.7.3
b7b0c000-b7b0d000 rw-p 0011f000 03:07 6592815 /usr/lib/libxml2.so.2.7.3
b7b0d000-b7b0e000 rw-p b7b0d000 00:00 0
b7b0e000-b7b3f000 r-xp 00000000 03:07 6866102 /usr/lib/nspr/libnspr4.so.7
b7b3f000-b7b40000 r--p 00030000 03:07 6866102 /usr/lib/nspr/libnspr4.so.7
b7b40000-b7b41000 rw-p 00031000 03:07 6866102 /usr/lib/nspr/libnspr4.so.7
b7b41000-b7b44000 rw-p b7b41000 00:00 0
b7b44000-b7b47000 r-xp 00000000 03:07 6865967 /usr/lib/nspr/libplc4.so.7
b7b47000-b7b48000 r--p 00002000 03:07 6865967 /usr/lib/nspr/libplc4.so.7
b7b48000-b7b49000 rw-p 00003000 03:07 6865967 /usr/lib/nspr/libplc4.so.7
b7b49000-b7b4b000 r-xp 00000000 03:07 6865940 /usr/lib/nspr/libplds4.so.7
b7b4b000-b7b4c000 r--p 00001000 03:07 6865940 /usr/lib/nspr/libplds4.so.7
b7b4c000-b7b4d000 rw-p 00002000 03:07 6865940 /usr/lib/nspr/libplds4.so.7
b7b4d000-b7be0000 r-xp 00000000 03:07 7399470
/usr/lib/xulrunner-1.9/sdk/lib/libmozjs.so
b7be0000-b7be1000 r--p 00093000 03:07 7399470
/usr/lib/xulrunner-1.9/sdk/lib/libmozjs.so
b7be1000-b7be5000 rw-p 00094000 03:07 7399470
/usr/lib/xulrunner-1.9/sdk/lib/libmozjs.so
b7be5000-b7c63000 r-xp 00000000 03:07 6862591 /usr/lib/libfreetype.so.6.3.20
b7c63000-b7c67000 r--p 0007d000 03:07 6862591 /usr/lib/libfreetype.so.6.3.20
b7c67000-b7c68000 rw-p 00081000 03:07 6862591 /usr/lib/libfreetype.so.6.3.20
b7c68000-b7d90000 r-xp 00000000 03:07 7037653 /usr/lib/libFreeWRL.so.1.22.0
b7d90000-b7d91000 r--p 00128000 03:07 7037653 /usr/lib/libFreeWRL.so.1.22.0
b7d91000-b7d9f000 rw-p 00129000 03:07 7037653 /usr/lib/libFreeWRL.so.1.22.0
b7d9f000-b7f3b000 rw-p b7d9f000 00:00 0
b7f3b000-b7f3f000 r-xp 00000000 03:07 1084111 /usr/lib/libXfixes.so.3.1.0
b7f3f000-b7f40000 rw-p 00003000 03:07 1084111 /usr/lib/libXfixes.so.3.1.0
b7f40000-b7f47000 r-xp 00000000 03:07 4641757 /usr/lib/libXrender.so.1.3.0
b7f47000-b7f48000 r--p 00007000 03:07 4641757 /usr/lib/libXrender.so.1.3.0
b7f48000-b7f49000 rw-p 00008000 03:07 4641757 /usr/lib/libXrender.so.1.3.0
b7f49000-b7f51000 r-xp 00000000 03:07 2410991 /usr/lib/libXcursor.so.1.0.2
b7f51000-b7f52000 r--p 00007000 03:07 2410991 /usr/lib/libXcursor.so.1.0.2
b7f52000-b7f53000 rw-p 00008000 03:07 2410991 /usr/lib/libXcursor.so.1.0.2
b7f53000-b7f55000 rwxp 00000000 00:0c 1116 /dev/zero
b7f55000-b7f71000 r-xp 00000000 03:07 7312321 /lib/ld-2.9.so
b7f71000-b7f72000 r--p 0001b000 03:07 7312321 /lib/ld-2.9.so
b7f72000-b7f73000 rw-p 0001c000 03:07 7312321 /lib/ld-2.9.so
bfd5e000-bfd72000 rwxp bffeb000 00:00 0 [stack]
bfd72000-bfd73000 rw-p bffff000 00:00 0
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
Aborted
On Thu, Aug 6, 2009 at 5:44 PM, Bederov, Sergey<bederov at cortona3d.com> wrote:
> Hello Tomas,
>
>> I didn't know about billboards, I googled them, but I and
>> don't see how they would help me. (If I understood, billboard
>> is A plane that rotates to always face the user.) Anyway, I
>> get the specefication of the concentrations in the liquid as
>> an XML output from a program and am using XSLT to create the
>> visualization in X3D. This would mean that I would have to
>> also generate the png textures by some tool.
>
> Actually a billboard does not have to be a plane, it can be any other geometry. For example, it can be a box that always faces the user with one side.
>
> Miriam's point was to create one PNG texture that is opaque in the middle and transparent at the sides, something like a blurred circle. You can represent each point of data with a Billboard that contains a square with this texture. The squares must be overlapping so that the combination of many circles appears continuous. To vary the color of each data point, you can assign a different color to each shape. If the PNG texture is 2-component (gray+alpha), then the Material's color will "see through" the texture.
>
> Here is a small example. It uses a 2-component PixelTexture instead of PNG.
>
> PROTO DataPoint [
> exposedField SFVec3f pos 0 0 0
> exposedField SFColor color 1 1 1
> ]{
> Transform {
> translation IS pos
> children Billboard {
> axisOfRotation 0 0 0
> children Shape {
> appearance Appearance {
> material Material {
> diffuseColor IS color
> }
> texture PixelTexture {
> image 2 2 2 0xFF00 0xFF00 0xFF00 0xFF80
> }
> }
> geometry IndexedFaceSet {
> coord Coordinate {
> point [-1 -1 0 1 -1 0 1 1 0 -1 1 0]
> }
> coordIndex [0 1 2 3]
> texCoord TextureCoordinate {
> point [.25 .25 1.25 .25 1.25 1.25 .25 1.25]
> }
> }
> }
> }
> }
> }
> DataPoint{pos 0 0 0 color .6 0 0}
> DataPoint{pos 0 0 1 color 1 0 0 }
> DataPoint{pos 0 0 2 color 1 .4 0}
> DataPoint{pos 0 1 0 color 1 0 0 }
> DataPoint{pos 0 1 1 color 1 .4 0}
> DataPoint{pos 0 1 2 color 1 .8 0}
> DataPoint{pos 0 2 0 color 1 .4 0}
> DataPoint{pos 0 2 1 color 1 .8 0}
> DataPoint{pos 0 2 2 color 1 1 .2}
> DataPoint{pos 1 0 0 color 1 0 0 }
> DataPoint{pos 1 0 1 color 1 .4 0}
> DataPoint{pos 1 0 2 color 1 .8 0}
> DataPoint{pos 1 1 0 color 1 .4 0}
> DataPoint{pos 1 1 1 color 1 .8 0}
> DataPoint{pos 1 1 2 color 1 1 .2}
> DataPoint{pos 1 2 0 color 1 .8 0}
> DataPoint{pos 1 2 1 color 1 1 .2}
> DataPoint{pos 1 2 2 color 1 1 .6}
> DataPoint{pos 2 0 0 color 1 .4 0}
> DataPoint{pos 2 0 1 color 1 .8 0}
> DataPoint{pos 2 0 2 color 1 1 .2}
> DataPoint{pos 2 1 0 color 1 .8 0}
> DataPoint{pos 2 1 1 color 1 1 .2}
> DataPoint{pos 2 1 2 color 1 1 .6}
> DataPoint{pos 2 2 0 color 1 1 .2}
> DataPoint{pos 2 2 1 color 1 1 .6}
> DataPoint{pos 2 2 2 color 1 1 1 }
>
> Sergey
>
More information about the X3D-Public
mailing list