Questions tagged [rendering]
The process of generating an image or series of images from a model by means of computer programming.
1,303 questions
0
votes
1
answer
112
views
In game engines and 3D rendering, which coordinate system results in the least amount of operations to transform and render scenes?
I understand this is a slightly esoteric question, but its something I've constantly asked myself over and over when using various 3D design tools and game engines.
In what way should models be facing,...
0
votes
2
answers
107
views
Do GPUs re-draw a all of a character's vertices/triangles/fragments every frame?
I'm a beginner in game programming and I want someone to confirm my understanding.
Let's say there's a 3D model for a character in the game. This character is made up of triangles. Each vertex in ...
0
votes
1
answer
58
views
Rendering Sprite from tightly packed atlas onto RenderTexture
I'm currently working on a Unity BepInEx Plugin that should allow users to customize certain textures in the game. As part of this, I need to extract sprites from a sprite atlas into individual ...
1
vote
1
answer
86
views
Drawing textures to a RenderTexture + rotating in 90° intervals
For context: I am currently working on a BepInEx Plugin for the Unity-based game Hollow Knight: Silksong. The goal is to be able to replace the base game sprites with custom ones. The game uses Sprite ...
0
votes
0
answers
41
views
How to handle draw events without synchronization issues
So in my game I'm using a message queue for everything, very similar to an event manager or event queue pattern. I've seen that lots of people use them, and they decouple when the event fires and ...
0
votes
1
answer
47
views
How to Render Moon Phases from a Texture2D in Unity Using a Script?
I have a Texture2D of the Moon, and I want to render different moon phases so that it visually matches the examples shown here Celestial Programming : Moon Phase Image Rendering, I've tried several ...
1
vote
0
answers
179
views
Resolution-independent rendering of crisp 2D graphics (non-pixel-art)
I’m a beginner developing a 2D game in SDL2 using C with a visual style that uses crisp high resolution graphics (like geometry dash and Hollow Knight -- not pixel art). I want the game to scale ...
0
votes
0
answers
63
views
LibGDX NullPointerException from a scene 2D Actor calling Pools.obtain()
fire (Event event) method throws the NullPointerException. Trace:
...
0
votes
0
answers
61
views
Same prefab appears very different inside another parent
I am on Unity 6.
I have 2 prefabs: the buildings shown in this picture.
Each of these prefabs includes another prefab, which is the "hexagonal tile".
It's the same "hexagonal tile"...
0
votes
2
answers
311
views
How can I efficiently render lots of moving objects in a game?
I'm using OpenGL but this question should apply generally to rendering.
I understand that for efficient rendering in games, you want to minimize communication between the CPU and GPU. This means pre-...
0
votes
0
answers
91
views
Why is raylib not drawing one corner?
I have simple raylib code here:
...
0
votes
1
answer
130
views
OpenGL doesn't render even though all Objects and Data seems to be correctly set up
No shape seems to show up on screen even though I have meticulously verified everything.
The data set I use which is parsed by my code CORRECTLY(I checked that) to be loaded into a generic array ...
0
votes
0
answers
66
views
Analyzing lag spike in Monogame
The game I am making is having big lag spikes once every 10 seconds or so while running. The spikes seemed to correlate with garbage collection (although I can't be 100% sure), so I thought my problem ...
2
votes
1
answer
118
views
Second URP Lit material shows pink on FBX model exported from Unreal 5
I'm trying to get materials working on a model imported into Unity 6, from Unreal Engine 5, but for some reason one of them isn't showing. I have played around with a few of the settings with no ...
1
vote
1
answer
153
views
How do I render a sector (pie/cake slice) of a circular Unity 2D GameObject?
I have a circular GameObject in Unity 2D with a SpriteRenderer attached.
I want to attach a custom component to my ...
0
votes
0
answers
177
views
How do browsers render text using any font, any modifier (like bold, italic...) so fast?
Background:
I am implementing a 2d renderer using OpenGL and currently working on rendering text.
What I have so far:
you can generate bitmap fonts from given font files (like .ttf). It works by ...
0
votes
0
answers
96
views
Raycast DDA: Wall rendering and floor rendering out of sync
I come for theory help with a classic raycast algorithm (currently, based on DDA). The problem is not with the algorithm itself, but with the floor rendering code.
I left the code of my raycast render ...
0
votes
0
answers
60
views
How to build directional light view / proj matrices in DirectX11?
I think I built my matrices wrong:
...
1
vote
1
answer
186
views
Smooth diagonal movement with 2:1 isometric sprites?
I've made a custom engine that uses 2:1 isometric sprite graphics with a 3D world simulation. Each render tick, I convert each entity's world position into a screen position, and render their sprite ...
1
vote
0
answers
77
views
glBufferData on GL_DRAW_INDIRECT_BUFFER causes rendering isues
I've been writing a renderer in C++ using OpenGL. Recently I wanted to implement indirect batch rendering using glMultiDrawElementsIndirect. When I try to test this ...
1
vote
1
answer
135
views
Why do I see a wireframe when rendering with conservative rasterization and disabled Z writes?
I wrote a shader that implements most ShaderLab commands:
Rendering without anything fancy:
After enabling conservative rasterization:
After disabling Z write:
Ironically, that's exactly what I ...
0
votes
0
answers
74
views
What is the rendering method used in "viewport shading: solid" in Blender?
https://streamable.com/km0hv0
I want to make a low-poly game.
I noticed that in blender in viewport shading mode, when the camera rotates, the face progressively change color, from grey to black, ...
0
votes
0
answers
25
views
Unity 2d Isometric Game - Sprite Overlap issue [duplicate]
I'm making a 2d isometric game in Unity, but my sprites don't render well when they overlap.
For example, in this image the skeleton monster renders behind the dragon, but in an isometric view we ...
1
vote
1
answer
179
views
Holographic principle applied to 3D rendering in video games
When reading about the usual methods of rendering 3D models in game programming one encounters ideas such as the Perspective Projection Matrix (rasterization), Ray tracing and Ray marching. On the ...
1
vote
1
answer
628
views
IDXGIFactory::CreateSwapChain() vs D3D11CreateDeviceAndSwapChain - When to use which for making a swap chain?
I'm following a bunch of tutorial series on how to set up Direct3D 11 for 3D rendering, I'm focusing on the swap chain part for now. The main tutorial series I am following is the one by PardCode on ...
-1
votes
1
answer
147
views
Isometric Rendering Doesn't Align
I've been starting to experiment with 2D rendering, in particular isometric rendering.
So far I've been having issues getting my tiles to line up.
I am currently writing this in Rust using the Bevy ...
0
votes
0
answers
51
views
Unity high res mesh brighter than low res mesh despite using the same material
I'm currently making an LOD system for terrain. I have a high-res mesh:
And a low-res mesh:
As you can see, the high-res mesh is significantly brighter than the low-res mesh. They are definitely ...
1
vote
0
answers
44
views
0
votes
1
answer
99
views
Should tiles from a tileset atlas be separated into individual images when the program loads?
I load a large tileset image in at the start of my program.
To draw the game world, I loop over a 2D array of tile IDs and based on that ID I cut out a 16x16 portion from the tileset and draw that as ...
1
vote
0
answers
72
views
Cannot transform vectors from viewport to world
I started working on a small raytracer project, and i decided to reuse my already existing openGL renderer to do this, i'm using GLM to manage transforms/positions.
However, i stumbled upon a very ...
0
votes
0
answers
155
views
Why is my Gouraud Shading not working correctly?
I am trying to write a 3d Renderer in C using SDL and cgml but my shading seems to be not working correctly. When rendering the teapot I get seams and when I want to render a cube I get a bright white ...
0
votes
1
answer
173
views
Regarding with pixel arrays and textures in SDL2
Currently, the way I render my frames is as follows. I have two arrays of pixels (in SDL_PIXELFORMAT_ABGR8888) called ...
0
votes
0
answers
207
views
How to compute screen-space error for LOD selection?
I'm developing a LOD selection system and I would like to select a LOD level based on screen-space error. Could someone explain how I can accurately compute the screen-space error?
0
votes
1
answer
150
views
Update index buffer in Vulkan at run-time
What is the proper way to update at run-time the index buffer in Vulkan?
Many thanks
2
votes
1
answer
185
views
How to check if an AABB is behind another AABB while isometric depth sorting?
I have an isometric scene in a custom engine where my world sim is 3D, but I'm rendering sprites. To depth sort, I follow the approach in this blog post. Basically: wrap each sprite in an AABB, then ...
3
votes
0
answers
405
views
Avoiding z-fighting when reimplementing Freescape games
I need to avoid z-fighting in exactly co-planar surfaces that are too close to the other solids. I'm re-implementing the Freescape engine in ScummVM (all my code is open-source, available here), and ...
2
votes
2
answers
353
views
In a modern game engine, what parts of the rendering process needs to be handled by the CPU?
In older systems, the CPU calculates the final vertex positions and feeds those, along with material properties, color, lighting info and uv position for each vertex and the GPU renders the image ...
0
votes
0
answers
103
views
Terrain and SpeedTree objects render correctly in Editor, but not in Build in both Legacy and URP
The game runs and shows perfectly in Editor, but when I make a build, terrain and some other objects become invisible. This happens the same in both Legacy (Standard) and URP.
I tried to create shader ...
0
votes
1
answer
73
views
Load vertexes from an obj file
I do have a problem with loading my vertexes.
When I debug my code. I find out the vertexes are loaded. But when i use render doc, I found out the vertexes are not loaded. Only the first line of my ...
1
vote
1
answer
579
views
How to use Subviewports to render a texture for Sprite3D?
Godot 4.2
Background:
In my game prototype, I have a following player entity:
Paperdoll2D has a script that dynamically adds the weapon/armor/etc Sprite2D nodes to the main sprite to "dress-up&...
0
votes
2
answers
217
views
Splatoon like gun in Unity
I want to create a 3D Top Down Battle Royale game in Unity and wanted to add a mechanic to color the floor, walls and ceiling, just like in Nintendo game Splatoon.
I know that you can color a 3D shape ...
0
votes
1
answer
364
views
Textures still show as opaque even when alpha is multiplied by zero
I'm having a some problems with blending in OpenGLES2.0
I'm drawing a texture above a framebuffer (with ARGB channels). When I draw a transparent texture over a solid color, the alpha channel is ...
0
votes
0
answers
54
views
3D object blinks in and out of visibility through canvas
In the Menu scene I have canvas with buttons and some 3D objects that are visible in camera's view.
However one object - "the red prompt Arrow" is jumping in and out of visibility. Like here ...
0
votes
2
answers
478
views
Correctly packing an RGBA color to a single float
I am trying to render a colored quad with LWJGL and OpenGL.
The vertices array is specified in interleaved format and look like this:
...
0
votes
0
answers
293
views
Order-independent rendering of 2D sprites
I am using OpenGL to render sprites, using an orthographic projection.
Each sprite has a position: (x, y, ...
1
vote
1
answer
210
views
White noise on my material after import to UE5 from Blender
Please have a look at the 2 screenshots attached. The first one is from Blender. The second one is UE 5.3.
My first question is why my model in Unreal looks brighter than in Blender?
Do you see kind ...
1
vote
0
answers
60
views
Old color attachments being used after resizing window
I have the following deferred rendering setup:
The first render pass renders the scene to a fixed size image (2048x2048) from the directional light's point of view to one color attachment as a shadow ...
0
votes
0
answers
83
views
Displaying gltf files in web?
What are the easiest ways to display gltf files in web?
The following methods are at least available, is there any other ways:
modelviewer.dev
sketchfab's 3d engine
three.js
meshpage.org's ...
0
votes
0
answers
431
views
Overlapping geometry (Z - Fighting) solution with shader in Unity
I have geometry that is overlapping with other geometry (the floor). So, I used a shader to bring my desired mesh to the top. However, a new problem arose: the shader was rendering not only on top of ...
1
vote
1
answer
723
views
What is the process to transform physics positions in pixel art (ex. Rain World)?
In this video (GDC 2016), Rain World developers explain a lot of the procedural animation process in the game.
However, it is not clear to me how you go from physical locations and bones to the smooth ...