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ó:
>
> AndAR has a sample app capable of loading some obj/mtl models. See 
> http://code.google.com/p/andar
>
> On Sun, Jul 8, 2012 at 10:35 PM, santy 
> <[email protected]<[email protected]>
> > 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).
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> El jueves, 5 de julio de 2012 19:40:21 UTC+2, Nobu Games escribió:
>>>>>>> https://www.google.**com/search?q=Android+**Augmented+Reality<https://www.google.com/search?q=Android+Augmented+Reality>
>>>>>>
>>>>>>
>>>>> 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:
>>>>>
>>>>> SensorManager.**getRotationMatrix()<http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float[],%20float[],%20float[],%20float[]%29>
>>>>> .
>>>>>
>>>>> *This matrix is ready to be used by OpenGL ES's glLoadMatrixf(float[], 
>>>>>> int)<http://developer.android.com/reference/javax/microedition/khronos/opengles/GL10.html#glLoadMatrixf%28float[],%20int%29>.
>>>>>>  
>>>>>> *
>>>>>>
>>>>>> * 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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to