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.

AR with Vuforia and custom models BUG FIX
Vote this thread:


@DrNeuroSurg

Posts: 7

NGLNewbie

Wed, Oct 31 2012


Hi,

some people have difficulties to add own models to the "AR-App" (incorrect rendering ...).
One solution is to remove "QCAR::Renderer::getInstance().drawVideoBackground();" inside "drawView" but you can't see the video

To overcome this problem I added a "dummy" object (mesh only) to the camera:

.. in "viewDidLoad" add these lines (after "[super viewDidLoad])

//###############################################################################################
//THIS IS ONLY TO AVOID THE "VUFORIA" ERROR

settings = [NSDictionary dictionaryWithObjectsAndKeys:
kNGLMeshCentralizeYes, kNGLMeshKeyCentralize,
@"0.001", kNGLMeshKeyNormalize,
nil];
_dummy = [[NGLMesh alloc] initWithFile:@"dummy.obj" settings:settings delegate:self];
_dummy.y = -0.5f;
_dummy.z = -1.0f;
_dummy.material = [NGLMaterial materialGold];
//###############################################################################################



As you can see, the mesh is scaled down to a very small size....

Then add this NGLMesh ("_dummy") to your camera:

_camera = [[NGLCamera alloc] initWithMeshes:_dummy, _myMesh, nil];



In "drawView" I added this:

....
if (_isReady)
{
_myMesh.visible = NO;
_dummy.visible = NO;


....

AND LATER (after getting the trackable)


...
// Making the meshes visible again.
_myMesh.visible = YES;
_dummy.visible = YES;

[_dragon rebaseWithMatrix:qMatrix.data scale:320.0f compatibility:NGLRebaseQualcommAR];
[_dummy rebaseWithMatrix:qMatrix.data scale:320.0f compatibility:NGLRebaseQualcommAR];


....




The dummy-mesh ("dummy.obj") is here (a simple cube):

# WaveFront *.obj file (generated by Cheetah3D)

mtllib cube.mtl

g W├╝rfel
v -0.500000 -0.500000 0.500000
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 -0.500000 -0.500000

vt 0.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000

vn 0.000000 0.000000 1.000000
vn 0.000000 0.000000 -1.000000
vn -1.000000 0.000000 0.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 -1.000000 0.000000

usemtl Material
f 4/4/1 3/3/1 2/2/1 1/1/1
f 8/4/2 7/3/2 6/2/2 5/1/2
f 1/4/3 2/3/3 7/2/3 8/1/3
f 5/4/4 6/3/4 3/2/4 4/1/4
f 3/4/5 6/3/5 7/2/5 2/1/5
f 5/4/6 4/3/6 1/2/6 8/1/6

usemtl default





That's it !

Hope this helps to use these two great libraries ...


Our brain isn't enough ...

100% like this - 2/2

@dineybomfim

Posts: 571

NGLAdmin

Wed, Oct 31 2012


In response to: @DrNeuroSurg

Nice tip Dr!
Thanks.

BTW, you could also initialize an empty NGLMesh by using [[NGLMesh alloc] init]; instead using an OBJ file.
0% like this - 0/0

@quotoman

Posts: 8

NGLNewbie

Wed, Mar 27 2013


In response to: @dineybomfim

I encoutered the same problem and used the same solution.
Actually if you init the "dummy" mesh only with [[NGLMesh alloc] init] it doesn't seems to work.

BTW, this bug depends only on Vuforia or it will be fixed soon?
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, Mar 29 2013


In response to: @quotoman

Hard to say, once it's probably caused by a conflict with the usage of EAGLContext. I'm not sure who could fix this issue easier. Anyway, we'll try to fix it in the next release.
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.