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.

Place A Marker At A Particular Position Over The 3D Heart Object To Represent The Part
Vote this thread:


@shamsutk87

Posts: 18

NGLNewbie

Thu, Sep 13 2012


Hi,

Recently I was trying to draw a 3D object/Load .obj file in an iOS application.
I searched and tried a lot for a good promising 3D engine that can be easily usable and understandable.

Finally I got a wonderful and awesome 3D engine NinevehGL that eased our work a lot . Thank you! This NinevehGL 3D engine is marvelous.

As I said ,my aim was to render a 3D object(Heart object) in iOS.Here is the link we got the heart object file: http://thefree3dmodels.com/stuff/anatomy/human_heart_2/20-1-0-1077

We loaded the Heart.obj file in the ViewDidLoad method of a sample lesson which is available after installing the NinevehGL.

The Heart.obj was successfully rendered and I had given some rotation for the heart object. Also we were able to construct custom shades using NGLMaterial class.

Awesome!!! It worked fine.

Now my aim is to place an Label/Image/Marker at a particular position over the 3D Heart object to mark a portion/point of Heart.obj (mesh).

For example as a marking/labeling in the 3D Heart object to identify a portion of Heart.obj (same as Apple iPhone Google Maps Dropped Pins functionality) .Also this Label/Image/Marker should rotate along with the 3D Heart object and it should look like a part of the Heart 3D object .

So is there any possibility to obtain it ,if so can you suggest the way to do that and if possible share the code for it.

Any help on this issue is appreciated


The code I used for viewDidLoad and drawView are given below:


- (void) viewDidLoad
{
// Must call super to agree with the UIKit rules.
[super viewDidLoad];

// Setting up the multiple touch for this view.
self.view.multipleTouchEnabled = YES;

// Setting the loading process parameters. To take advantage of the NGL Binary feature,
// remove the line "kNGLMeshOriginalYes, kNGLMeshKeyOriginal,". Your mesh will be loaded 950% faster.

NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
kNGLMeshCentralizeYes, kNGLMeshKeyCentralize,
@"0.3", kNGLMeshKeyNormalize,
nil];

_mesh = [[NGLMesh alloc] initWithFile:@"Heart.obj" settings:settings delegate:self];

_mesh.rotationSpace = NGLRotationSpaceLocal;
_mesh.rotationOrder = NGLRotationOrderXYZ;

_camera = [[NGLCamera alloc] initWithMeshes:_mesh, nil];
[_camera autoAdjustAspectRatio:YES animated:YES];
}

- (void) drawView
{
_mesh.rotateX = _position.y;
_mesh.rotateY = _position.x;

_mesh.z = _distance;

[_camera drawCamera];
_position.x = 0.0;
_position.y = 0.0;
_distance = 0.0;

}




0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Thu, Sep 13 2012


In response to: @shamsutk87

Hello buddy,

Thank you!

Well, there are some steps involved into this.
The simplest way is:


  • You have to create the tag/badges in a 3D application and place them around the heart.
  • Export them as separated objects and import everything without the "normalization" feature.
  • Set each tag/badge to face the camera "target".


That's it.
100% like this - 1/1

@shamsutk87

Posts: 18

NGLNewbie

Thu, Sep 13 2012


In response to: @dineybomfim

Hi Dude,

“A big THANK YOU for such a dynamic response ” . You guys are really fast! It’s a pleasure working with NinevehGL 3D engine.

As I'm a newbie in NinevehGL and 3D modelling I have no specific idea about creating tags/badges and normalization in an iOS based NinevehGL application.

So,could you please share any ref source code or any ref sample project related to our requirement so that I can clearly understand what to do.I think it will be really helpful.

Thank again for your prompt response as usual.

0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Fri, Sep 14 2012


In response to: @shamsutk87

Well,

The 3D modeling stuff I can't help you. It involves your 3D modeling software and specific knowledge of it. All that you need is to create a plane with the size you want.

Now about NinevehGL stuff, the normalization is set when you import your meshes, the dictionary called "settings", inside it you have few definitions, just don't set the normalization.

About looking at the camera, just set the property "target" of your plane meshes to look at your camera (http://nineveh.gl/docs/Classes/NGLObject3D.html#//api/name/target).
100% like this - 1/1

@shamsutk87

Posts: 18

NGLNewbie

Mon, Sep 17 2012


In response to: @dineybomfim

Thank again for your prompt response as usual.


Yeah. I have done it successfully.

However here comes another issue . I am marking/labeling 3D Heart object to identify different portions of Heart using Marker 3D obj files as you said.

While i am marking a portion, there will be an option to enter the corresponding heart portion name (which will display and rotate along with the Marker).

User must interact with UILabel or TextFeild to enter the heart portion name. So is there any way to draw/add the user entered text upon any of the .obj file (either marker.obj or Heart.obj) ?

Any Help on this is Appreciated.

Thanks.

0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, Sep 19 2012


In response to: @shamsutk87

Unfortunately not yet.

3D stuff still separated from UI stuff. The only way to mix those things is using texture.
0% like this - 0/0

@shamsutk87

Posts: 18

NGLNewbie

Mon, Sep 24 2012


In response to: @dineybomfim

Thanks for the quick responds

Is there any sample links or code available to refer.

0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Mon, Sep 24 2012


In response to: @shamsutk87

All the sample code and examples are within the NinevehGK SDK. Look inside the projects all that we provide is there.
100% like this - 1/1

@shamsutk87

Posts: 18

NGLNewbie

Mon, Sep 24 2012


In response to: @dineybomfim

ohhh.. ok
0% like this - 0/0

@adameisfeld

Posts: 41

NGLUser

Fri, Sep 28 2012


In response to: @shamsutk87

In response to: @shamsutk87

If I understand correctly, you have a 3D heart, and a series of 3D labels oriented on parts of the heart, that continuously face the camera as the camera or heart rotates. You wish to add functionality for entering the name of the heart part via a UITextField. Right?

If so, here is my suggestion. I made a post on the NinevehGL Beginners Forum for setting up collision detection in Nineveh using oriented-bounding boxes. It is located here:

http://nineveh.gl/community/forum/open_collision_library_for_ninevehgl

In that link, I provide an example project that utilizes 2D touch-to-3D object collision detection for detecting when the user taps a 3D object. If you were to use or adapt the library I wrote so that all of your part labels had collision boxes and incorperated the touch-to-3d collision detection, you could then check for when the user tapped a given label, and in finding a tapped label you could instantiate a UITextField, place it where the user tapped the screen, and wait for the user to name the label. Upon finishing entering a name, you would need to somehow create an NGLMaterial out of the entered text and apply the material to the tapped label. This is a very generalized, pseudo way of describing things, but I thought I would share an alternative approach to the problem.

Goodluck,
- Adam Eisfeld
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.