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.

Video as a background
Vote this thread:


@jansoucek

Posts: 2

NGLNewbie

Tue, May 29 2012


Hello guys.

First, let me tell you how awesome your engine is.
It is super easy to learn and at the same time it is super capable!


But as I am new to this thing, I want to ask for an advice.

What is the best way to get 3D model rendered and have playing video as the background of the scene at the same time?

Thanks in advance for any tips.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Tue, May 29 2012


In response to: @jansoucek

Hello man,

Depends on what you're trying to do:

  • If you're trying to make AR, you can start with the AR sample project that uses Qualcomm AR (Vuforia) and is the best AR engine to use with NinevehGL.
  • If you're just trying to present the device's camera on the background, the best way is to make a transparent NGLView and then place your camera's layer behind it.


To make transparent view (FAQ about NinevehGL), set the "backgroundColor" to nil or a transparent color, then:

nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();


Do this before initialize any NGLView, it'll be better.
0% like this - 0/0

@jansoucek

Posts: 2

NGLNewbie

Wed, May 30 2012


In response to: @dineybomfim

Hi mate.

Many thanks for your advice.

Although, I don't want to stream pictures from Camera to the background. I just want to play a video from video file.

Is that possible? I understand that I probably should choose the same "transparent view" approach as you advised earlier, but I am not completely sure how to display the video under that transparent view.

Any hints on that?


Thanks, highly appreciated.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Wed, May 30 2012


In response to: @jansoucek

Yes, use the same transparent view approach.

Well, it's simple, with any of the Cocoa video approaches, you must choose an UIView to show your video. Just place the NGLView above your video (UIView).

Piece of cake.
0% like this - 0/1

@Binusz

Posts: 4

NGLNewbie

Thu, May 31 2012


In response to: @dineybomfim

Can you give us a simple code example? i could not figure out.

When i try to your advice, i just see blackbackground ?
0% like this - 0/0

@Binusz

Posts: 4

NGLNewbie

Thu, May 31 2012


In response to: @Binusz

it happens always...
When i asked a question for a long wait of not asking, then i make it.
Finally, i figure out. Merely i could not adjust reference issue.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Thu, May 31 2012


In response to: @Binusz


Good to know you've found the answer.

Just in case, it's very simple:
Set the"backgroundColor" to nil or a transparent color, then:

nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();


More detailed explanation here: FAQ about NinevehGL
100% like this - 1/1

@Skirrah

Posts: 9

NGLNewbie

Thu, May 31 2012


In response to: @dineybomfim

Hi

I am trying to do the same thing; that is put a video background beneath a transparent NGLView.
I have created a UIView with UIImagePickerController for the video and this works fine.
I then create an NGLView and add this as a sub view:

[self.view addSubview: nglView];

I set the nglView to opaque color to test it is there on top of the video:

nglView.opaque = YES;
nglView.backgroundColor =[UIColor magentaColor];

But, on running, still see the camera view.
Does anyone have example code of how to set this up properly?

Many thanks!
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Thu, May 31 2012


In response to: @Skirrah

Hey guys, please, read the answers above.

  1. The "opaque" property does anything in NinevehGL! Because the alpha channel is disabled by default!
  2. Don't add the NGLView as a sub view of your video view, it should be placed on TOP of it. So, add the NGLView in the "video super view".

To enable the alpha channel, just do as following:


nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();


Here is the full explanation: http://nineveh.gl/community/faq/
0% like this - 0/0

@Skirrah

Posts: 9

NGLNewbie

Fri, Jun 1 2012


In response to: @dineybomfim

This works, giving a semi-transparent Red overlay on video:

imagePicker.cameraOverlayView = nglView;

nglView.backgroundColor=[UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:0.5];
nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();

Thanks for the help.
100% like this - 1/1

@burakkilic

Posts: 36

NGLNewbie

Thu, Apr 4 2013


In response to: @dineybomfim

I did

nglGlobalColorFormat(NGLColorFormatRGBA);
nglGlobalFlush();

but black parts of my object is also transparent now. What can I do?
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.