Skip to main content
GameDev.net gamedev.net
Using GameDev.net for your class this semester?
Learn more →
🔒 Locked

It is impossible to render a tall building or large terrain in OpenGL. OpenGL is broken. Do not use it.

Started by gamelordofdeath Jul 3, 2024 at 6:05 PM 15 replies 13.6k views
Original Post
gamelordofdeath
gamelordofdeath

It is impossible to render a tall building or large terrain in OpenGL. OpenGL is broken. Do not use it.

OpenGL doesn't support texture repeat with texture atlas. OpenGL is crap. How to create a building in OpenGL?

How is it even possible to make a game without texture atlas? How to make a tall building with a single quad?

How to make a large tall building with 50x100 windows (5000 windows) without texture atlas?

Method 1. make a texture of one window and use texture repeat. If I use this, I will have to use a VBO and texture only for one building sides. I will not be able to have any other things in the texture. I will have to switch vbo and texture for every building that I want to render.

Method 2. make a quad (two triangles) for every window. 5000 windows = 10000 triangles, just to create a flat surface. But it allows to use texture atlas.

Method 3. a mix method between 1 and 2. I will not tell you more because you will steal my idea.

Method 4. make a quad for entire building side and apply a huge texture with all windows. This method uses a lot of video memory, the texture will have to be huge, like 4096 height or more.

Method 5. make a quad for entire building and use window texture from texture array (GL_EXT_texture_array) and repeat it over the quad to produce as many windows as you want. This method requires GL_EXT_texture_array so I cannot use it.

Texture atlas (array) feature is available as extension in OpenGL.

Here is a list of GPU that support and do not support it

https://feedback.wildfiregames.com/report/opengl/feature/GL_EXT_texture_array

If you scroll down to the bottom, you will see many Intel and Nvidia cards that do not support it.

I use GeForce 4 MX gpu and it doesn't support texture atlas (array).

Here is more information about texture array.

https://www.khronos.org/opengl/wiki/Array_Texture

It requires very modern OpenGL 3.0 and it doesn't support fixed pipeline.

So how to make a building without texture array?

inb4 "just use one big texture and use tex coords as texture atlas"

No, this won't work. Because you won't be able to use repeating texture over one big triangle.

you cannot use this to make 100 windows in huge building

without texture atlas support you need huge texture with 100 windows,

or you need to make 100 quads (200 triangles) to make flat surface...

Grand Theft Auto Vice City has tall buildings and it runs on Geforce4 MX. How did they make the windows on buildings? With huge texture?

How was it even possible to make a video game in old times without texture array?

Why stupid retarded OpenGL doesn't support basic feature like texture atlas yet they added other useless shit like Pixel/vertex shaders?

And also, texture array extension (GL_EXT_texture_array) is shit. It requires all textures to be the same size. So it is not a replacement for texture atlas.

Why can't I use traditional texture atlas with ability to repeat selected texture from texture atlas?

GL_REPEAT does not work with texture atlas.

OpenGL is crap shit.

How did nobody invent such basic feature over years? Why they added 1000 other useless shits instead of this?

What is even the fucking point of GL_REPEAT if you cannot use it with texture atlas? What do they want me to do? Switch texture 1000 times in single frame rendering?

It is not possible to create any video game without GL_REPEAT + texture atlas, so why does opengl exists?

They added texture array after 20 years of opengl. But even then, texture array is shit, it forces the same size for every texture.

OpenGL 1.0 was released in 1992.

Texture array got added in 2008.

What did they do for 16 years? There was no support to create a tall building for 16 years.

It took them 16 years to add support for buildings with windows. And the support they added is shit.

So, how to make a tall building in OpenGL?

How to make large terrain with various repeating textures (grass and other surfaces)?

Aressera
Aressera

What year is it? How old are you? You can't expect to use a 22 year old GPU and get modern graphics features. That's no fault of OpenGL.

Here is my terrain rendered in OpenGL 2.1+extensions, running (slowly) on a 2014 integrated intel GPU. These things are possible with sufficient skill and basic GPU features.

frob
frob

gamelordofdeath said:
I use GeForce 4 MX gpu and it doesn't support texture atlas (array).

It requires very modern OpenGL 3.0

GeForce 4 MX - Hardware released 2002. For the more popular DirectX versioning, that was DirectX 8 era hardware.

EXT_texture_array and OpenGL 3.0 were both standardized in 2008.

They're both the rough equivalent of DirectX 10 that launched with Windows Vista, the version between Windows XP and Windows 7. Most developers wouldn't consider that era of Windows Vista or DX10 to be “very modern”, at least, not now in 2024.

