Blender

Blender

Creating Affine Texture Mapping
I was making a project in Blender that looks like a PS1 game and I wanted it to look as authentic as possible. One of the things I'm having trouble with is that the PS1 used a texture mapping method called "affine texture mapping ( https://en.wikipedia.org/wiki/Texture_mapping#Affine_texture_mapping ). And I still haven't found a way to replicate it in blender.
< >
Showing 1-4 of 4 comments
Pte Jack Mar 20, 2019 @ 2:05pm 
Can you give us a screen shot sample from Blender then try to explain the problem and what it is you're trying to do. (I failed mathematics along time ago... LOL). Explaining it outright just might trigger some light bulbs in your process.
Last edited by Pte Jack; Mar 20, 2019 @ 2:06pm
still__alive Mar 20, 2019 @ 2:57pm 
A quick look at your link, and some quick searching myself makes me think that you are not going to find an easy way to replicate it. Sounds like it is a "bad", but cheap way of texture mapping. And with today's hardware the technique is no longer needed so I think people would not build that method into their programs anymore.

But a few links I looked at imply you could do it by writing your own shader to handle it. Can't seem to find any shaders for Blender that someone else has written already. To me, this seems like a very niche project - I don't think you are going to find an easy way of implementing it without doing some coding yourself.

Here are the other few links I found:

https://blenderartists.org/t/disable-perspective-correct-texture-mapping-force-affine-texture-projection/666188

https://blenderartists.org/t/psx-retro-shaders-adapting-unity-shaders-to-bge/661698/13

https://stackoverflow.com/questions/12414708/correct-glsl-affine-texture-mapping
The Renderer Mar 20, 2019 @ 3:02pm 
Maybe it's possible using a complex-ish node setup but I wouldn't even know where to begin. You'd need to manipulate the texture coordinates with a whole bunch of math and do that relative to the 2D view plane and the polygon's projection onto it. Especially that last part I wouldn't know how to do or reference via nodes. Not that I spent more than a few minutes to think about it just now. Look for yourself, maybe you'll find a way.

Else you'll need to dig deep into Blender's code and write an add-on or script to include affine texture mapping, which is probably not that hard thematically (since it's a very simple method) but figuring out how to make that add-on is probably not that easy unless you have experience with those.

Edit: still_alive posted while I wrote this and basically said the same thing. I'll leave my post here anyways.
Last edited by The Renderer; Mar 20, 2019 @ 3:04pm
Pte Jack Mar 20, 2019 @ 7:25pm 
Also the question was asked on Stackexchange in the blender section over 3 years ago and the thread was closed immediately as this was felt to be more of a mathematical concept and not really blender related. But there are other related links in the comments that might link to other things.

https://blender.stackexchange.com/questions/47673/affine-vs-projective-planes

This is way beyond my field of expertise... (which is practically none, LOL)
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Mar 20, 2019 @ 12:46pm
Posts: 4