Hi. I need to put a 3D object (obj, mtl or 3ds) on screen and see that image while I'm seeing camera view. That is easy but I need to manage the position of the object WITHOUT GPS signal, I mean, if I move the mobile phone I don´t have to see the object, only when I focus to the correct direction (for example I suppose I can use the compass for this), but I need to know how to do it.
Yes, of course I´ve been looking for frameworks to do it and I´ve tried lookar, min3d and some more. I am sure that they can do what I need but I don´t know how to do it.
I wrote here in order to find people who have already done what I want to do, so they can explain me how they did it or where they found the information (not a big tutorial, just some instructions).
Thanks
El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió:
On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
> Yes, of course I have been trying with all the frameworks I have found > (LooakAR, min3D...) and I am sure I can do what I need with them but I > don´t know how. I wrote here in order to find someone who has done exactly > the same I have to do (there must be a lot) and to know how they did it (I > need a tutorial that explains it or some advices).
You need to make use of SensorManager and register a SensorListener in order to construct a device rotation matrix. Luckily Android already provides a method that calculates that matrix which is ready for use in OpenGL:
> * Note that because OpenGL matrices are column-major matrices you must > transpose the matrix before using it. However, since the matrix is a > rotation matrix, its transpose is also its inverse, conveniently, it is > often the inverse of the rotation that is needed for rendering; it can > therefore be used with OpenGL ES directly. *
You also may want to implement an algorithm that reduces the noise from the sensor data, otherwise the 3D objects will jitter on the screen. The simplest approach is calculating a median and / or weighted average over time.
>> Yes, of course I have been trying with all the frameworks I have found >> (LooakAR, min3D...) and I am sure I can do what I need with them but I >> don´t know how. I wrote here in order to find someone who has done exactly >> the same I have to do (there must be a lot) and to know how they did it (I >> need a tutorial that explains it or some advices).
> You need to make use of SensorManager and register a SensorListener in > order to construct a device rotation matrix. Luckily Android already > provides a method that calculates that matrix which is ready for use in > OpenGL:
>> * Note that because OpenGL matrices are column-major matrices you must >> transpose the matrix before using it. However, since the matrix is a >> rotation matrix, its transpose is also its inverse, conveniently, it is >> often the inverse of the rotation that is needed for rendering; it can >> therefore be used with OpenGL ES directly. *
> You also may want to implement an algorithm that reduces the noise from > the sensor data, otherwise the 3D objects will jitter on the screen. The > simplest approach is calculating a median and / or weighted average over > time.
With that device rotation matrix you can only rotate your objects around the screen, where the rotation center point is the center of the device. This is independent of GPS location coordinates, and as the name of that matrix suggests, it is really rotation only, not translation (moving around the objects on any axis).
But to answer your question: yes, it is possible to just use the sensor data without GPS and have 3D objects move around on the screen. And it will work well for most use cases, like augmented reality games where you usually sit as a player and move the camera around.
If you need to change the positioning of the 3D objects according to the current device location and movement, it gets a bit more complicated.
You could make use of the GPS coordinates for translation but it wouldn't be real time suitable, because GPS alone is usually not precise enough. You need to combine several sensors (including the camera) for making an augmented reality app possible that gives a seamless experience and allows the user to freely walk around.
You could make use of acceleration sensor data for getting an idea of the current device / user movement direction. With that information you could predict a translation until the next GPS location update gives you certainty about the current location.
You also could make use of realtime image analysis for calculating the current movement direction based on changes in the video preview frames.
On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote:
> Thank you very much Nobu. And is it possible to place the 3D object just > to see the object with the camera on its position without using the GPS???
> El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió:
>> On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
>>> Yes, of course I have been trying with all the frameworks I have found >>> (LooakAR, min3D...) and I am sure I can do what I need with them but I >>> don´t know how. I wrote here in order to find someone who has done exactly >>> the same I have to do (there must be a lot) and to know how they did it (I >>> need a tutorial that explains it or some advices).
>> You need to make use of SensorManager and register a SensorListener in >> order to construct a device rotation matrix. Luckily Android already >> provides a method that calculates that matrix which is ready for use in >> OpenGL:
>>> * Note that because OpenGL matrices are column-major matrices you must >>> transpose the matrix before using it. However, since the matrix is a >>> rotation matrix, its transpose is also its inverse, conveniently, it is >>> often the inverse of the rotation that is needed for rendering; it can >>> therefore be used with OpenGL ES directly. *
>> You also may want to implement an algorithm that reduces the noise from >> the sensor data, otherwise the 3D objects will jitter on the screen. The >> simplest approach is calculating a median and / or weighted average over >> time.
> With that device rotation matrix you can only rotate your objects around > the screen, where the rotation center point is the center of the device. > This is independent of GPS location coordinates, and as the name of that > matrix suggests, it is really rotation only, not translation (moving around > the objects on any axis).
> But to answer your question: yes, it is possible to just use the sensor > data without GPS and have 3D objects move around on the screen. And it will > work well for most use cases, like augmented reality games where you > usually sit as a player and move the camera around.
> If you need to change the positioning of the 3D objects according to the > current device location and movement, it gets a bit more complicated.
> You could make use of the GPS coordinates for translation but it wouldn't > be real time suitable, because GPS alone is usually not precise enough. You > need to combine several sensors (including the camera) for making an > augmented reality app possible that gives a seamless experience and allows > the user to freely walk around.
> You could make use of acceleration sensor data for getting an idea of the > current device / user movement direction. With that information you could > predict a translation until the next GPS location update gives you > certainty about the current location.
> You also could make use of realtime image analysis for calculating the > current movement direction based on changes in the video preview frames.
> On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote:
>> Thank you very much Nobu. And is it possible to place the 3D object just >> to see the object with the camera on its position without using the GPS???
>> El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió:
>>> On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
>>>> Yes, of course I have been trying with all the frameworks I have found >>>> (LooakAR, min3D...) and I am sure I can do what I need with them but I >>>> don´t know how. I wrote here in order to find someone who has done exactly >>>> the same I have to do (there must be a lot) and to know how they did it (I >>>> need a tutorial that explains it or some advices).
>>> You need to make use of SensorManager and register a SensorListener in >>> order to construct a device rotation matrix. Luckily Android already >>> provides a method that calculates that matrix which is ready for use in >>> OpenGL:
>>>> * Note that because OpenGL matrices are column-major matrices you must >>>> transpose the matrix before using it. However, since the matrix is a >>>> rotation matrix, its transpose is also its inverse, conveniently, it is >>>> often the inverse of the rotation that is needed for rendering; it can >>>> therefore be used with OpenGL ES directly. *
>>> You also may want to implement an algorithm that reduces the noise from >>> the sensor data, otherwise the 3D objects will jitter on the screen. The >>> simplest approach is calculating a median and / or weighted average over >>> time.
I´ve been trying and studying some examples but I don´t have OpenGL knowledges enough to implement what I need. I´ve been trying with Junaio too, but It doesn´t fit to my project. I tried with LookAR too, but the resolution is very low. Is there any framework, as LookAR, that can do easily what I need? (I am not an expert in OpenGL)
Thank you
El jueves, 5 de julio de 2012 20:33:27 UTC+2, Nobu Games escribió:
> With that device rotation matrix you can only rotate your objects around > the screen, where the rotation center point is the center of the device. > This is independent of GPS location coordinates, and as the name of that > matrix suggests, it is really rotation only, not translation (moving around > the objects on any axis).
> But to answer your question: yes, it is possible to just use the sensor > data without GPS and have 3D objects move around on the screen. And it will > work well for most use cases, like augmented reality games where you > usually sit as a player and move the camera around.
> If you need to change the positioning of the 3D objects according to the > current device location and movement, it gets a bit more complicated.
> You could make use of the GPS coordinates for translation but it wouldn't > be real time suitable, because GPS alone is usually not precise enough. You > need to combine several sensors (including the camera) for making an > augmented reality app possible that gives a seamless experience and allows > the user to freely walk around.
> You could make use of acceleration sensor data for getting an idea of the > current device / user movement direction. With that information you could > predict a translation until the next GPS location update gives you > certainty about the current location.
> You also could make use of realtime image analysis for calculating the > current movement direction based on changes in the video preview frames.
> On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote:
>> Thank you very much Nobu. And is it possible to place the 3D object just >> to see the object with the camera on its position without using the GPS???
>> El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió:
>>> On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
>>>> Yes, of course I have been trying with all the frameworks I have found >>>> (LooakAR, min3D...) and I am sure I can do what I need with them but I >>>> don´t know how. I wrote here in order to find someone who has done exactly >>>> the same I have to do (there must be a lot) and to know how they did it (I >>>> need a tutorial that explains it or some advices).
>>> You need to make use of SensorManager and register a SensorListener in >>> order to construct a device rotation matrix. Luckily Android already >>> provides a method that calculates that matrix which is ready for use in >>> OpenGL:
>>>> * Note that because OpenGL matrices are column-major matrices you must >>>> transpose the matrix before using it. However, since the matrix is a >>>> rotation matrix, its transpose is also its inverse, conveniently, it is >>>> often the inverse of the rotation that is needed for rendering; it can >>>> therefore be used with OpenGL ES directly. *
>>> You also may want to implement an algorithm that reduces the noise from >>> the sensor data, otherwise the 3D objects will jitter on the screen. The >>> simplest approach is calculating a median and / or weighted average over >>> time.
> I´ve been trying and studying some examples but I don´t have
> OpenGL knowledges enough to implement what I need. I´ve been trying with
> Junaio too, but It doesn´t fit to my project. I tried with LookAR too, but
> the resolution is very low. Is there any framework, as LookAR, that can do
> easily what I need? (I am not an expert in OpenGL)
> Thank you
> El jueves, 5 de julio de 2012 20:33:27 UTC+2, Nobu Games escribió:
>> With that device rotation matrix you can only rotate your objects around
>> the screen, where the rotation center point is the center of the device.
>> This is independent of GPS location coordinates, and as the name of that
>> matrix suggests, it is really rotation only, not translation (moving around
>> the objects on any axis).
>> But to answer your question: yes, it is possible to just use the sensor
>> data without GPS and have 3D objects move around on the screen. And it will
>> work well for most use cases, like augmented reality games where you
>> usually sit as a player and move the camera around.
>> If you need to change the positioning of the 3D objects according to the
>> current device location and movement, it gets a bit more complicated.
>> You could make use of the GPS coordinates for translation but it wouldn't
>> be real time suitable, because GPS alone is usually not precise enough. You
>> need to combine several sensors (including the camera) for making an
>> augmented reality app possible that gives a seamless experience and allows
>> the user to freely walk around.
>> You could make use of acceleration sensor data for getting an idea of the
>> current device / user movement direction. With that information you could
>> predict a translation until the next GPS location update gives you
>> certainty about the current location.
>> You also could make use of realtime image analysis for calculating the
>> current movement direction based on changes in the video preview frames.
>> On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote:
>>> Thank you very much Nobu. And is it possible to place the 3D object just
>>> to see the object with the camera on its position without using the GPS???
>>> El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió:
>>>> On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
>>>>> Yes, of course I have been trying with all the frameworks I have found
>>>>> (LooakAR, min3D...) and I am sure I can do what I need with them but I
>>>>> don´t know how. I wrote here in order to find someone who has done exactly
>>>>> the same I have to do (there must be a lot) and to know how they did it (I
>>>>> need a tutorial that explains it or some advices).
>>>> You need to make use of SensorManager and register a SensorListener in
>>>> order to construct a device rotation matrix. Luckily Android already
>>>> provides a method that calculates that matrix which is ready for use in
>>>> OpenGL:
>>>>> * Note that because OpenGL matrices are column-major matrices you
>>>>> must transpose the matrix before using it. However, since the matrix is a
>>>>> rotation matrix, its transpose is also its inverse, conveniently, it is
>>>>> often the inverse of the rotation that is needed for rendering; it can
>>>>> therefore be used with OpenGL ES directly. *
>>>> You also may want to implement an algorithm that reduces the noise from
>>>> the sensor data, otherwise the 3D objects will jitter on the screen. The
>>>> simplest approach is calculating a median and / or weighted average over
>>>> time.
>>> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
-- Raghav Sood
Please do not email private questions to me as I do not have time to answer
them. Instead, post them to public forums where others and I can answer and
benefit from them.
http://www.appaholics.in/ - Founder
http://www.apress.com/9781430239451 - Author
+91 81 303 77248
Yes. I have already tried that code and it works fine, but that is only for loading models, and I need to place them in the virtual space around the device. Anyway, thank you very much Raghav
El domingo, 8 de julio de 2012 19:55:18 UTC+2, Raghav Sood escribió:
> On Sun, Jul 8, 2012 at 10:35 PM, santy <santiago...@gmail.com<santiago.gonzalez.iz...@gmail.com>
> > wrote:
>> I´ve been trying and studying some examples but I don´t have >> OpenGL knowledges enough to implement what I need. I´ve been trying with >> Junaio too, but It doesn´t fit to my project. I tried with LookAR too, but >> the resolution is very low. Is there any framework, as LookAR, that can do >> easily what I need? (I am not an expert in OpenGL)
>> Thank you
>> El jueves, 5 de julio de 2012 20:33:27 UTC+2, Nobu Games escribió:
>>> With that device rotation matrix you can only rotate your objects around >>> the screen, where the rotation center point is the center of the device. >>> This is independent of GPS location coordinates, and as the name of that >>> matrix suggests, it is really rotation only, not translation (moving around >>> the objects on any axis).
>>> But to answer your question: yes, it is possible to just use the sensor >>> data without GPS and have 3D objects move around on the screen. And it will >>> work well for most use cases, like augmented reality games where you >>> usually sit as a player and move the camera around.
>>> If you need to change the positioning of the 3D objects according to the >>> current device location and movement, it gets a bit more complicated.
>>> You could make use of the GPS coordinates for translation but it >>> wouldn't be real time suitable, because GPS alone is usually not precise >>> enough. You need to combine several sensors (including the camera) for >>> making an augmented reality app possible that gives a seamless experience >>> and allows the user to freely walk around.
>>> You could make use of acceleration sensor data for getting an idea of >>> the current device / user movement direction. With that information you >>> could predict a translation until the next GPS location update gives you >>> certainty about the current location.
>>> You also could make use of realtime image analysis for calculating the >>> current movement direction based on changes in the video preview frames.
>>> On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote:
>>>> Thank you very much Nobu. And is it possible to place the 3D object >>>> just to see the object with the camera on its position without using the >>>> GPS???
>>>> El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió:
>>>>> On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
>>>>>> Yes, of course I have been trying with all the frameworks I have >>>>>> found (LooakAR, min3D...) and I am sure I can do what I need with them but >>>>>> I don´t know how. I wrote here in order to find someone who has done >>>>>> exactly the same I have to do (there must be a lot) and to know how they >>>>>> did it (I need a tutorial that explains it or some advices).
>>>>> You need to make use of SensorManager and register a SensorListener in >>>>> order to construct a device rotation matrix. Luckily Android already >>>>> provides a method that calculates that matrix which is ready for use in >>>>> OpenGL:
>>>>>> * Note that because OpenGL matrices are column-major matrices you >>>>>> must transpose the matrix before using it. However, since the matrix is a >>>>>> rotation matrix, its transpose is also its inverse, conveniently, it is >>>>>> often the inverse of the rotation that is needed for rendering; it can >>>>>> therefore be used with OpenGL ES directly. *
>>>>> You also may want to implement an algorithm that reduces the noise >>>>> from the sensor data, otherwise the 3D objects will jitter on the screen. >>>>> The simplest approach is calculating a median and / or weighted average >>>>> over time.
>>>> -- >> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
> -- > Raghav Sood
> Please do not email private questions to me as I do not have time to > answer them. Instead, post them to public forums where others and I can > answer and benefit from them.
> http://www.appaholics.in/ - Founder
> http://www.apress.com/9781430239451 - Author
> +91 81 303 77248
> Yes. I have already tried that code and it works fine, but that is only
> for loading models, and I need to place them in the virtual space around
> the device. Anyway, thank you very much Raghav
> El domingo, 8 de julio de 2012 19:55:18 UTC+2, Raghav Sood escribió:
>> On Sun, Jul 8, 2012 at 10:35 PM, santy <santiago...@**gmail.com<santiago.gonzalez.iz...@gmail.com>
>> > wrote:
>>> I´ve been trying and studying some examples but I don´t have
>>> OpenGL knowledges enough to implement what I need. I´ve been trying with
>>> Junaio too, but It doesn´t fit to my project. I tried with LookAR too, but
>>> the resolution is very low. Is there any framework, as LookAR, that can do
>>> easily what I need? (I am not an expert in OpenGL)
>>> Thank you
>>> El jueves, 5 de julio de 2012 20:33:27 UTC+2, Nobu Games escribió:
>>>> With that device rotation matrix you can only rotate your objects
>>>> around the screen, where the rotation center point is the center of the
>>>> device. This is independent of GPS location coordinates, and as the name of
>>>> that matrix suggests, it is really rotation only, not translation (moving
>>>> around the objects on any axis).
>>>> But to answer your question: yes, it is possible to just use the sensor
>>>> data without GPS and have 3D objects move around on the screen. And it will
>>>> work well for most use cases, like augmented reality games where you
>>>> usually sit as a player and move the camera around.
>>>> If you need to change the positioning of the 3D objects according to
>>>> the current device location and movement, it gets a bit more complicated.
>>>> You could make use of the GPS coordinates for translation but it
>>>> wouldn't be real time suitable, because GPS alone is usually not precise
>>>> enough. You need to combine several sensors (including the camera) for
>>>> making an augmented reality app possible that gives a seamless experience
>>>> and allows the user to freely walk around.
>>>> You could make use of acceleration sensor data for getting an idea of
>>>> the current device / user movement direction. With that information you
>>>> could predict a translation until the next GPS location update gives you
>>>> certainty about the current location.
>>>> You also could make use of realtime image analysis for calculating the
>>>> current movement direction based on changes in the video preview frames.
>>>> On Thursday, July 5, 2012 1:11:20 PM UTC-5, santy wrote:
>>>>> Thank you very much Nobu. And is it possible to place the 3D object
>>>>> just to see the object with the camera on its position without using the
>>>>> GPS???
>>>>> El jueves, 5 de julio de 2012 20:02:03 UTC+2, Nobu Games escribió:
>>>>>> On Thu, Jul 5, 2012 at 12:47 PM, santy wrote:
>>>>>>> Yes, of course I have been trying with all the frameworks I have
>>>>>>> found (LooakAR, min3D...) and I am sure I can do what I need with them but
>>>>>>> I don´t know how. I wrote here in order to find someone who has done
>>>>>>> exactly the same I have to do (there must be a lot) and to know how they
>>>>>>> did it (I need a tutorial that explains it or some advices).
>>>>>> You need to make use of SensorManager and register a SensorListener
>>>>>> in order to construct a device rotation matrix. Luckily Android already
>>>>>> provides a method that calculates that matrix which is ready for use in
>>>>>> OpenGL:
>>>>>>> * Note that because OpenGL matrices are column-major matrices you
>>>>>>> must transpose the matrix before using it. However, since the matrix is a
>>>>>>> rotation matrix, its transpose is also its inverse, conveniently, it is
>>>>>>> often the inverse of the rotation that is needed for rendering; it can
>>>>>>> therefore be used with OpenGL ES directly. *
>>>>>> You also may want to implement an algorithm that reduces the noise
>>>>>> from the sensor data, otherwise the 3D objects will jitter on the screen.
>>>>>> The simplest approach is calculating a median and / or weighted average
>>>>>> over time.
>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@**
>>> googlegroups.com <android-developers@googlegroups.com>
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscribe@googlegroups.com<android-developers%2Bunsu bscribe@googlegroups.com>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
-- Raghav Sood
Please do not email private questions to me as I do not have time to answer
them. Instead, post them to public forums where others and I can answer and
benefit from them.
http://www.appaholics.in/ - Founder
http://www.apress.com/9781430239451 - Author
+91 81 303 77248