Skip to main content

Questions tagged [instancing]

Instancing is a GPU rendering optimization where many objects using the same mesh are rendered in a single draw call, with a separate buffer containing the data that should be unique for each instance of the mesh (including its transformation matrix, and potentially other information like tinting or shader parameters).

Filter by
Sorted by
Tagged with
0 votes
1 answer
150 views

I am trying to efficiently render many 3d game characters: many instances of the same 3d model which can change their positions and z rotations each frame. For reference I'm using OpenGL but this ...
greenlagoon's user avatar
0 votes
0 answers
282 views

I have millions of objects that I want to render. I found that instantiate is not suitable, so I'm using Graphics.RenderMesh which is amazingly fast and light. But here comes the problem: it takes CPU ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
638 views

As far as I can tell instanced rendering is simply a way to separate a single vertex buffer into a buffer for vertex-specific data and instance-specific data. This could be useful for rendering ...
CPlus's user avatar
  • 153
0 votes
1 answer
94 views

I was trying to batch quads with the same texture and blend mode into the single draw call using glDrawElementsInstanced. As long as I use just a position, texture ...
Anton Grant's user avatar
0 votes
1 answer
424 views

I want to draw a selected number of instances using glDrawElements... but I don't know which function to use and how to set the parameters. I set the ...
KennyTan's user avatar
0 votes
1 answer
462 views

I made the below shader to draw a mesh for every pixel on a texture, and color it with that pixel. It iterates through the pixels, correctly drawing and coloring the mesh instances. However it skips ...
Wiley Rush's user avatar
0 votes
0 answers
98 views

I would like to know if there would be any benefit of combing Instance Meshing with quadtrees LoD? Besides the obvious performance improvement of only having one mesh I wanted to try and implement ...
Miguel Myers's user avatar
1 vote
0 answers
392 views

I'm beating my head on trying to get hardware skinning going in my engine. We're using OZZ Animation and TinyGLTF together to animate models. The issue seems to either stem from how OZZ maps their ...
KKlouzal's user avatar
  • 242
2 votes
1 answer
1k views

I am trying to create a Vulkan Storage Space Buffer Object which contains an array of structs for use in my vertex shader. I believe I'm missing something fundamental here because the 1st struct in ...
KKlouzal's user avatar
  • 242
1 vote
1 answer
2k views

I'm having an issue trying to understand the ButtonGroup logic, totally new to GDScript, don't have a clue of what I'm doing. Obviously is wrong. I created a scene that I saved in a folder called &...
raphie's user avatar
  • 113
0 votes
1 answer
498 views

The background of the question is, does it make sense to introduce an if case when drawing a mesh for whether there is instancing or not? This is using DirectX 11 ...
thalm's user avatar
  • 257
1 vote
0 answers
500 views

In my game, the player drives a car and when the car reaches the end of the road, I want a different road prefab to be spawned. I have multiple road prefabs, and want to be able to spawn one when the ...
KillerRobot.blend's user avatar
0 votes
0 answers
119 views

I've got a game that involves voxel-like game object management. Each voxel object snaps to the integer coordinates in Unity's scene, at play time—easy enough to do in the ...
Michael Macha's user avatar
2 votes
1 answer
1k views

I want to delete a scene and re-load it. This code would fail later, because the new "CoolScene" has in fact a different name, something like "@NotSuchCoolName@34", and thus it ...
grokkaine's user avatar
  • 143
1 vote
0 answers
146 views

Building a project in Unreal Engine 4.26 while trying to increase performance of the videogame I ended up using instances of static meshes where possible. This generated an issue: My instantiated ...
Simone Lungarella's user avatar
4 votes
1 answer
419 views

My game, a citybuilder, has many simple entities that rendered via glDrawArraysInstanced. A large city has over 600,000 entities, but most of those entities are one of a few hundred meshes. Every ...
Lone Pine's user avatar
5 votes
1 answer
5k views

Unity Version: 2019.4.1f1 Render Pipeline: URP I created a shader using Unity's Shader Graph, and I want to apply GPU Instancing on this shader, but there is no way to declare per-instance properties ...
Fadi Obaji's user avatar
0 votes
0 answers
517 views

I am trying to optimize drawing a large number of voxels by using GPU instancing in Unity. I am currently using Graphics.DrawMeshInstanced in a script Update(), but it occurred to me that I am still ...
xidyron's user avatar
1 vote
1 answer
635 views

I'm working on a tile based game, where grass is spreading from tile to tile, so soon lots of grass appear on the board. Instancing is on, so the FPS is kind of good, even with 300k triangles (1 ...
Tudvari's user avatar
  • 801
0 votes
1 answer
765 views

So here is the premise: I have 2 vertex buffers buffers whose data and corresponding definition is as follows: Vertex 1: This one contains the per instance data ...
Rudraksha Shah's user avatar
1 vote
1 answer
949 views

I started implementing instanced rendering in my 3D engine, but I quickly stumbled upon some issues that I'm not sure whats the best practice to work around. When I setup my scene, I capture the ...
Greg's user avatar
  • 224
1 vote
1 answer
889 views

I'm trying to instantiate object(scene) and set it's spawn position at the spawn time. Here's the code I wrote: ...
modernator's user avatar
  • 1,223
0 votes
2 answers
1k views

I have a menu that gets populated at runtime with buttons whose text components are based on objects that the game manager has in its databases. At the start, the menu is empty: See that "A" graphic? ...
hatinacat2000's user avatar
6 votes
1 answer
2k views

I'm trying to render a large number of identical rigged entities with independent animation. Compared to standard skeletal animation, I can't compute the pose of each entities and send it to the GPU ...
Kiord's user avatar
  • 101
