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.

Determining material/properties of a vertex or triangle on a mesh
Vote this thread:


@jjsidhu23

Posts: 2

NGLNewbie

Sun, Jan 5 2014


Hi There!

Thanks for the framework. It's been working great thus far. I've been looking into re-creating the touch detection that a previous user had created a project for and have it working based on preliminary tests (I'll post to github for sharing soon). Now I'm at the point where I'd like to see what kind of properties I can glean from knowing the particular point in the mesh I have touched.

This is really a general question but given the vertices/triangle on a mesh (or it's tex coords...etc.) how could I determine specific properties of the mesh at that point? For example: If I had a cube and on two of the faces of the cube I applied a specific material while on the other 4 was a different material could I determine the material of the face I was touching? As a newbie to opengl/ninevehGL I'd like to be able to touch a mesh at a certain point and have 'properties' I could derive from touching that position. Is there a smarter way to do this?


Thanks!
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Sat, Jan 11 2014


In response to: @jjsidhu23

Hello buddy,

To do that you'll enter in the NGLSurface world. It's not hard to understand, but it's hard to use, because you need to know your mesh, I mean, the vertices and structure of your mesh, because you'll work directly with the vertices' indices.

The concept is very simple. Create a NGLSurfaceMulti, inside it put how many NGLSurface(s) you want to divide your mesh. Each surface will automatically receive a unique identifier if you do not this explicitly when creating each NGLSuface.

Each NGLSurface has a start and length index. Which represent the starting vertex's index and the length until the end of this current surface.

This is the hardest part. After that all that you need is similarly create a NGLMaterialMulti or NGLShadersMulti. Each identifier inside these "multi" kinds will match exactly with the index you've set on your NGLSurfaceMulti.

The concept is the same as surfaces in 3D modeling softwares like 3DS Max and Maya. Besides you can notice that all the imported meshes already come with this structure. So if you want to get references, just use NSLog on the imported mesh's material, shader and surface.

Hope this helps.
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.