Skip to main content
Commonmark migration
Source Link

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

#Geometry method#

Geometry method

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

#Distortion method#

Distortion method

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Depending on the implementation, either method might be faster or provide a better match to your desired result. As both implementations are fairly simple, you could try to implement both and see which one works best for you.

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

#Geometry method#

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

#Distortion method#

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Depending on the implementation, either method might be faster or provide a better match to your desired result. As both implementations are fairly simple, you could try to implement both and see which one works best for you.

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

Geometry method

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

Distortion method

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Depending on the implementation, either method might be faster or provide a better match to your desired result. As both implementations are fairly simple, you could try to implement both and see which one works best for you.

Corrected statement about fasted method, thanks to @MickLH.
Source Link
Miklas
  • 413
  • 2
  • 10

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

#Geometry method#

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

#Distortion method#

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Personally, I would go forDepending on the firstimplementation, either method as it is probably easier andmight be faster to door provide a projection on modern GPU hardware than do image processingbetter match to your desired result. As both implementations are fairly simple, you could try to implement both and see which one works best for you.

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

#Geometry method#

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

#Distortion method#

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Personally, I would go for the first method as it is probably easier and faster to do a projection on modern GPU hardware than do image processing.

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

#Geometry method#

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

#Distortion method#

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Depending on the implementation, either method might be faster or provide a better match to your desired result. As both implementations are fairly simple, you could try to implement both and see which one works best for you.

Source Link
Miklas
  • 413
  • 2
  • 10

This can be implemented as a post-processing kind of effect. (When using Unity/XNA/Dx/OGL/...)

#Geometry method#

Start by creating a mesh that resembles the distortion effect you are looking to achieve. (e.g. model a half cylinder (or cone, sphere, cube, ...), make sure to set the texture coordinates). Render your 2D game as usual, but render the final result into a texture. Then, render the distortion geometry with the texture you just created. You can use the world/view/projection or modify the actual geometry/texture coordinates to control the strength of the distortion. (image 1 shows the regular 2D game, image 2 shows the same texture projected onto a sphere)

Game example Example projected onto a sphere (using blender)

#Distortion method#

Image processing tools often offer distortion effects that could emulate the projection (bit like optical illusions). For example, image 3 was generated using the bulge filter from Paint.Net

Bulge distortion.

(You can find an implementation (OpenGL ES 2.0) of this distortion effect from the GPUImage project - see GPUImageBulgeDistortionFilter)

Personally, I would go for the first method as it is probably easier and faster to do a projection on modern GPU hardware than do image processing.