The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
2answers
58 views

Instantiation of a GameObject not working for a threading reason

I receive the following error "INTERNAL_CALL_Internal_InstantiateSingle can only be called from the main thread." "Constructors and field initializers will be executed from the loading ...
0
votes
0answers
18 views

OpenGL, glDrawElementsInstanced behaving differently on NVIDIA GPU than AMD

I have an AMD GPU on my desktop, AMD HD 5770. I am working on a project on my desktop for over a year. In the scene, I have instanced grass and instanced trees. Everything is working fine on desktop, ...
1
vote
1answer
54 views

Instanced rendering with ARB_vertex_attrib_binding

I'm trying to separate the vertex format specification from the vertex data. I was able to do that for the mesh vertices successfully. For instanced rendering I wanted to further separate the instance ...
0
votes
1answer
48 views

Transformation problems with hardware instancing in DirectX 11

I'm getting some wonky geometry in my application when trying to use instancing. I'm not sure if I'm doing the mapping of my per instance data wrong. This is how my mapping looks like: XMMATRIX scale ...
1
vote
1answer
88 views

OpenGL poor performace with instanced drawing

I'm just started learning OpenGL and this is my first project besides tutorials. I'm trying to load a huge enginering model: The data is structured in a way that I thought I could use instancing ...
1
vote
1answer
67 views

Instantiation taking too long?

I have a game where there are about 4 empty objects that are my object "spawners". I have two scripts attached to all of them, one that will keep spawning objects from "basictable", and then switch to ...
0
votes
1answer
40 views

Simple switch to instanced draws causes consistent, but incorrect, results

