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 to set NGLLight position according to AR(vuforia) engine's camera position?
Vote this thread:


@masonhsiung

Posts: 14

NGLNewbie

Mon, Apr 29 2013


Hi,

From vuforia forum, I can get camera position by the following code.(https://developer.vuforia.com/resources/dev-guide/getting-camera-position)
--
const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
const QCAR::Trackable& trackable = result->getTrackable();
QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(result->getPose());
QCAR::Matrix44F inverseMV = SampleMath::Matrix44FInverse(modelViewMatrix);
QCAR::Matrix44F invTranspMV = SampleMath::Matrix44FTranspose(inverseMV);

float cam_x = invTranspMV.data[12];
float cam_y = invTranspMV.data[13];
float cam_z = invTranspMV.data[14];
--

Setting the camera position directly from this doesn't work.(see below)
--
[NGLLight defaultLight].x = invTranspMV.data[12];
[NGLLight defaultLight].y = invTranspMV.data[13];
[NGLLight defaultLight].z = invTranspMV.data[14];
--
Do I need to recalculate the values?
Thanks.

regards,
Mason
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Mon, Apr 29 2013


In response to: @masonhsiung

Hello buddy,

For 100% sure it will not work. Each engine has its own 3D space, that means, the proportions, the max and min, the size, etc...

Every kind of software has its own space. The NinevehGL offers a system called rebase. It'll make the conversion from other known spaces, like Vuforia, to NinevehGL space.

Check out the NinevehGL AR smaple project to see how it works.
0% like this - 0/0

@masonhsiung

Posts: 14

NGLNewbie

Tue, Apr 30 2013


In response to: @dineybomfim

Hi, thanks! I will try it!
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.