0 votes
1 answer
625 views

In my 2D Game Engine I'd like to reduce the amount of draw calls. I used to do a draw call for every particle, which yields worst performance. I've tried instanced rendering in OpenGL but my ...
moepmoep12's user avatar
0 votes
1 answer
107 views

I am building a 2D game and I want to fire a bullet from my player whenever the player press certain button. But, When I use instantiate and add force to my rigidbody it won't work. The code is: - <...
Sabin Pyakurel's user avatar
0 votes
0 answers
33 views

Today i was following a tutorial about making a shop, but i got a problem. and i've followed the scripting tutorial, but it seems i can't spawn a button inside the grid when i pressed GetItemButton. ...
Bhaswara Arizon's user avatar
0 votes
1 answer
93 views

I want all instances of a prefab to change their velocity when one of them is clicked, and I think having each object constantly check a variable with a coroutine might not be the best solution. How ...
Hussar's user avatar
  • 15
0 votes
1 answer
1k views

I'm using a variant of the D3D12 UWP template that comes with VS2017 Community Edition and I have two related questions: When I add this italicized and bolded code to the vertex shader signature, I ...
Shawn Eary's user avatar
0 votes
1 answer
1k views

I have a script that instantiates a object lets say every half a second. THis object is of the type .fbx and has a file size of 53kb, lets call this object A. When ...
FutureCake's user avatar
1 vote
0 answers
354 views

I'm working on something where the same graphics mesh is rendered multiple times in the scene. The problem with this is that each of those graphics items have a physics mesh which isn't there in the ...
user3797758's user avatar
  • 3,661
0 votes
1 answer
4k views

The Unity docs clearly explain that game objects marked static should not be moved for performance reasons but I can't find any info regarding enabling / disabling. Almost everything in my games ...
user avatar
2 votes
1 answer
3k views

I'm trying to take the DX12 Cube Demo that comes with VS2017 Community and draw three cubes instead of one. Unfortunately, the VertexShader doesn't seem to be getting my instance data. In my ...
Shawn Eary's user avatar
0 votes
1 answer
110 views

I have an interesting problem - I have been looking up for solutions on this but I think there is something I am missing and I require a little more knowledge. I have a scene and the scene has an ...
Mark Quinn's user avatar
-1 votes
1 answer
551 views

I've created a new instance, positioned it, and added it to the scene like this: ...
Luc's user avatar
  • 192
2 votes
1 answer
899 views

I'm attempting to access an instantiated 'goalTemp' GameObject from a different function inside the same script. I'm getting the information in the Start method, assigning the GameObject find/get ...
Mira's user avatar
  • 139
0 votes
1 answer
90 views

Im creating a particle system of my own, and I have some draw issues with it. It's the first time I use instancing, so it's probable I have some concept errors. First, I create three buffers: one for ...
Cabreira's user avatar
2 votes
2 answers
4k views

I built a simple scene that I instanciate at will. Simply a KinematicBody2D as root, containing a Sprite and a ...
BadgerBadger's user avatar
1 vote
0 answers
465 views

I am trying to implement instanced rendering for objects that repeat, so I came up with idea I could simply group objects that loaded same model files, create array with their Model matrices and so on,...
user avatar
1 vote
1 answer
2k views

I’m making an Editor tool -- a ScriptableWizard -- that instantiates a prefab on a grid. But I find that when I update the prefab, the instances don’t update. When I instantiate prefabs ...
Val's user avatar
  • 113
0 votes
2 answers
129 views

I'm making a simple platformer in Adobe Animate, and I need the player to be layered in front of the stage because of a gimmick in the game. Unfortunately, whenever I change the layering order, it ...
user111981's user avatar
0 votes
1 answer
92 views

Task Display a UI list Assumptions Most UI parts only get their data during runtime UI parts need to be styled in the editor (= before runtime) UI editing should be done with real time preview in the ...
Raphael Schmitz's user avatar
1 vote
1 answer
2k views

I recently worked through this tutorial about instanced rendering. At the end it promises to draw a huge amount of instances of one model without performance drops. So I tried some simple instanced ...
kalidali's user avatar
  • 333
0 votes
2 answers
2k views

I haven't been at my computer learning code or game dev in a few months and am just starting again. I am trying to make a game very similar to Asteroids. In 3d but fixed camera from above so basically ...
Big T Larrity's user avatar
0 votes
2 answers
1k views

I'm trying to have an object with the DontDestroyOnLoad property. I want an object with NetworkIdentity to persist across scenes, so I can have a holder script for ...
Aaron Franke's user avatar
1 vote
0 answers
376 views

First, some context: I am developing a chunk loading system for unity. I load all the chunks as prefabs from disk to an array as a cache. When I need to load a chunk, I instantiate it from the cache ...
Thomas Mathieson's user avatar
0 votes
1 answer
158 views

This question sounds quite specific, but I mean in general, how do you manage something like a card game when it comes to decks (one for player1, one for player2, ...) and placed cards focused on ...
nitwhiz's user avatar
  • 47
1 vote
1 answer
1k views

How can I get a GameObject from another GameObject? If I know, that the GameObject I want to get instantiated(using function Instantite()) the GameObject from which I want to get it. If there is no ...
hellomates's user avatar
0 votes
1 answer
460 views

I am trying to instantiate my fire particle system during runtime like this: ...
Eutherpy's user avatar
  • 125
0 votes
2 answers
908 views

I am trying to implement one-pass stereo rendering in OpenGL for a VR application that I am building. I am implementing this through instancing, so I make one render call ...
Mostafa Abdelraouf's user avatar