5

I'm assuming you opened the file in Notepad. Notepad doesn't recognize some new line formats. The OBJ format does indeed use newlines as delimiters, and your files likely contain them. It's just not looking that way in Notepad. Try opening them in Notepad++ instead: I'll bet they'll appear correctly. To make sure your parser function works correctly on all ...


2

800 MB / 3 minutes = 4.4 MB/sec—a far cry from peak disk bandwidth, which is in the hundreds of MB per second (exact value depends on what kind of disk interface you have). So you're definitely not saturating I/O bandwidth. You should be able to load 800MB into memory in a few seconds. You mentioned converting from .obj to a binary representation, but it ...


2

I have written a command line OBJ manipulation tool myself, which has the representation preservation as one design goal. It does not offer an intermediate form of the model (so it does not "load" it), but rather reads the file line by line and dumps the same line back, unless the requested operation such as scaling or centering needs manipulating the data. ...


1

The number of exporters is irrelevant, since you only need one! The quality of the exporter is more important. If you're writing your own engine, I'd suggest you write your own Blender exporter so you can get it to work exactly the way you want it and support the same feature set that your engine does. The blender python API is easy to work with, the only ...


1

Your first question can only be solved with a custom model processor. You could use something like this: [ContentProcessor(DisplayName = "Custom Model Processor") public class CustomModelProcessor : ModelProcessor { public override ModelContent Process(NodeContent input, ContentProcessorContext context) { Matrix transformMatrix = //Whatever ...


1

The quake 3 "shader" is basically just a description of the rendering parameters, and has little or nothing to do with opengl shaders. Here's an example from your tree package: models/mapobjects/GR_trees/tree6 { cull none nopicmip { map models/mapobjects/GR_trees/tree6.tga alphaFunc GE128 depthWrite rgbGen vertex ...


1

In short, yes, you should split the scene. But I would advise that you use a more programmatic method rather than splitting by hand. And as below, will document my own approach and thoughts. You will reach your own conclusions on what you want to do, I hope this is guide in what does and doesn't work. A lot of game engines to pre-process their scenes ...


1

There's nothing inherently slow or fast about OpenGL, or Java for that matter, when it comes to loading models. The following basic rules apply: You're hitting the disk, so fewer large reads are going to be much faster than lots of small reads. Loading binary files is typically going to be faster than parsing plain text. If the model needs conversion from ...


1

The first line in the following code block is unnecessary: glUniform1i( glGetUniformLocation( shader.getProgram(), ("material." + name + number ).c_str( ) ), i ); glActiveTexture( GL_TEXTURE0 + i ); glBindTexture( GL_TEXTURE_2D, this->textures[i].id ); So remove it, and change the following GLSL code: struct Material { sampler2D texture_diffuse1; ...


1

The problem I had was that I mistakenly put the _element array into the last parameter of glDrawElements when it just needed to be 0. e.g. glDrawElements(GL_TRIANGLES, _elements.size(), GL_UNSIGNED_INT, 0); Not this: glDrawElements(GL_TRIANGLES, _elements.size(), GL_UNSIGNED_INT, &_elements[0]); According to www.learnopengl.com, the last ...


1

I was implementing the skeletal animation code recently, while not for Collada, I did it for GLTF, which is similar to Collada (also from Khronos), although it uses JSON + binary data rather than XML. The understanding is the most important part. Once you understand the theory, the code will flow naturally. For skeletal animation, you need a mesh and a set ...


1

I can find several problems, mainly with your workflow. First it looks like your editor can only show one model at a time anyway. Every time the dialog is launched the editor is cleared. You should use an array or a list to contain the models that are in the editor. editorDesign1.Model = null; ... editorDesign1.Model = contentManager.Load<Model>("...


1

Your draw method shows no translation or rotation of each wall, they will end up on the same spot. Your world matrix should(could) be World = Matrix.CreateScale(wallscale) * Matrix.CreateRotation(wallRotation) * Matrix.CreateTranslation(wallPosition);


1

I had the same issues. Check if you are using LH or RH coordinate system. To use RH (what I would suggest since most tools do) create your projection matrix with : XMMATRIX perspMatrix = XMMatrixPerspectiveFovRH(angle, aspect, 0.1f, 100.0f); XMStoreFloat4x4(m_pProjMatrix, XMMatrixTranspose(perspMatrix)); and when setting up your rasterizer use : ...


Only top voted, non community-wiki answers of a minimum length are eligible