Skip to content

Experiment: Converting 3D models to pixel art in real time#147

Draft
12joan wants to merge 1 commit intodevelopfrom
experiment/3d-model-to-pixel-art
Draft

Experiment: Converting 3D models to pixel art in real time#147
12joan wants to merge 1 commit intodevelopfrom
experiment/3d-model-to-pixel-art

Conversation

@12joan
Copy link
Copy Markdown
Member

@12joan 12joan commented Apr 25, 2026

Converting 3D models to pixel art in real time

This PR demonstrates a technique for rendering 3D models as two-dimensional pixel art sprites. This may prove useful for rendering certain level elements that can appear at arbitrary angles without needing to create a custom sprite for each angle.

image

The 3D model exists as part of the scene, along with its own camera using an URP Universal Renderer (the default 2D renderer will not work). This camera outputs to a low-resolution render texture with its filter mode set to point, preventing anti-aliasing. This render texture can then be rendered to a Raw Image in the scene.

Unsolved problems:

  • The main camera can also see the base 3D object. It may be possible to hide the 3D object so that it is only visible to the 3D camera. This would remove the need to place it far away from the main camera.
  • It is unclear whether the render texture can be rendered to a Sprite Renderer (or similar) rather than a Raw Image, which relies on a canvas. If a canvas must be used, it can be placed in the world space to act as a sprite, although using a sprite directly would be neater.
  • The 3D camera should render with a transparent background.
  • It may be necessary to use a separate render texture asset for each instance of a sprite rendered using this technique. If so, this will severely limit the scalability of this solution.

This demo uses the following 3D model for testing, which is in the public domain: https://makerworld.com/en/models/1046907-mushroom-jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant