Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: Assign unique images to each tile of an array of polygons?

  1. #1
    Super Member inkpen3d's Avatar
    Join Date
    Jun 2003
    Location
    amersham, Buckinghamshire, UK
    Posts
    776

    Assign unique images to each tile of an array of polygons?

    Hi folks,

    I am sure that there's a simple nodal solution to this problem, but I am just not seeing it.

    I have (for example) a 20 x 20 array of separate square polygons and I have a set of 400 unique images (i.e. a sequence of images numbered 1 to 400) that I want to apply to each polygon according to the polygon index. The end result should look like a set of different photos laid out in a 20 x 20 grid pattern.

    Can anyone think of an efficient nodal set up that would achieve this result?

    Please note that I don't want to use the multi-key gradient method (i.e. mapping separate images to the individual exposed keys on a gradient and using the polygon index as the input driver) as this would be impracticable to set up for such a large number of images/tiles - I am looking for something that's more procedural and which can handle an arbitarily large number of images/tiles.

    Thanks in advance.

    Peter
    iemedia solutions:
    Web Site
    YouTube Channel
    Scavengers SciFi novel:
    Amazon UK
    Amazon USA

  2. #2
    Big fan of coffee raw-m's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,339
    Chiming in to subscribe just in case but been here before and a quick efficient solution doesn't exist, esp if it's trying to use frames within an image sequence to texture. Some kind of clever UV/sprite with an offset per ID maybe an approach but there's no way of picking out frames. It's been a source of fraustration.

    Would love to hear if there is, however!

  3. #3
    Vacant, pretty vacant pinkmouse's Avatar
    Join Date
    Aug 2003
    Location
    South Yorkshire
    Posts
    1,702
    Yup, I have to back Mark up on this, an easy way isn't possible. Sorry.
    Al
    "I conceive of nothing, in religion, science or philosophy, that is more than the proper thing to wear, for a while." Charles Fort

    My Website
    My Lightwave Tutorials

  4. #4
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,118
    If you are up for doing a little work in a spread sheet you could use the .obj file format to insert your pictures. I think this should work. If you save a .obj file you can open it and its associated .mtl file in Excel. They are both text files and if you get a list of your images you can write formulas that insert each image and surface name in there proper place.

  5. #5
    Super Member inkpen3d's Avatar
    Join Date
    Jun 2003
    Location
    amersham, Buckinghamshire, UK
    Posts
    776
    Thanks for that interesting suggestion lertola2 - I'll investigate further.

    It is pretty ridiculous that you can't do this fairly simple/obvious exercise within LW.

    I might end up having to do it in Houdini or Fusion, which provide far more flexibility!

    Thanks for all your responses to date.

    Regards,
    Peter
    iemedia solutions:
    Web Site
    YouTube Channel
    Scavengers SciFi novel:
    Amazon UK
    Amazon USA

  6. #6
    Member
    Join Date
    Oct 2003
    Location
    Orlando, FL
    Posts
    4,146
    Not sure how "simple" this is. I mean, nodal is fine for one surface, but one node setup to drive 20 (or more) surfaces?

    Seems more like a Python script to me, something to automate a repetitive task. (Clicking each surface giving it a discreet surface name then assigning a discreet/random image to the proper channel)

    Although, Newtek did have something similar that shipped years ago as part of 3D Arsenal. But I believe that was just a template that had pre-built scenes with preassigned surface designations, and you still had to go through each one and point it at the proper image/image sequence.

    But, yeah, I was thinking the same thing with the idea of editing the text file to make the assignments.

  7. #7
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,900
    Use Weight Polygon Groups from TrueArt's Modeling Pack http://modelingpack.trueart.eu
    to assign different weight to each polygon group.

    Example usage of this plugin, 1st video:


    2nd video, "How To Make Digital Counter"
    https://www.youtube.com/watch?v=obkeIjirOK8
    I am making weight maps for each polygon group, in both videos, and using it in Node Editor to make it transparent/opaque or controlling other attribute..

    Then load images, make Image nodes, and plug them to Gradient (Show Output enabled), take randomization node and plug to Gradient Input,
    output from Gradient plug to Surface Color.

  8. #8
    Big fan of coffee raw-m's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,339
    Sensei's WeightPolygonGroup is a LW essential for me! But you still have to connect up each image to each value manually, which is extremely prone to error if you have 20+. I have this problem esp when texturing instances. A tool where you could tell frame x of an image seq to be used on instance x, or even as an array where one image seq nodal output could be used to loop though and texture IDs/polys would be a great feature.

  9. #9
    Click image for larger version. 

Name:	testingimageDPKit.jpg 
Views:	107 
Size:	130.4 KB 
ID:	137681
    Works here. VPR is isnta-crash but render works.

  10. #10
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,118
    Quote Originally Posted by Danner View Post
    Click image for larger version. 

Name:	testingimageDPKit.jpg 
Views:	107 
Size:	130.4 KB 
ID:	137681
    Works here. VPR is isnta-crash but render works.
    That looks very interesting. I will have to try it out.

  11. #11

    option >
    PhotoShop contact sheet (50sec)
    followed by making a simple grid in Modeler (10sec)
    followed by Planar UV (30sec)
    followed by Unweld (1sec).



    not the ultimate way, should work fine though.
    Last edited by erikals; 08-16-2017 at 07:00 AM.
    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  12. #12
    I did a few more tests with the polygon index method, I tried using a subdivided plane that I added a UV using new quad poly map and assigned 30 images at 4k by 4k, and it took forever but it finished. I changed them to 300 images at 1024 and it goes much faster. Next test, what will it do if I render more than one frame.

    Update:

    Images stay in place when rendering a sequence. meaning they don't change with time.

    This method has a huge fault. it's really slow. Only 8% of my processors are used when rendering, so if you are in a hurry this is not practical.
    Last edited by Danner; 08-16-2017 at 09:09 AM.

  13. #13
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,118
    Quote Originally Posted by Danner View Post
    Images stay in place when rendering a sequence. meaning they don't change with time.
    Maybe you can get the animation to play by adding a reference to an animated null to the index. I would be interested in finding out if that works.

  14. #14
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,049
    Quote Originally Posted by Danner View Post
    Click image for larger version. 

Name:	testingimageDPKit.jpg 
Views:	107 
Size:	130.4 KB 
ID:	137681
    Works here. VPR is isnta-crash but render works.
    About Image Map node from DPKit,
    the frame input which allows to get one image
    from a sequence using an index or iD is an experimental feature,
    stability not guaranted.

    Because it is impossible to know how large is the length
    of the sequence, it can't be hold entirely in memory,
    so each image is stored on the fly and per thread,
    you may have faster render by pushing the
    number of threads to the max, beyond the real number of threads.

    Denis.

  15. #15
    Denis, thank you for the tip, and the tools!

    Lertola, No null necesary, just add the current frame to the polygon index before going into the time input. There are many nodes that give you the current frame. I tried with -Pom's nodes Render info- and it worked. Keeping the number of images low makes for very fast tests, it's when the number or resolution is high that things get slow.

Page 1 of 2 12 LastLast

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
  •