Menu

Vertex colors

2009-08-14
2013-05-28
  • Zoltan Bokor

    Zoltan Bokor - 2009-08-14

    Could you give me some hints how to create a mesh having each vertex a different RGB color ?

     
  • Ashish S

    Ashish S - 2010-03-04

    Hi,

    I am having similar problem. I want to know about "setting color on each vertex of shell/mesh".
    Can anybody suggest a particular sample code, docs?
    Thanks..

     
  • Michail Vidiassov

    The short answer is VertexColor.idtf
    As to sample code - it depends on the level you work with U3D at.
    Highest - idtf+IDTFConverter - you have the example.
    Middle - you rip apart the text file parser part of IDTFConverer,
                   but use the converter part - take a look at the IDTFGen sample
                   in my repackaged version of the lib.
    Low - you call Intel IFX library - look into the code to study how IDTFConverter calls it.
    Lowest - you do everything from the ground up - take a look at jReality U3D support module,
        they have Java U3D writer that is much simpler than Intel code.

    But if vertex colors are used, transparency and lighting get disabled in Adobe viewers.
    So if the color variation is small it becomes hard to see the shape of vertex-colored objects.
    If possible, try to use textures.

     
  • Ashish S

    Ashish S - 2010-03-10

    Hi mvid,

    Thanks for your reply..
    I exported a shell with difuuse vertex colors to pdf file.
    I have observed that in adobe viewer the this shell doesn't show color interpolation. The shell shows changes in lighting effects but colors are not appearing. Interestingly when I turn 'model render mode' to 'vertices', the vertices appear with correct colors.
    I am expecting that in Adobe viewer the shell should appear with interpolated colors on faces as I am setting the colors on vertices. Am I missing any setting on IFXAuthorCLODMesh or it might be problem on Adobe viewer side?

    Thanks for your help,

     
  • Michail Vidiassov

    Upload the problem file somewhere I can pick it up from.
    How does it look in Intel viewer?

     
  • Michail Vidiassov

    How does http://www.iaas.msu.ru/tmp/u3d/VertexColor.pdf appear on your system?
    It shows OK in Adobe Reader 9.3.1 on Windows XP in DirectX 8, 9 and software rendering modes.
    By OK I mean with interpolated colors, not nice…

     
  • Ashish S

    Ashish S - 2010-03-11

    How does http://www.iaas.msu.ru/tmp/u3d/VertexColor.pdf appear on your system?

    Interpolation appears for this file.

    My file works good with rendering mode set to "software". For DirectX9 or DirectX8 colors disappear.
    Could it be a problem with Adobe Reader?

    Thanks,

     
  • Michail Vidiassov

    Does interpolation appear in all rendering modes for VertexColor.pdf and only in software mode for your file?
    Did you try your file on many systems (different Reader versions, different video cards)?
    Depending on the answers your code or Adobe viewer are to be suspected.
    (Well, Adobe viewer has many undocumented limitations, but we have to accept it as given.)

     
  • Ashish S

    Ashish S - 2010-03-15

    Hi mvid,

    Many thanks for your help.

    Does interpolation appear in all rendering modes for VertexColor.pdf and only in software mode for your file?[/quote
    Yes. VertexColor.pdf shows colors in all modes.
    While my file shows color only in "software" rendering mode.

    Did you try your file on many systems (different Reader versions, different video cards)?

    Our team mostly are using NVidia GEForce 8400 GS graphics processors. Couldn't try it on other configs.
    I have handed over the file to the team who can try this.

    I might need your help again.. thanks.. :)

     
  • Ashish S

    Ashish S - 2010-03-15

    Hi mvid,

    Many thanks for your help.

    Does interpolation appear in all rendering modes for VertexColor.pdf and only in software mode for your file?

    Yes. VertexColor.pdf shows colors in all modes.
    While my file shows color only in "software" rendering mode.

    Did you try your file on many systems (different Reader versions, different video cards)?

    Our team mostly are using NVidia GEForce 8400 GS graphics processors. Couldn't try it on other configs.
    I have handed over the file to the team who can try this.

    I might need your help again.. thanks.. :)

     

Log in to post a comment.