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.

How parameter kNGLMeshKeyNormalize works?
Vote this thread:


@Climbatize84

Posts: 13

NGLNewbie

Wed, Aug 8 2012


Hey there, it's me, again

I have a little problem. understanding kNGLMeshKeyNormalize parameter when initializing meshes.

I created a scene with Maya, then saved each object in this scene in a separated obj file (remember my AR problem ^^).

When I load these 5 different meshes with no parameters, the scene appears as I wanted, each object in the right place. But the scene is way too big, I have to scale it down 100000 times. So I decided to use the kNGLMeshKeyNormalize like that:


settings = [NSDictionary dictionaryWithObjectsAndKeys:
@"0.5",kNGLMeshKeyNormalize,
nil];

_sol= [[NGLMesh alloc] initWithFile:@"Sol.obj" settings:settings delegate:nil];
_batiment_technique= [[NGLMesh alloc] initWithFile:@"Bat_Tech.obj" settings:settings delegate:nil];
_enceinte_int= [[NGLMesh alloc] initWithFile:@"Interieur.obj" settings:settings delegate:nil];
_enceinte_ext= [[NGLMesh alloc] initWithFile:@"Exterieur.obj" settings:settings delegate:self];
_escalier= [[NGLMesh alloc] initWithFile:@"Escalier.obj" settings:settings delegate:nil];

_camera = [[NGLCamera alloc] initWithMeshes: _sol, _enceinte_int, _enceinte_ext, _escalier, _batiment_technique, nil];



but the meshes are not all the same scale when they show, and they are not placed like they should be respectively
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, Aug 8 2012


In response to: @Climbatize84

Simple,

As you can notice, normalization is not a global propery. It's a local setting for each file. That means it happen individually for each file.

When you set 0.5, that means the loading mesh, just the loading mesh and anything else, will fit inside the range [0.0, 0.5].

If you have many files, with different sizes but all with the same scale factor, the best way is to import without normalize key and rescale than.

In fact, the best approach to use with 3D engines is to already export your mesh from the 3D software with the correct size, between the range [0.0, 1.0], which is the default range of OpenGL.
0% like this - 0/0

@Climbatize84

Posts: 13

NGLNewbie

Wed, Aug 8 2012


In response to: @dineybomfim

ok thanks! I was completely wrong, I thought it was a kind of magic rescaling. I will have to watch videos again

There should be a way to normalize groups, it would be nice
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, Aug 8 2012


In response to: @Climbatize84

Yeah...

I think in the next version it could be called "Magic Scale". The current version helped us a lot to get the feedback from you guys and this is being amazing!

High expectations for the next release.
0% like this - 0/0

@sashah_t

Posts: 27

NGLNewbie

Tue, Jul 23 2013


In response to: @dineybomfim

Hi,

I have tried removing the kNGLMeshKeyNormalize parameter and after adding all my meshes to a NGLGroup3D I used setScaleX, setScaleY, and setScaleZ to scale it to the proper size.

The only problem is the colors have all turned black. If I remove the scaling the very large mesh group is still black, with faint shadings that indicate it has the color hidden under the black.

These signs indicate to me that this may be a lighting issue, but if it is I do not know how to 'un normalize' the lighting/camera or possibly scale it to remove the black and bring back the colors.

Any help? I can post code if it helps, though I think I am probably missing something rather than making a mistake in what already works with normalization in place.

Thanks in advance!
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Tue, Jul 23 2013


In response to: @sashah_t

You can move the light and increase its attenuation factor.

Although, seems you're doing everything right, you should not get this light issue. We'll investigate if the NGLGroup3D scale are having any troubles with lights.
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.