The tag has no wiki summary.

learn more… | top users | synonyms

14
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 ...
7
votes
2answers
628 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, ...
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? ...
2
votes
2answers
440 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 ...
2
votes
1answer
280 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... ...
2
votes
1answer
332 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 ...
1
vote
2answers
920 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 ...
1
vote
1answer
147 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 ...
1
vote
2answers
149 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 ...
1
vote
1answer
380 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
1answer
27 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
495 views

Microsoft XNA code sample wont work with blender model [on hold]

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
389 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 ...
0
votes
1answer
113 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
2answers
328 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
321 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 ...
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 ...
0
votes
1answer
712 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 ...
0
votes
1answer
296 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 ...
0
votes
0answers
24 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
27 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 ...
0
votes
0answers
116 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 ...
0
votes
1answer
140 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 ...
0
votes
1answer
162 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
173 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
0answers
42 views

IndexedInstanced logic

I'm using SharpDX.Toolkit with three buffers: two vertex and one index buffer. The first vertex buffer is bound to slot 0 for per-vertex data with following data: static VertexPosition[] vertexData = ...
-1
votes
1answer
197 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 ...
-2
votes
1answer
727 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 ...