Questions tagged [instancing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Constant size geometries for glDrawArraysInstanced calls

In my application I can keep the objects constant sized ...
4
votes
1answer
91 views

Data structure for collecting entities for instanced rendering

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 ...
0
votes
0answers
30 views

Unity: What's the difference between SRP batching & GPU Instancing?

I've been researching a lot about Draw calls and how to reduce them, i'm using GPU Instancing and it's amazing, but i did not ...
0
votes
1answer
272 views

Unity: Shader Graph and GPU-Instancing?

Unity Version: 2019.4.1f1 Render Pipeline: URP I created a shader using Unity's ShaderGraph, and i want to apply GPU Instancing ...
0
votes
0answers
52 views

Unity: GPU Instancing with different textures?

I'm making use of Unity's GPU Instancing in my 2D game and it really reduces draw calls significantly when using the same Material and same sprite (texture) on all ...
0
votes
0answers
30 views

Saving mesh and instance data on the GPU?

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 ...
1
vote
1answer
43 views

Efficiently rendering lots of the same mesh in Unity3D, but with different colors?

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 ...
0
votes
1answer
80 views

D3D11 Instancing - Help with sending instance data using two vertex buffers. First, for position and color and Second, for per-instance Matrix Data

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 ...
0
votes
1answer
55 views

Efficient update of instance data for instance rendering

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 ...
1
vote
1answer
61 views

Change object's location at instantiated moment

I'm trying to instantiate object(scene) and set it's spawn position at the spawn time. Here's the code I wrote: ...
0
votes
2answers
80 views

How to access the parent of a cloned prefab?

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? ...
6
votes
1answer
377 views

instancing and GPU skinning

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 ...
0
votes
1answer
232 views

OpenGL C++ Drawing particles instanced performance

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 ...
0
votes
1answer
27 views

Can't get Instantiate working

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: - <...
0
votes
0answers
20 views

I Can't spawn buttons in my Grid. why?

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. ...
0
votes
1answer
51 views

Affecting all instances of a GameObject at once

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 ...
0
votes
1answer
213 views

error X4016: SV_InstanceID semantic cannot be used with 10Level9 targets

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 ...
0
votes
1answer
344 views

Instantiate unity sometimes lags the game some times it doesnt

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 ...
1
vote
0answers
125 views

Unity Graphics.DrawMesh equivalent for Physics?

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 ...
0
votes
1answer
886 views

Enabling / disabling Static objects in Unity

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 ...
1
vote
1answer
683 views

DX12 Passing an Instance Buffer

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 ...
0
votes
1answer
50 views

Spherecast - enabling MeshRenderer of selector target around prefabbed object once hit and disabling Meshrenderer when not hit anymore

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 ...
0
votes
1answer
245 views

Programmatically created instance does not execute any code

I've created a new instance, positioned it, and added it to the scene like this: ...
1
vote
1answer
262 views

Instantiated Object returns Null outside Start method

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 ...
0
votes
1answer
50 views

Errors while instancing particles

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 ...
2
votes
1answer
1k views

How to expose a child node’s texture from the parent in Godot

I built a simple scene that I instanciate at will. Simply a KinematicBody2D as root, containing a Sprite and a ...
1
vote
0answers
193 views

Uniform arrays do not work on every GPU

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,...
1
vote
1answer
375 views

Why don't my generated instances update when I change their prefab?

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 ...
0
votes
2answers
21 views

Is there any way to change the layering of objects in Actionscript 3 without altering the run order?

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 ...
0
votes
1answer
45 views

Unity prefab functionality without files?

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 ...
1
vote
1answer
788 views

No performance gain from instanced rendering?

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 ...
0
votes
2answers
1k views

Unity - Instantiate 2 copies at same time?? (Asteroids clone) C#

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 ...
0
votes
2answers
815 views

Unity - DontDestroyOnLoad - FindObjectsOfType(GetType()).Length is always returning 1

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 ...
1
vote
0answers
294 views

Why are my cached (in an array) gameobjects disappearing?

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 ...
0
votes
1answer
95 views

How to manage instances of (placed) cards and decks in card games?

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 ...
0
votes
1answer
267 views

Get GameObject which instantiated me in Unity

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 ...
0
votes
1answer
334 views

Particle system prefab not instantiated

I am trying to instantiate my fire particle system during runtime like this: ...
0
votes
2answers
160 views

In Theory, how much gain should I expect from instancing in OpenGL for small scene with large meshs?

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 ...
0
votes
1answer
275 views

How to put a reference to my player (already instanced) into a prefab that will be instantiated later [duplicate]

I'm making an enemy in my game. He stands at the side of road with a rocket launcher and fires when you get close. It nearly all works fine, except I just need a reference to the players position so ...
0
votes
1answer
65 views

I have problem understand instantiating new objects in Unity at runtime , help please :)

Hi again you fine folks. So I'm making a driving game and there is going to be some cows in the road you have to dodge. Currently I've laid 3 spawnpoints in the form of flat cubes, with the ...
0
votes
1answer
93 views

Unity: Is there any way for a button to call a function of all clones?

I really don't know off hand. I've got a few ideas but I'm not at my PC to test it. like ButtonisPressed > Clone script etc() ...
1
vote
1answer
340 views

Monogame/XNA Hardware Instancing problem

Here's a youtube video of my problem. https://youtu.be/1zB4q9_sNQI Look at how the hideous cube kinda slides into the terrain and rotates weirdly with the world and from above its vanished into the ...
2
votes
1answer
218 views

Can GPU overload cause rendering inaccuracies?

It was supposed to be a continuous tube, made out of 5000 instanced rings of 60 cubes each (12 triangles each) on my integrated laptop intel GPU card using OpenGL 3.3. That was what I got. The ...
0
votes
1answer
167 views

Instancing mirrored geometry

I'm rendering mirrored geometry by flipping it's world matrix. Before rendering mirrored geometry I set CULL_FRONT rasterizer state (for normal geometry it's ...
0
votes
1answer
178 views

Streaming to VAO VertexBuffer using OpenGL Direct State Access for Instancing

How do i stream to a vertex buffer using Direct State Access? I want to update my vertex buffer of matrices every frame so i can use it in my Shader. This is how i specify my buffer. I do this once ...
0
votes
1answer
497 views

DirectX 11 instance mesh performance

Today my question is a about instance mesh performance in DX 11, the way I do my instancing is the standard way I think, its the same way I did it in XNA. To start with each frame(every 2nd) I build ...
0
votes
2answers
278 views

Game Maker - Create Instance When Health Is 0

I have five objects: obj_Boss, obj_bossHealth, obj_GameOver, ...
1
vote
0answers
1k views

Rendering thousands of circles in pyopengl

I am interested in rendering animated 2D vector graphics in python using PyOpenGL. As an initial test, I am trying to render thousands of pixel-perfect circles drawn using shaders. Here is the current ...
1
vote
1answer
263 views

What is GPU instancing and what are its differences in comparison to standard instancing?

I have been reading a lot of debate on a new feature that will be in Unity 5.4: GPU instancing. I understand the importance of instancing in general, both in terms of saving memory and draw calls. ...
0
votes
1answer
2k views

Unity Singleton accross multiple scenes

I have a game where my code is designed to be on a single scene so I've implemented a singleton like that: ...