how to draw colored lines in vrml 1.0 
Author Message
 how to draw colored lines in vrml 1.0

hi,

i try to create colored indexed lines with vrml 1.0 (i don't want to use
version 2), but what ever i do they are only black :(

here is the short file:

#VRML V1.0 ascii

Separator {      
        MatrixTransform {
                matrix  1.0 0.0 0.0 0.0
                                0.0 1.0 0.0 0.0
                                0.0 0.0 1.0 0.0
                                0.0 0.0 0.0 1.0
        }

        Coordinate3 {
        point [
                        0.0  0.0  0.0,
                        10.0  0.0  0.0,
                        0.0  10.0  0.0,
                        0.0  0.0  10.0,      
        ]
    }

        IndexedLineSet {
                coordIndex [
                        0, 1, -1,
                        0, 2, -1,
                        0, 3, -1
                ]
        }

Quote:
}

i tried already to define the material, but without result...

thanks for helping me,

matthias weber



Fri, 15 Aug 2003 17:03:49 GMT  
 how to draw colored lines in vrml 1.0
Quote:
> i try to create colored indexed lines with vrml 1.0 (i don't want to use
> version 2), but what ever i do they are only black :(

why are u restricting yourself to VRML 1.0?
db


Sat, 16 Aug 2003 17:23:35 GMT  
 how to draw colored lines in vrml 1.0

Quote:
> i want to test arbitrary matrices and their results. in vrml 2.0 only
> standard transformations are possible...

you can create VrmlMatrix objects within Script nodes (using
ECMA/JavaScript) these have a function:
"void getTransform(SFVec3f translation,
                         SFRotation rotation,
                         SFVec3f scale)
Decomposes the VrmlMatrix and returns the components in the passed
translation, rotation, and scale objects. The types of these passed objects
is the same as the first three arguments to setTransform. If any passed
object is not sent, or if the null object is sent for any value, that value
is not returned. Any projection or shear information in the matrix is
ignored."
its not as good as a pure matrix, but an alternative, and instead of just
using arbitrary matrices u can set specific transformations and see the
effect these have on the matrix.
i'll have a look and see if i can find that info for VRML 1.0 though
db


Sun, 17 Aug 2003 05:04:24 GMT  
 how to draw colored lines in vrml 1.0

I checked your code and it is fine. However, if you use a vrml2.0 browser
and rely on its automatic conversion to display the result you'll enconter
problems. Arbitrary transform will be ignored, which is probably not what
you want. The only fully vrml1.0 compliant (that is, *with* arbitrary - non
affine - transform implemented) browser I know is VRMLView.

I've tested your code with Cosmo and VRMLView.
Cosmo (vrml1tovrml2) wont convert the arbitrary (non affine) transform (but
standard transformation will be converted), and you have to add a Material {
emissiveColor 1 1 1}  to show up the result.

Sylvain Carette
VRML designer-composer

Quote:

> hi,

> i try to create colored indexed lines with vrml 1.0 (i don't want to use
> version 2), but what ever i do they are only black :(

> here is the short file:

> #VRML V1.0 ascii

> Separator {
>         MatrixTransform {
>                 matrix  1.0 0.0 0.0 0.0
>                                 0.0 1.0 0.0 0.0
>                                 0.0 0.0 1.0 0.0
>                                 0.0 0.0 0.0 1.0
>         }

>         Coordinate3 {
>         point [
>                         0.0  0.0  0.0,
>                         10.0  0.0  0.0,
>                         0.0  10.0  0.0,
>                         0.0  0.0  10.0,
>         ]
>     }

>         IndexedLineSet {
>                 coordIndex [
>                         0, 1, -1,
>                         0, 2, -1,
>                         0, 3, -1
>                 ]
>         }
> }

> i tried already to define the material, but without result...

> thanks for helping me,

> matthias weber



Sun, 17 Aug 2003 12:43:06 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VRML 1.0 vertex color how ?

2. Solution to force the display of lines drawn with the order :line

3. VRML 2.0 to VRML 1.0 Converter

4. VRML 2.0 compliant version of LodeStar or VRML 2.0->1.0 converter

5. Converte VRML 1.0 to VRML 2.0

6. VRML 1.0 to VRML 2.0

7. VRML 2.0 to VRML 1.0 converter

8. converting VRML 1.0 to VRML 2.0

9. ANNOUNCE: mkWidgets 1.3, mkHttpd 1.0, mkTulip 1.0, mkZiplib 1.0, mkGeneric 1.3

10. 8-bit color draw problem

11. Stippled text on a canvas drawn in the wrong place using the wrong color

12. drawing color box

 

 
Powered by phpBB® Forum Software