Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Feb 2012
Online Last Active Today, 05:34 AM

#5311763 correct modeling for game developement (poly count)

Posted by on 21 September 2016 - 05:11 AM

What I answered before is still valid for your clarification.


Sometimes, some engines require to know each part of a thing, let's say, as you talked about it, a building. Doing so, will allow to easily tell to the game editor that this is a wall, this is not a wall, this is a room, this is a door. Each of them will be recognized as different things in the engine: the walls will allow to split the building into different areas, or to tell that all what is behind cannot be seen (major occluder), the doors will allow to create portals in between these areas, and so on...


All of this is generally done so that to improve the performance of the rendering engine. Nowadays, this is less true, but some engines still require to tell that this geometry is a major occluder, this area is a portal, this set of walls is considered as a portal area...


And even if the engine does not require to know all of this, or if the engine editor allows to select sub-pieces of the geometry, people will tend to have different manners to work. For example, when you dispatch a building into many pieces, some pieces might be easily reused. For example, you can reuse the doors in several locations, so this will allow to save the amount of geometry, thus allowing to require less memory to the graphic card, thus allowing the engine to do some instancing...


Hope I went on your direction this time :)

#5311754 correct modeling for game developement (poly count)

Posted by on 21 September 2016 - 03:02 AM

That's it. We can do so in order to avoid artifacts for example, z-fighting issues, aliasing with textures...


Game editors (or engine editors) are not modelers. They might most of them provide tools to work on or create the models, but they are not meant to modelize.

For things like walls, first because this is easy to model, and also because walls could help the engine having better performances (occluders and such), one would generally model them directly in the editor. But they could also be imported from a model (for example if the wall has a lot of geometry details, like holes, hills and other discontinuities).

But for more complex things (characters, cars, trees and so on), people will tend to model them in a modeler, create different levels of details, and different normal maps, then import them in the editor.


This is my knowledge about this. Real game developers will give more exact answers :)

#5311749 correct modeling for game developement (poly count)

Posted by on 21 September 2016 - 01:49 AM

Normal-mapping is an imagery-effect to move the details from the geometry (triangles) into the texture. This fakes the geometry detail on the image and since you provide extra normal values which are (generally) non-linear between each vertex of a face, then you lit the geometry as if it was not flat (but it is). This works well as long as the faces do not cover a too-big region in the screen.


This is why you need both the explanations mentioned above: put a higher-detailed normal-map into a lower-poly geometry, and have different levels of details of the geometry (and the normal-map) and choose accordingly, depending on the screen coverage.

#5311359 Why do most people recommend Python

Posted by on 19 September 2016 - 02:41 AM

In the end, all programming languages are the same, in logic...


Not really. Functional and imperative language have a different logic. You can also see this.


Otherwise, I really tend to avoid using languages made by a company, with real economic or users-join-our-new-religion purposes. And even if afterward this language will enter an ISO process (like C#). And mostly if this language had become well-known after a lot of marketing things.


So my two cents are: don't use a language because there's a lot of ads about it. If you really want to study what language should be best for you, then




Since the day I wanted to start programming.....Python....Python everywhere. Yes, it could be easy and close to our spoken language but...isn't time to stop recommending python, and recommend something as easy but modern??? Yes, I am talking about Swift...


is too small...


Don't forget that a language is a toolbox, not a tool. New languages will tend to change a lot, will lack support of many things at the early ages.

#5311036 Getting started with OpenGL development in linux

Posted by on 16 September 2016 - 12:10 AM

Some links that might be useful:


https://www.opengl.org/wiki/Platform_specifics:_Linux (don't use the code at the end)


https://www.opengl.org/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib (you can use this code to create a window). But you can also use glut (check for freeglut in your distro packages).




On nVidia at least and as far as I know, you're not obliged to get the GL functions/extensions pointers. But it seems that every one does this since it is more portable.


Only nVidia now (and probably the latest drivers for the latest graphic cards on AMD) allow to do OpenGL without requiring Mesa. You will then need to install the official drivers, just like under Windows. Sometimes (even often) they can be provided with your distribution as different packages.

#5310877 Edge smoothing

Posted by on 15 September 2016 - 12:56 AM

It also seems that your solution ended up showing some artifacts on some edges (see your bottom left cube, the one with the yellow ball).


Or is it due to something else (slight motion in the camera, difference in lighting maybe) ?


Also, I really love your images. Some people have very nice imagination, and it's needless to say (but I'll tell it anyway) that it helps a lot when wanting to show what you do. Congrats.


PS: sorry for the out of topic...

#5310747 C++ Going Beyond Basics

Posted by on 14 September 2016 - 07:25 AM

I started with the Hello World code, then learned more and created a program on my own where the program asks questions and you answer (input, output). I have difficulties going beyond that. What I mean is, I do not have any ideas of what I should code next...


One of the first C++ program I started to develop when I thought I became comfortable enough was a very little physics simulator, implementing most the concepts I learned in school (law of motion, gravity, force exchanges...). That naturally brought me to having to represent this in 3D. But the fact that it cannot look humble, this was of course modest, and this allowed me to learn a lot many aspects of programming that I misunderstood or so.


I believe that once you have made many little programs, start with something that can be very big. This allows you to learn and as important too, to discover what you are interesting with the most. I guess this is with that project (which at the end included physics, GUI, 3D and so on) that I realized that I prefer to focus on rendering and having good design in my code.


Then I switch to make little 2D and 3D games which made me realize that even if I prefer to do the rendering and design, I feel more comfortable on doing the background (here all the rendering internals).