Old hardware doesn't magically get new features. There a few extensions that drivers might emulate, but most will fail when OpenGL procedures are loaded, and the functions will be invalid.

gamelordofdeath said:
Why stupid retarded OpenGL doesn't support basic feature like texture atlas yet they added other useless shit like Pixel/vertex shaders?

OpenGL supports the feature, and has done so since 2008. Your video card from 2002 does not.

gamelordofdeath
gamelordofdeath

Aressera said:
What year is it? How old are you?

Old.

Aressera said:
You can't expect to use a 22 year old GPU and get modern graphics features. That's no fault of OpenGL.

I don't want modern features. I want to render a building. Rendering a building is a basic feature, it should be available from the beginning. OpenGL didn't support building rendering for 16 years. How do you make a game without buildings?

Aressera said:
Here is my terrain rendered in OpenGL 2.1+extensions, running (slowly) on a 2014 integrated intel GPU. These things are possible with sufficient skill and basic GPU features.

If performance doesn't matter then you can render almost anything on GeForce 4 MX.

frob said:
Old hardware doesn't magically get new features. There a few extensions that drivers might emulate, but most will fail when OpenGL procedures are loaded, and the functions will be invalid.

Texture repeat + texture atlas is a basic feature that should be from the beginning. OpenGL didn't support rendering of buildings for 16 years. You cannot make a game without buildings.

frob said:
OpenGL supports the feature, and has done so since 2008. Your video card from 2002 does not.

They added it after 16 years. But what they added is shit. Because texture arrays that they added, require every texture in the array to be the same size.

How can I render buildings without texture arrays? I want old gpu support like GeForce 4 MX. We don't need stronger graphic cards than GeForce 4 MX. Games are becoming worse and worse with every year.

fastcall22
fastcall22

double check that you are using opengl with hardware acceleration. i seem to recall (many many years ago) having trouble loading the correct opengl library-- it would always load microsoft's basic software-only opengl library.

gamelordofdeath
gamelordofdeath

https://feedback.wildfiregames.com/report/opengl/feature/GL_EXT_texture_array

Geforce FX 5, 6, 7 series, do not support texture array.

So I will not use it.

gamelordofdeath
gamelordofdeath

fastcall22 said:
double check that you are using opengl with hardware acceleration. i seem to recall (many many years ago) having trouble loading the correct opengl library-- it would always load microsoft's basic software-only opengl library.

Yes I use hardware acceleration. It works fast, renders millions of triangles per second.

I also tested my game with MESA software rendering and then I get 10 FPS.

But it is not possible to render buildings in OpenGL, because you cannot combine texture repeat with texture atlas.

frob
frob

gamelordofdeath said:
But it is not possible to render buildings in OpenGL, because you cannot combine texture repeat with texture atlas.

Tens of thousands of games say otherwise.

YOU might not have the skills, but that doesn't mean the OpenGL isn't capable.

Even 24 years ago when your hardware was still fresh and new, games that were cutting edge at the time like GTA3 and Gran Turismo 3 took place in environments with large buildings. Similarly Halo and Deus Ex were exploring large worlds and complex maps,

Don't blame the tools. It isn't them, many others have done what you claim is “not possible”.

gamelordofdeath
gamelordofdeath

ChiefsCrusader said:
OpenGL is quite capable of rendering tall buildings and extensive terrains effectively. It's more about the implementation than the tool itself.

No you cannot. You either have to use 10000 triangles for one side of building (if you make two triangles per each window) or you have to use huge 8192x8192 texture. Or something between. But whatever you choose it's bad.

Why does crappy OpenGL require me to use 10000 triangles to draw a flat quad?

Coil
Coil

What are you hoping to get out of this thread? Is there a specific problem you're trying to solve? Are you just here to vent about old versions of OpenGL? Is there something else?

I agree that the old OpenGL library wasn't the right API in the long term (Direct X got a lot closer initially) but OpenGL won out because it was easier to draw a triangle with it and having a high-level API made it easier to deal with all of the wildly different kinds of hardware around at the time.

If you disagree with that direction, it's understandable. But if you are in 2024 and complaining that OpenGL 2.0 lacked some feature you feel is vitally important, I don't know what to say. It's in the past. There's nothing anyone can do to change it. You are shouting into the void. Buildings rendered with OpenGL 1.2 aren't going to get a lot better than Deus Ex or Max Payne. That's why OpenGL released newer versions and graphics card manufacturers released newer cards.

JoeJ
JoeJ

