X3D/VRML Color & Textures

Discussion in 'Bug Reporting' started by ttoinou, Mar 18, 2013.

  1. ttoinou
    ttoinou Member
    Hi all.

    When I upload a X3D file with colored triangles the preview image is monochrome.
    Are the preview images & the 3d viewer in color now or not ?

    Sorry for not answering on " https://feedback.shapeways.com/forums/111989-shapeways-feedba ck/suggestions/2421281-color-3d-viewer" but it doesn't work !

    EDIT :
    The only thing I'm able to upload in color is in X3D a set of IndexedTriangleSet !
    However this doesn't work when I replace the color attribute with a texture..
    Triangulated objects with TriangleSet don't work, and primitives like spheres and cylinders are always monochrome !

    Thanks in advance.
    Antoine.
     
    Last edited: Mar 24, 2013
  2. virtox
    virtox Active Member Moderator
    Do you mean vertex coloring?

    I remember having troubel with vertex colors using x3d.
    VRML worked better when I tried.

    Cheers,

    Stijn
     
  3. ttoinou
    ttoinou Member
    To each vertex of each triangle is associated a color.
    I thought that the inside of each triangle was colored thanks to a barycentric combination of the three colors... Maybe Shapeways does not support that ?

    My code looks like this
    Code:
    [...]
    <Shape>
    <TriangleSet solid='false' ccw='true' colorPerVertex='true' normalPerVertex='true' containerField='geometry'>
    
    <Coordinate point='0.957427144050598 -0.1507 [....] '/>
    <Color color='0 [......] '/>
    
    </TriangleSet>
    </Shape>
    [...]
    
    Here is the object made public and downloadable : https://www.shapeways.com/model/981967/color-tetrahedron.html
     
    Last edited: Mar 19, 2013
  4. virtox
    virtox Active Member Moderator
    Yes that is vertex coloring :)

    Can you try vrml?
     
  5. ttoinou
    ttoinou Member
    Okay I didn't know that :p .
    The thing is that I'm trying to create a software that produce X3D or VRML file in order to create a colored fractal.
    But I'll try to learn it if I have to :) !
     
  6. virtox
    virtox Active Member Moderator
    Well, I think this may be a bug, I figured it was my own files that gave the trouble.

    You can use free Meshlab to convert the models to test quickly if vrml will work.

    And vrml is a dead simple format, should be fun to learn ;)

    Btw, welome to the "club" ;)

    3d color fractals are fun!

     
  7. ttoinou
    ttoinou Member
    Meshlab does not support colors..

    I like your Julia vase !

    I've tried in VRML :
    Code:
    Shape {
    	appearance Appearance {
    		material Material { }
    		texture ImageTexture {
    			url "Untitled.png"
    		}
    	}
    	geometry Cylinder {
          radius 1.3
          height 80.0
      }
    }
    
    It does not work !

    Here is the link to the object made public : https://www.shapeways.com/model/982445/vs-2012-essai-vrml.htm l .
     
    Last edited: Mar 18, 2013
  8. virtox
    virtox Active Member Moderator
    Are you sure you have the latest? Meshlab supports colors just fine!
    My vrml is a bit rusty, so unsure whether you example is correct.

     
  9. wedge
    wedge Member
    ttoinou: the vrml seems corret. Work in my vrml browser.
    Maybe its a good idea to add at the start of the vrml.

    But it is not a tesselatet Objekt. Not sure if shapeways support untesseletet vrml objects.


    Sorry, you don't have permission to perform this action. ?

     
    Last edited: Mar 19, 2013
  10. ttoinou
    ttoinou Member
    Sorry the cylinder is now public.
    What is your VRML Viewer ? I have freeWRL but you can't move the object..
     
  11. wedge
    wedge Member
    ok now with texture it is also colored :)

    I Use the VR/AR-Framework .instantreality (http://www.instantreality.org/)

    But I have a Idee where the Problem can be:
    The Obejct is describe parametric and not teselated. So ther are no texture Coordinates (UW-Map) explicit declared. And it seems the shapeway engine do not generate texture coordinates for parametrcic object. Why shuold it? Normaly all objects are discribed triangulated.
     
  12. ttoinou
    ttoinou Member
    I thought SW accepted WRL.. They should communicate about what they really accept.
    I'll look into this texture coordinates thing.

    That doesn't explain the first issue : Color Tetrahedron .
    I've also tried a textured cylinder in X3D (it doesn't work) :
    Code:
        <Shape>
          <Appearance>
            <Material/>
            <ImageTexture url='"Untitled.png" '/>
          </Appearance>
          <Cylinder radius="1.0" height="80.0">
          </Cylinder>
        </Shape>
     
    Last edited: Mar 19, 2013
  13. ttoinou
    ttoinou Member
    I've succeeded in uploading colored triangles in X3D with IndexedTriangleSet. I don't understand why it works with IndexedTriangleSet and not with TriangleSet...

    But if I upload the same model where I put a texture instead of colors SW doesn't accept it ! (still in X3D, maybe that could work in VRML)
     
    Last edited: Mar 24, 2013
  14. ttoinou
    ttoinou Member
    I tried a textured IndexedFaceSet in VRML and Shapeways does not accept it (it is not precised why).
    It opens well in Meshlab and with Instant Player (with textures of course).
    I really don't see what i'm doing wrong!
    Code:
    NavigationInfo { 
      type [ "EXAMINE", "ANY" ] 
    } 
    Background {
    skyColor [ 1 1 1 ]
    } 
    Transform { 
      scale 1 1 1 
      translation 0 0 0 
      children 
      [ 
    Shape
    {
    appearance Appearance {
    texture ImageTexture { url "TEXTURE.png" }
    material Material {
    ambientIntensity 0.2
    specularColor 0.1 0.1 0.1
    shininess .5
    }
    }
    geometry IndexedFaceSet
    {
    creaseAngle .5
    solid TRUE
    coord Coordinate
    {
    point
    [
    1.14891254901886 -0.180906772613525 48.6943778991699,-0.57445627450943 -0.795805394649506 49.6802253723145,-21.9450969696045 -40.180908203125 -16.6253528594971,-21.9450969696045 -40.180908203125 -16.6253528594971,-0.57445627450943 -0.795805394649506 49.6802253723145,-23.6684665679932 -40.7958068847656 -15.6395034790039,-0.57445627450943 -0.795805394649506 49.6802253723145,-0.57445627450943 0.976712167263031 48.594783782959,-23.6684665679932 -40.7958068847656 -15.6395034790039,-23.6684665679932 -40.7958068847656 -15.6395034790039,-0.57445627450943 0.976712167263031 48.594783782959,-23.6684665679932 -39.0232887268066 -16.7249431610107,-0.57445627450943 0.976712167263031 48.594783782959,1.14891254901886 -0.180906772613525 48.6943778991699,-23.6684665679932 -39.0232887268066 -16.7249431610107,-23.6684665679932 -39.0232887268066 -16.7249431610107,1.14891254901886 -0.180906772613525 48.6943778991699,-21.9450969696045 -40.180908203125 -16.6253528594971,1.16819250583649 0.143330127000809 49.2238540649414,-0.324288666248322 -0.389187723398209 50.0776214599609,1.14891254901886 -0.180906772613525 48.6943778991699,1.14891254901886 -0.180906772613525 48.6943778991699,-0.324288666248322 -0.389187723398209 50.0776214599609,-0.57445627450943 -0.795805394649506 49.6802253723145,-0.324288666248322 -0.389187723398209 50.0776214599609,-0.324288666248322 1.14585757255554 49.1376037597656,-0.57445627450943 -0.795805394649506 49.6802253723145,-0.57445627450943 -0.795805394649506 49.6802253723145,-0.324288666248322 1.14585757255554 49.1376037597656,-0.57445627450943 0.976712167263031 48.594783782959,-0.324288666248322 1.14585757255554 49.1376037597656,1.16819250583649 0.143330127000809 49.2238540649414,-0.57445627450943 0.976712167263031 48.594783782959,-0.57445627450943 0.976712167263031 48.594783782959,1.16819250583649 0.143330127000809 49.2238540649414,1.14891254901886 -0.180906772613525 48.6943778991699,0.346410125494003 0.599999964237213 49.9695930480957,0.346410125494003 0.599999964237213 49.9695930480957,1.16819250583649 0.143330127000809 49.2238540649414,1.16819250583649 0.143330127000809 49.2238540649414,0.346410125494003 0.599999964237213 49.9695930480957,-0.324288666248322 -0.389187723398209 50.0776214599609,0.346410125494003 0.599999964237213 49.9695930480957,0.346410125494003 0.599999964237213 49.9695930480957,-0.324288666248322 -0.389187723398209 50.0776214599609,-0.324288666248322 -0.389187723398209 50.0776214599609,0.346410125494003 0.599999964237213 49.9695930480957,-0.324288666248322 1.14585757255554 49.1376037597656,0.346410125494003 0.599999964237213 49.9695930480957,0.346410125494003 0.599999964237213 49.9695930480957,-0.324288666248322 1.14585757255554 49.1376037597656,-0.324288666248322 1.14585757255554 49.1376037597656,0.346410125494003 0.599999964237213 49.9695930480957,1.16819250583649 0.143330127000809 49.2238540649414,-21.9450969696045 -40.180908203125 -16.6253528594971,-23.6684665679932 -40.7958068847656 -15.6395034790039,-22.2722263336182 -40.456672668457 -17.0756721496582,-22.2722263336182 -40.456672668457 -17.0756721496582,-23.6684665679932 -40.7958068847656 -15.6395034790039,-23.7647094726563 -40.9891891479492 -16.2219009399414,-23.6684665679932 -40.7958068847656 -15.6395034790039,-23.6684665679932 -39.0232887268066 -16.7249431610107,-23.7647094726563 -40.9891891479492 -16.2219009399414,-23.7647094726563 -40.9891891479492 -16.2219009399414,-23.6684665679932 -39.0232887268066 -16.7249431610107,-23.7647094726563 -39.4541435241699 -17.1619205474854,-23.6684665679932 -39.0232887268066 -16.7249431610107,-21.9450969696045 -40.180908203125 -16.6253528594971,-23.7647094726563 -39.4541435241699 -17.1619205474854,-23.7647094726563 -39.4541435241699 -17.1619205474854,-21.9450969696045 -40.180908203125 -16.6253528594971,-22.2722263336182 -40.456672668457 -17.0756721496582,-22.2722263336182 -40.456672668457 -17.0756721496582,-23.7647094726563 -40.9891891479492 -16.2219009399414,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.7647094726563 -40.9891891479492 -16.2219009399414,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.7647094726563 -40.9891891479492 -16.2219009399414,-23.7647094726563 -39.4541435241699 -17.1619205474854,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.7647094726563 -39.4541435241699 -17.1619205474854,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.7647094726563 -39.4541435241699 -17.1619205474854,-22.2722263336182 -40.456672668457 -17.0756721496582,-23.4404201507568 -40.5999984741211 -17.3097286224365,-23.4404201507568 -40.5999984741211 -17.3097286224365,-22.2722263336182 -40.456672668457 -17.0756721496582,-23.4404201507568 -40.5999984741211 -17.3097286224365]
    }
    coordIndex
    [
    
    0 1 2 -1 
    3 4 5 -1 
    6 7 8 -1 
    9 10 11 -1 
    12 13 14 -1 
    15 16 17 -1 
    18 19 20 -1 
    21 22 23 -1 
    24 25 26 -1 
    27 28 29 -1 
    30 31 32 -1 
    33 34 35 -1 
    36 37 38 -1 
    39 40 41 -1 
    42 43 44 -1 
    45 46 47 -1 
    48 49 50 -1 
    51 52 53 -1 
    54 55 56 -1 
    57 58 59 -1 
    60 61 62 -1 
    63 64 65 -1 
    66 67 68 -1 
    69 70 71 -1 
    72 73 74 -1 
    75 76 77 -1 
    78 79 80 -1 
    81 82 83 -1 
    84 85 86 -1 
    87 88 89 -1 ]
    texCoord TextureCoordinate
    {
    point
    [
    0 0, 1 0, 0 1, 1 1
    ]
    }
    texCoordIndex [
    0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1,0 1 2 -1, 2 1 3 -1]
    }
    }
      ]
     }
    
     
  15. stonysmith
    stonysmith Well-Known Member Moderator
    In your posting above, you're missing this header line from the top of the file:
    #VRML V2.0 utf8

    Then, are you uploading a ZIP that includes no folders, and includes the file TEXTURE.png ??
    That file name is case sensitive, etc.
     
  16. stop4stuff
    stop4stuff Well-Known Member
    As I understand, VRML is a 'markup language' intended for online browser viewing, not all functions may work the same with Shapeways for a model upload - basically if it works and looks good with Accutrans3D, it should work with Shapeways (Meshlab can be temperamental with colour models, might show ok, but messes up the save)

    Ah, just remembered why - Meshlab messes up the save because it can cope with overlapping colour geometry, whereas Shapeways does not.

    Paul
     
  17. ttoinou
    ttoinou Member
    It worked !
    Sorry I should have re read the whole thread before complaining...
    Thanks to all of you :) .

    (but there's a lot of things that still don't work.. anyway I'll stick with VRML & IndexedFaceSet)
     
    Last edited: Mar 28, 2013