So my two cents are, if you still think you're a beginner, then spread as much as you can. Don't hesitate to make mistakes, to go to the wrong direction. You will progressively discover where you feel more comfortable, where you are better (this can be different), and this will also allow you to improve your coding. Because having good skills in programming is very important when starting or entering a real project, as important as knowing which portion of the game, the engine, the editor... you want to work with.

#5310596 Data throughput

Posted by on 13 September 2016 - 09:01 AM

(on a low-middish range gpu if that helps)


This depends a lot on many factors: CPU, RAM, graphic card (what is low-middish range gpu), bandwidth (PCI express), caching, how data are stored, read and sent...

Also, what API are you using ? DirectX ? OpenGL ? Vulkan ?


If you're on OpenGL, what buffer do you use, what calls are you using ?


What framerate are you expecting ? What other tasks are you doing ?


From what I know, graphic cards are still not meant to do that extensively. When VBO arose in OpenGL, there were absolutely no difference when using static, dynamic or stream buffers. It's been a while I haven't tested that but last comments I could have read here and there is that graphic cards are still meant to render long-term stored data in their memory.

#5309473 Multi thread rendering engine

Posted by on 05 September 2016 - 12:41 AM

Just like what the graph tells it...


One thread starts the rendering process by doing the culling, then building, then the proper rendering.

As soon as the first thread finishes the culling pass, the second thread starts its rendering process by doing culling. For this second thread to start rendering, it has to wait for the first thread to finish its rendering process.


This is important for all the thread not to do their rendering (or even requiring the GPU to do some stuff) as long as the other thread did not fulfill. If you request GPU computation, then the thread that is rendering will be slow-down. If you render, then you will compromise the final image.

#5308956 My Dream World

Posted by on 01 September 2016 - 12:17 AM



it was nice to read this. Good to see that there are people here and there which still want to do the thing, even after all these years :) I hope to read some news about your project.


I guess you might have more luck in this section of the forums: http://www.gamedev.net/forum/156-hobby-project-classifieds/

#5308829 GLSL: Incorrect WorldPosition

Posted by on 31 August 2016 - 06:38 AM

On one object, it's at an estimated 10x the scale, for an unknown reason.


Due to the scale maybe ?


Model = glm::scale(Model, getScale());

#5308806 [UE4] Rotation aligning issue

Posted by on 31 August 2016 - 03:15 AM

This is not that simple. This is even a very complex problem.


You can have some hints about how to solve your problems by reading these (first answers from my google query car physics and car collision physics):








They look to cover what you are looking for.

#5308470 Mesh/Material color contribution to shading

Posted by on 29 August 2016 - 08:14 AM

1. You should normally not use mesh colors in a lit environment (unless these colors are the material colors, which AFAIK never happen). You can use them in an unlit environment, like for example in a modeler, or a simple viewer. It's always good to provide them for displaying a model easily and quickly. Colors might also have another goal, for example for doing face selection.


2. Unless these textures are dealing about materials (mainly PBR oriented textures, that is BRDF and friends), you should not. You will generally blend the mesh diffuse material with the diffuse texture.


Most commonly, what you will find on the internet will not be physically oriented. That is, you will have to deal with ambient, diffuse, specular and shininess materials, and generally a single diffuse texture.

#5308440 Opengl ECS performance problem

Posted by on 29 August 2016 - 04:05 AM


So your saying that I should create a VAO, VBO and shader at the start for each model/entity and then just reuse them?




You will even reuse the same shaders for several models. You will even might reuse the same VAO/VBO.

Bindings are generally costly. But this will not make an application having lags. However creating and deleting might. And for sure compiling shaders.

You'll have to carefully pay attention to the data transfer from the CPU to the GPU (so to the VBO). This can be a very big pitfall.

#5307976 Starting Graphics in coding

Posted by on 26 August 2016 - 12:26 AM

First of all, what kind of graphics programming are you targetting ? I mean there's a huge difference in doing 2D and 3D. There's also a lot difference in doing 'simple naive' 3D and reality-like 3D. There's also a lot of difference in doing real-time 3D graphics and non-real-time 3D graphics.


But maybe this is not that easy for you to answer to this for now. Anyway...


API means Application Programming Interface. Glut, SDL and SFML are APIs. This is a program, which is called a library, that provides an interface to the user (here functions, classes and other means) to be used in order to create an application. Internal code will generally be hidden so that all the complexity remains internal.


Glut, SDL and SFML are libraries that, among other things for the 2 latters, allow to create a window that is capable to render with OpenGL.


Most IDEs (like CodeBlock) are not providen with APIs. You will generally have to install (or sometimes even have to build them) and use them within your IDE.


OpenGL is not a library. It is a standard that defines interfaces for the programmer to be able to do graphical applications that will generally take profit of the hardware (and thus run fast). But libraries allowing to do OpenGL exist. Beginners will generally download header files in order to develop with the OpenGL (see this or thisfor example. These are headers and libraries that give the usable interface to develop with OpenGL). OpenGL capable drivers are also generally needed in order to be able to use the graphic hardware efficiently. With your IDE you'll have to point to these headers and link with your hardware drivers so that you'll 'do' OpenGL.


For doing simple games, almost if it's not 3D, OpenGL is not required (neither directx or vulkan...). You might just do it with your OS framebuffer. OpenGL is however, of course, able to do that. I would suggest you to start with SDL (or SFML) since you'll also be able to add audio, networking and so on with them.