Login Action Required

The NinevehGL Forum uses a new concept of "socialized forum" or as we like to say "Tweet Forum".


Here is the deal:
  1. No new registration is required. Just sign in with your Twitter account and authorize the NinevehGL Forum.
  2. Once you’re in, you'll be able to "Follow a Thread", that means every time that thread receive a new post or update you'll receive a mention on your twitter.
  3. Besides, you can enable "Auto Share", then every new post and/or thread you make will be tweeted on your timeline. (By default, auto-share is enabled only for your threads)

Forum Rules:

1. We understand human comunication can become "hot" sometimes. So some insults and bad words ARE allowed. Just don't push too much being an asshole all the time.

2. SPAMMERS are not allowed. There are penalties for this kind of user and they can be banned forever.

3. You can report other users, if you judge necessary. An user reported many times by many people can also be banned forever. However you can also receive penalties for report deliberately for no apparent reason.

If there is a similar thread title, make sure the other one doesn't already have the answer you're looking for.

This forum uses the BBCode (Bulletin Board Code), here are some instructions:

Bold: [b]text[/b]
Italic: [i]text[/i]
Underline: [u]text[/u]

Code: [code]text[/code]
Quote:
[quote=@username]text[/quote]
[quote]text[/quote]

List:
[ul] [*]item [/ul]
[ol] [*]item [/ol]

URL:
[url]http://url.com[/url]
[url=http://url.com]text[/url]

Image:
[img]http://imageurl.com[/img]

Embed (videos, code, 3D):
[embed]http://url.com[/embed]

Welcome to the NinevehGL's world!
NinevehGL is a 3D engine forged with pure Obj-C.
Welcome to the
Forum!
Hello, Guest.

Your current vote:

You can change your vote many times. But it's still one single vote.


@g_salute

Posts: 7

NGLNewbie

Wed, May 15 2013


Is it possible that Nineveh automatically generates Mip Maps? I am using a texture with non connecting parts and I have artefacts when zooming off the scene.

Is it possible to deactivate generation of mip maps?

Could it be that the following code is active in Nineveh?
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

If yes. Is there a possibility to set the Min-Filter to GL_LINEAR_LINEAR?

I tried with nglGlobalTextureQuality and with texture.quality to NGLTextureQualityNearest which would also solve my problem. But it doesn't work either.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, May 15 2013


In response to: @g_salute

Hello buddy,

There is no way to deactivate the mipmap generation in NinevehGL. It's a performance security concern.

However you can change the texture quality and optimization to achieve your goals. Both properties can be changed using the Global API. Of course you can also use specific configuration to each texture.
0% like this - 0/0

@g_salute

Posts: 7

NGLNewbie

Wed, May 15 2013


In response to: @dineybomfim

Hey, thanks a lot for your answer!

With the same OBJ-mesh and texture I had exactly the same artefacts when loading it with MeshLab (meshlab.sourceforge.net). When changing the value MeshLab::Appearance::textureMinFilter to Nearest in MeshLab's global settings the artefacts disappear.

What exactly happens in NinevehGL when texture quality is changed? Are Min- and the Mag-Filter changed like described below?

Nearest:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

Bilinear
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

Trilinear:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

I tried to set the global value with nglGlobalTextureQuality and directly on the texture itself with the quality accessor. I noticed a change from linear to nearest. But my assumption is that GL_LINEAR_MIPMAP_NEAREST is used since my mip mapping artefacts are still there. Could you please double check this in the code base?

Could I also use Raw OpenGL commands during before rendering? Or are those values overwritten before the texture is sampled by the shader?

glActiveTexture(GL_TEXTURE0);
glEnable(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Thu, May 16 2013


In response to: @g_salute

Hello buddy,

No you can't use the OpenGL commands.

Are u using the flush after changing the global property?
It's mandatory.

About your question, this is exactly what trilinear, bilinear and linear means:

Trilinear:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

Bilinear:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);

Linear:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);


Remember that this is not the only thing that affects the textures. There are also the texture compression and the retina size (contentScaleFactor).

Of course you can also avoid NinevehGL and use pure OpenGL.
0% like this - 0/0

@g_salute

Posts: 7

NGLNewbie

Thu, May 16 2013


In response to: @dineybomfim

Oi! Thanks a lot for your answer. You help me a lot.

Yes, I used the flush command, but those artefacts are still there. If possible I would prefer to use the NinevehGL engine. The software is well structured and has a clean interface.