gamelordofdeath said:
I don't want modern features. I want to render a building. Rendering a building is a basic feature, it should be available from the beginning. OpenGL didn't support building rendering for 16 years. How do you make a game without buildings?

It sounds you want to repeat a tiling texture on the building.
If you can't do this for technical reasons and limitations, the solution is simply to subdivide the geometry, so you have a quad with unique UVs for each tile, and you can give each quad the texture you want, including support for different texture sizes across tiles.

Ofc. this increases the amount of vertices, so it has a cost.

dpadam450
dpadam450

Imagine wanting to create a realistic building with a single quad 🙂

“OpenGL didn't support building rendering for 16 years. ”
Computers don't have a “render building” button.

I never used texture arrays to build complex scenes. Unnecessary.

NBA2K, Madden, Maneater, Killing Floor, Sims 
gamelordofdeath
gamelordofdeath

I found also this method:

https://community.khronos.org/t/repeat-tile-from-texture-atlas/104500/2

It lets you repeat texture from texture atlas using shaders.

It is superior to texture array because:

-it requires opengl 2.1, not opengl 3.0.

-it doesn't force you to use same size for every texture

But it's still bad because it doesn't support GeForce 4 MX and Intel 945.

Coil said:
What are you hoping to get out of this thread? Is there a specific problem you're trying to solve?

I want to draw a building on GeForce 4 MX.

Coil said:
That's why OpenGL released newer versions and graphics card manufacturers released newer cards.

I will not use new versions and hardware because it's jewish. Every new game should support all hardware, including GeForce 4 MX.

JoeJ said:
Ofc. this increases the amount of vertices, so it has a cost.

This is understatement.

This building has 1250 windows per side = total 5000 windows.

So to display one side, one quad, you need 1250 quads.

This is not acceptable.

I have one idea for algorithm that uses low amount of polygons and allows to repeat texture from atlas, on GeForce 4 MX. The algorithm is not ideal but it is superior to using 1250 quads. I will not write how the algorithm works because I developed it on my own and it's proprietary technology. I can sell my algorithm for one million dollars.

dpadam450 said:
Computers don't have a “render building” button.

render building = render quad with repeatable (tiled) texture from texture atlas. OpenGL 1.4 doesn't support this. So it doesn't support “render building”.

The same technology is also necessary to render terrain. So OpenGL 1.4 cannot draw terrain.

dpadam450 said:
I never used texture arrays to build complex scenes. Unnecessary.

Repeatable texture from texture atlas is mandatory to draw buildings and terrain. How you draw without this?

JoeJ
JoeJ

gamelordofdeath said:
I have one idea for algorithm that uses low amount of polygons and allows to repeat texture from atlas, on GeForce 4 MX. The algorithm is not ideal but it is superior to using 1250 quads. I will not write how the algorithm works because I developed it on my own and it's proprietary technology. I can sell my algorithm for one million dollars.

Cool. Then you don't really need our help at all? You just wanted to tell us we should not use OpenGL?

gamelordofdeath said:
This building has 1250 windows per side = total 5000 windows. So to display one side, one quad, you need 1250 quads. This is not acceptable.

This is what works with your hardware:

Screenshot for The Dreadful Place by ShadoW (q3shw24) - ..::LvL - Quake 3  Arena Maps (Q3A Custom Maps)

It's nice. But it does not have 5000 windows either.

Aressera
Aressera

gamelordofdeath said:
I will not use new versions and hardware because it's jewish.

That's a big “yikes” from me.

gamelordofdeath said:
I will not write how the algorithm works because I developed it on my own and it's proprietary technology. I can sell my algorithm for one million dollars.

Good luck with that. Unless you have a PhD in computer graphics it's highly unlikely that anything you can think of has not yet been done many times before. Even with a PhD, you're not likely to create anything that anyone would buy, and definitely not for that amount. The only viable way to “get rich” is to make a name for yourself by publishing peer-reviewed research papers (e.g. in SIGGRAPH), then use that resumé to get a well-paying ($200k+) job working for someone else.

frob
frob

gamelordofdeath said:
I will not use new versions and hardware because it's jewish. Every new game should support all hardware, including GeForce 4 MX.

I think this thread is rapidly losing touch with reality. The second point on there is just out of touch.

We're long past the original subject, the claim that OpenGL can't render tall buildings or large terrain. We're also far past the point of useful discussion.

But it's the first point that's triggering here.

I don't know or care if your post was intentionally antisemitic, religious discrimination, or just meant as a disparaging term. None of them are acceptable here.

Closing the thread.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.