I have dumbed the following code down to "stupid simple" for DirectX and still cannot get any cooperation: g_d3dContext->OMSetRenderTargets(1, ...
-1
votes
1answer
122 views

Do I necessarily need to write a vertex shader to use geometry instancing?

I've quickly read the GPU gem about geometry instancing, there are many wordings and I'm not sure I understand it well. If I understand it well, when you use instancing, if you want to apply ...
0
votes
1answer
72 views

Binding an Instance Matrix with an InputLayout

If I want to bind an instance matrix to a vertex shader, how do I go about it? For example, here is a super-simple VS input: struct VS_IN { float4 Position : POSITION; row_major float4x4 ...
0
votes
1answer
75 views

Instancing effectiviness

At about how many instances would instancing become effective? DirectX dynamic buffers seem to take a little more out of the fps than an immutable one would. So obviously you wouldn't want to make a ...
1
vote
1answer
43 views

Per instance world matrix is 0.0f/NaN

I'm trying to draw some cubes with Hardware Instancing. However they don't get displayed. So I debugged my code, and found the source of the problem: In my VertexShader, the var that has the per ...
1
vote
0answers
58 views

How can I keep vertex order the same on every Instantiate()?

While trying to resolve another question, I have discovered that if I Instantiate() from a prefab, the order of the mesh vertices (and therefore triangles) is inconsistent between instances. This is ...
0
votes
0answers
78 views

How do you use Lua with several game objects / components?

I haven't found a lot of information / tutorials on this subject, so I figured I'd ask here. I would like to use Lua-Alchemy (the Flash port of Lua) to be able to load scripts and run console-like ...
1
vote
1answer
364 views

Draw selected instances of VAO (glDrawArraysInstanced)

I'm using glDrawArraysInstanced to draw multiple instances of a tree at different positions to generate a forest. Is there a way to draw selected instances? For example: I got 100 trees with ...
0
votes
0answers
172 views

Help with instancing: seg fault with glVertexAttribDivisor

I'm trying to get the basics of instancing in OpenGL 3.3 and failing miserably. I'm starting with the Jason McKesson's Depth Buffering tutorial, then modifying it so that only the ...
1
vote
1answer
209 views

When should I use instancing versus a constant buffer?

I've heard something about instancing and understood it's useful for drawing the same object many times with slight changes. It's faster because you call the draw function once per frame and update ...
2
votes
1answer
644 views

Draw call optimization for multiple meshes in DirectX11

I have a large scene in a B3D model, which includes about 120 meshes as in the following pictures: Each mesh contain a vertex buffer and material information such as diffuse, specular, ambient... ...
15
votes
3answers
1k views

Using instancing for everything?

Instancing improves performance (significantly) when rendering multiple (hunders? thousands?) copies of the same mesh at once. But how much overhead does it have when rendering exactly one copy with ...
0
votes
1answer
280 views

why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
0
votes
1answer
179 views

Frustum culling + instancing

I've implemented instancing in my app and right now I have an instance buffer holding position data for all instances. But I'd like to also implement frustum culling which would cull some of the ...
0
votes
1answer
261 views

XNA and HLSL shaders - Instancing using World Matrix array

I have posted this question on StackOverflow and was directed here, so I'll just copy the question: I am attempting to improvise some sort of hardware instancing in my game. I wish to draw multiple ...
0
votes
1answer
494 views

Instancing with the SharpDX toolkit

I am starting on the graphical portion of my project and before I begin I need to get Instancing working. I can do instancing with SharpDX, but not with the Toolkit Models. The main reason I want to ...
3
votes
2answers
796 views

Implementing Geometry Instancing in DirectX

I have a project that I'm doing in Managed DirectX (DX9) where I want to render lots of grass. My current method (many draw calls) is slow, but I've heard Geometry Instancing can fix that. I know ...
-1
votes
1answer
240 views

SharpDX instancing with D3D11

Could anybody provide working code using SharpDX with D3D11, which does instancing and uses SharpDX's content pipeline? I have several problems there. I came to understand that one should use a ...
0
votes
2answers
539 views

Batching elements

I don't understand exactly how batching works. What I have understood: Batching is useful to regroup similar elements together and draw them in one draw call (performance++), currently drawing an ...
0
votes
1answer
391 views

Hardware instancing for voxel engine

i just did the tutorial on Hardware Instancing from this source: http://www.float4x4.net/index.php/2011/07/hardware-instancing-for-pc-in-xna-4-with-textures/. Somewhere between 900.000 and 1.000.000 ...
-2
votes
1answer
1k views

How to draw millions of cubes without idle , model instancing in XNA?

I work for a project in the style of game "Minecraft". I started using the "Model Instancing" in order to generate a large number of cubes possessing an identical model. So far so good. My problem is ...
1
vote
2answers
1k views

How (update,set, apply) dynamically color on a model of a XNA project?

I encounter a problem for set a background color on my model instantiated. I can change the texture but not change color. Is there a parameter for change the color ? Or change the opacity ? I am ...
3
votes
3answers
2k views

How to Bind Multiple Shapes/Models to One Vertex Buffer?

If I have two Vertex Arrays, one for Square, and one for Triangle; what is the best way to bind them to the VertexBuffer? What are the patterns used to write multiple vertices to the VertexBuffer? ...
1
vote
2answers
176 views

What's a good way to programmatically manage a cloneable entity?

Say you have missiles or rockets that a player can fire. What's a good way to programmatically manage the cloning of a base rocket, for example? I can think of 2 ways to do it: Player has a ...
2
votes
1answer
348 views

OpenGL Fast-Object Instancing Error

I have some code that loops through a set of objects and renders instances of those objects. The list of objects that needs to be rendered is stored as a std::map>, where an object of class ...
0
votes
1answer
57 views

Scrolling though objects then creating a new instace of this object

In my game when pressing the right mouse button you will place an object on the ground. all objects have the same super class (GameObject). I have a field called selected and will be equal to one ...
1
vote
1answer
437 views

How should I share variables between instances/classes?

I'm making a game using LOVE, so everything is programmed in Lua. I've been experimenting with using classes and object orientation recently. I've found out that a nice system to use is having most of ...
1
vote
0answers
510 views

Microsoft XNA code sample wont work with blender model [closed]

I downloaded this code sample and integrated it into my game http://xbox.create.msdn.com/en-US/education/catalog/sample/mesh_instancing It works with the model that they supplied, but throws and ...
0
votes
1answer
774 views

XNA: Instancing Cubes, Each Side Different Texture

I am trying to make thousands of instanced cubes, each with a unique texture on each side. Am I going to have to split each cube into 6 instanced faces, or can I unwrap it in such a way the the ...
7
votes
2answers
768 views

Particles/instancing groups in an Entity/Component system

I've been playing with an entity/component/system design recently, and I've come across a couple of stumbling blocks. Instancing Let's say I have a few hundred "things" (asteroids, chickens, ...
0
votes
1answer
328 views

Instancing pixel shader parameters — pass instance data through vertex shader?

I'm working on a deferred shader, and I want to use instancing to draw point lights. From what I understand, I can send the instance data through the vertex shader and pass it through unchanged to ...