Results 1 to 11 of 11

Thread: Need a plugin that reads xyz files

  1. #1
    Registered User Dennik's Avatar
    Join Date
    Jul 2003
    Location
    Winston Salem NC
    Posts
    207

    Need a plugin that reads xyz files

    I need a seemingly easy to make plugin that reads a csv type file like xyz format, with coordinates and color information, and create a 1point poly with it's color value for each entry.
    My problem is no matter what option I tried, I can't load colored pointclouds into modeler as they all come as points only, not 1 point polys. As such they also don't load color information (having no surface).
    Can anyone help me with this?

  2. #2
    http://www2.trueart.pl/?URIType=Dire...ug-Ins/CSV2OBJ

    - - - Updated - - -

    alternatively, convert it to obj.. and load that.. it'll load vertex color info
    Oliver

    OD Tools Purchase Link: http://origamidigital.com/cart
    Vimeo Channel: https://vimeo.com/channels/850417
    Join ODRoot - https://www.odroot.com

  3. #3
    Registered User
    Join Date
    Aug 2016
    Location
    a place
    Posts
    1,929
    just happen to have been doing this this week. try meshlab.

    i had a go with obj, ply, fbx, dae. no luck as the pointcloud may have vert data but it has no material.

    meshlab will do most formats though, if you want xyz it csv

    will give it another go as i assume oliver is correct. i just converted pointcloud to single point polys and ran a gradient through it. perhaps i should have tried vert cols at that point.

  4. #4
    Where can I get a sample file?
    Color can be loaded into vertex color map…
    I attached a test script, but I don't know Python well.
    Test.zip

  5. #5
    Registered User Dennik's Avatar
    Join Date
    Jul 2003
    Location
    Winston Salem NC
    Posts
    207
    test with color2.zip
    Hey thanks for the help.
    Here is a sample .xyz file.
    It has 3 columns for the coordinates and 3 columns I assume with the same rgb value repeated.

  6. #6
    The color values are too large. I divided them into 255.
    Test2.zip

  7. #7
    Registered User Dennik's Avatar
    Join Date
    Jul 2003
    Location
    Winston Salem NC
    Posts
    207
    It worked! Thanks a bunch my friend, I owe you big time!
    Last edited by Dennik; 11-18-2019 at 10:46 AM.

  8. #8
    Thanks. I also got a useful experience.

  9. #9
    Registered User Dennik's Avatar
    Join Date
    Jul 2003
    Location
    Winston Salem NC
    Posts
    207
    One thing I noticed though, my models come in flipped on the x axis. Is it the same on your end?
    edit: Sorry you probably don't have a way to test for this. Here is a pointcloud of a sign attached. It reads backwards when imported.sign.zip
    Last edited by Dennik; 11-18-2019 at 12:32 PM.

  10. #10
    I have a mirror effect too. Coordinates are loaded correctly, but you can add a "minus".
    pt = [-float(row[0]), float(row[1]), float(row[2])]
    or
    pt = [float(row[0]), -float(row[1]), float(row[2])]
    or
    pt = [float(row[0]), float(row[1]), -float(row[2])]

  11. #11
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,617
    Generally better to implement a double/float scale/direction dummy scalar as per-term multiplier in the path. That way, if you need to flip an axis, or rescale one or more on input, it's just a matter of changing the values of those scale/direction scalars on the appropriate axis. Doing so also makes it easy to implement UI "switches" to flip or rescale axes' values dynamically as needed.
    John W.
    LW2015.3UB/2019.1.4 on MacPro(12C/24T/10.13.6),32GB RAM, NV 980ti

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •