Mapping question: Cropping a texture with GridEditor coordonates

Hello. I m using Grid Editor to Mapp on 4 Walls with corners a same video file.

My problem is that Grid Editor is working fine for the mapping, deformations are corrected very nicely
but after i need to scale and translate the texture to make junctions.

Is there any way to get the points from grid editor > crop the original texture and rescale on it ?
(i m not asking masking type)

any ideas, tips ?

thank you

it’s called uv shift as i understand what cha looking for:
so it has to be done before you apply textransform in vertex shader:

float4 xUV

float4 uv = input.uv;
uv.x = lerp(xUV.x,xUV.y+1,uv.x);
uv.y = lerp(xUV.z,xUV.w + 1,uv.y);

hi Antokhio !

hum do you mean something like this ? (long time i didnt put my noze inside a shader…)

vs2ps VS(
    float4 Pos : POSITION,
    float4 TexCd : TEXCOORD0
	float4 input: TRANSFORM)
    //inititalize all fields of output struct with 0
    vs2ps Out = (vs2ps)0;

    //transform position
    Out.Pos = mul(Pos, tWVP);
float4 uv = input.uv;
uv.x = lerp(xUV.x,xUV.y+1,uv.x);
uv.y = lerp(xUV.z,xUV.w + 1,uv.y);

    //transform texturecoordinates
    Out.TexCd = mul(TexCd, tTex);

    return Out;

You have TexCd so you have to use TexCd instead of up or do:

Float4 uv = TexCd;

Then when you multiply with tTex you have to use uv instead.

But when you do that it will shift your left and right border off whole mesh, so what you have to do is to separate your grid on subset for each wall and move textures with texture transform accordingly to what you have.

Basically when I do such stuff I use bezier grid with 2x2 control points for one bezier on each wall segment, then you can use this shader to move edge of each texture so it aligns.

I don’t think I understand the question.

Assuming that the walls are nice rectangles, I am wondering why you are not using Homography instead of grideditor.
then it would be pretty easy to map the images to the right walls and then use texture transforms to place the parts of the video on the right walls.

But it is probably more complicated than that.

hello sunep, its already what i m doing: transform texture.
but no my walls are not clean and straight etc… so the grid editor is ok.

normally if i just use the point editor with 4 points, there should be a way to avoid to manually transform the image ?

Second question, what image of reference are you using ?


As image for adjusting, I normally use the grid itself with no texture and set to wireframe. if you select the resolution of the grid, it is super useful for edgeblended setup. you can align the grids from both projectors perfectly this way and also have an easy to calculate overlap. I know this isn’t a flat edgeblended projection… but the grid is quite helpful to see if the image gets distorted

For this setup, I would use 3 quads with homography and texture transforms.

here @karistouf i made you small example, just connect that to renderer temptarget, and than that texture temp target will give you to your grid texture input, hope that helps (2.5 KB)

Thank you Anthokio for the time you have taken, its just a one projector set.

I m still not using DX11 (yess i know but i stopped to search and search on VVVV since a longtime).

sounds my version of vvvv is outdated also ( a lot of red nodes)

@Sunep, thanks for the wireframe thing, the set is in fact a 4 quads (photo with telephone is not good)

Well, then I would use 4 quads ☺️

a simple question why homography ? it needs a renderer for each quad ?

Not if you use the quad version

Or set the quads to render slice wise

sounds like a job for badMapper:

1 Like

thanks a lot everybody, i think now i have enough to go more ahead !

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.