Skip to content

Mapping

Pete edited this page May 29, 2019 · 12 revisions

For LED strands, there can be at least two types of mapping (so far): Linear and UV mapped.

So far (for the most part) maps have fit into the 256x256 default texture size in TouchDesigner. This means strands have typically not been longer than 256 pixels long, and UV mapped inputs have fit into a 256x256 area (which lines up nicely with 256 values for each color used in a Remap TOP input)

Linear mapping lends itself better to chases and sectional control.

Longer term, linear mapping should be done by making smaller textures of the needed size and then overlaying onto the final raster size. This should allow resizing or moving the map arbitrarily later without having to change all the settings on anything going backwards.

Remap Workflow in TouchDesigner

SOPs define sampling locations. Start with DATs defining endpoints where each SOP unit equals one pixel still need to figure out length vs coordinates mindblock. aka: strip 1 is made up of 3 sections, 60px 30px 45px coordinates 0 60 90 135

but strip is 135 pixels long, coordinates makes a 136 long SOP... so where to subtract that one?

Pattern CHOPs defining interim mapping rasters? aka translating from logical compact raster to physical compact raster Must scale pattern chop's "Ramp Samples" mode to remap maps by scaling to remap's top input pixel size minus one. AKA input is 256 by 256 pixels, pattern chop should be scaled from 0 through 255 to 0 through 1 also make CHOP to TOP (creating remap map) be 32bit float as this should help with possible errors down the line with larger rasters. remap input and output can be 8bit.

remap TOP resolution: custom resx me.inputs[1].width resy me.inputs[1].height

(selects resolution to pull from second input aka output map instead of first input aka raster to sample from)

extend mode seems like it should be hold especially if using a small black rectangle in lower left corner to prevent overfill

input smoothness on common page may need to be nearest pixel. interpolate does seem to add resolution if input content is lower res than overall pixelspace (not sure) but mipmap is definitely not useful. creates unexpected results

Clone this wiki locally