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

inkpen3d

Member
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
 

raw-m

Big fan of coffee
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!
 

lertola2

skeptic
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.
 

inkpen3d

Member
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
 
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.
 

Sensei

TrueArt Support
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.
 

raw-m

Big fan of coffee
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.
 

Danner

Pixel Mage
testingimageDPKit.jpg
Works here. VPR is isnta-crash but render works.
 

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:

Danner

Pixel Mage
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:

lertola2

skeptic
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.
 

dpont

Member
View attachment 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.
 

Danner

Pixel Mage
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.
 

raw-m

Big fan of coffee
PS, Mike Greens MGimageToPlanes will create and add all supplied images to a plane size of your choosing. In Layout, Grid Spread will allow you to space them out - there should be a native tool for this. Just made a booklet with this method and it only took a few mins (although in my case, texturing the backside was a massive pain in the.... backside!):

https://www.lightwave3d.com/assets/plugins/entry/grid-spread/
 

couldn't one just make polys cover the backside ?

not sure if that'd work with polymove, though should work with partmove
 
Top Bottom