So all three modi use mip mapping for the filtering. Would it be possible to add also linear (GL_LINEAR) and nearest (GL_NEAREST) MIN-filter without mip mapping for the next version (e.g. BilinearNoMipMap and LinearNoMipMap)? That would be really great addon and solve my problem. By the way: Do you already know when the next minor release (0.9.4) is going public?

"Remember that this is not the only thing that affects the textures. There are also the texture compression and the retina size (contentScaleFactor)."
Is the texture recompressed by NinevehGL? Is this done with the command nglGlobalTextureOptimize? If I leave the contentScaleFactor to 1 and Texture optimization to none then my texture should be used 1:1. Is my assumption correct?

In the second reply your wrote that disabling the creation of mip maps is a "performance security concern". What do you mean exactly with it?

Obrigado!
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Thu, May 16 2013


In response to: @g_salute

Hello buddy,

Yes, as NinevehGL will always use the mipmapping, so this is why the min will always use mipmap.

It's a performance concern because your frame rate will drastically goes down without the mipmap. In desktops it would not be a so big problem, however in mobiles it's. As NinevehGL is primely made to mobiles, it's a performance security concern.

Now let me ask you a question, the mipmap will never be a visual problem. At least not for mobile screens. Why are you so worried about it? Can you show an image of what you get with NinevehGL and what you expect to have without mipmap?

Actually, there is no real gain in the final quality that you could not achieve adjusting the contentScaleFactor and the antialias.
0% like this - 0/0

@g_salute

Posts: 7

NGLNewbie

Thu, May 16 2013


In response to: @dineybomfim

Hey Diney!

I use a technique to create mesh atlases where adjacent triangles don't have to be adjacent on the texture. When acquiring complex real world models this is one of the fastest possibilites to create mesh atlases.

I attached two sample images.

No Mip Mapping:


Mip Mapping:


Due to mip mapping heavy mip mapping artefacts can be seen (triangle structure). This gets even worse when moving the object. This is because in the lower resolution mip map texture(s) adjacent color information is mixed which don't belong together.

Would it be possible to create a patched version with possibilites to disable mip mapping? I would really like to test the performance with the actual models. Is performance also bad on newer iOS devices?

I hope you can help me!

Have a nice day!
0% like this - 0/0

@g_salute

Posts: 7

NGLNewbie

Thu, May 16 2013


In response to: @g_salute

Oi! I found the following text in the Apple Developer Documentation:

"When combining mip maps with texture atlases, use the APPLE_texture_max_level extension to control how your textures are filtered."

It would be great, if you could add this feature. This way, I would have control about many mip levels are used.

Do you know when the next version will be released?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, May 17 2013


In response to: @g_salute

Hello buddy,

I don't think this is the cause of your problem. The Mipmapping is not causing that.
You probably read something about it and it is so stuck in your mind that you can't see another way to solve your problem.

Send us your mesh via email and we'll show you how to solve it.
0% like this - 0/0

@g_salute

Posts: 7

NGLNewbie

Fri, May 17 2013


In response to: @dineybomfim

Hi

I am quite sure that those are mip mapping artefacts. I've uploaded you a sample file.

If you have a texture atlas it is always needed to define the maximum mip map level.

http://dfiles.eu/files/bcdqv8tp7

Thanks for your help.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, May 17 2013


In response to: @g_salute

Hello buddy,

Thanks for sending it. Here is the solution.

I understand that you had study a lot and read a lot about this issue and you're "quite sure" that you're right. But here goes a piece of advice, there will always be someone that know more and know a simple solution, something that you maybe don't know that you don't know.

Here, look at this pictures and tell me if they are good for you:





See... you really don't need to disable the mipmapping to achieve good results.
If you still interest, I can teach you how it works.
If you think this result is not good yet for your goals, so I must tell you that NinevehGL does not fit for you. Go with pure OpenGL and it'll help you more.
0% like this - 0/0

@g_salute

Posts: 7

NGLNewbie

Fri, May 17 2013


In response to: @dineybomfim

>If you still interest, I can teach you how it works.

OK. Please go ahead

Are you still using exactly the same geometry and the same texture for your solution?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, May 17 2013


In response to: @g_salute

Yes,
The same as you sent.

All that you need is:

nglGlobalAntialias(NGLAntialias4X);
nglGlobalFlush();


The antialias will work over the final image, filling the little holes that could annoy you.
Of course the antialias has a cost, I suggest you to turn off the lights, if you can.

Let me know if the result is good for your goals.
0% like this - 0/0
Technology

NinevehGL is a 3D engine built right on top of OpenGL ES and it uses all the programmable pipeline power, making it easy for you to create great application with shaders.

Share on


Follow NinevehGL
Fastest way to contact us:

Copyright © 2011 db-in. All rights reserved.