CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
322 stars 233 forks source link

scale differ from ios to android #93

Open miias opened 2 years ago

miias commented 2 years ago

hello everyone so i have some 3d objects that im spawning on a plane on android they have a normal scale but on ios their scale is not the same eventho i set the starting scale to (1,1,1) like so object = ARNode( type: NodeType.fileSystemAppFolderGLB, uri: 'model.glb', scale: Vector3(prevScale, prevScale, prevScale)); prevScale = 1 photo_2022-03-01_12-17-48

here's the model on android

WhatsApp Image 2022-02-28 at 12 13 05 PM

and here's the model on ios from about the same distance

resie001 commented 2 years ago

yeah, dunno why that's my model have different scale in iOS.

leeprobert commented 2 years ago

The internal code scales down the Android models to 0.01 so you need to upscale it back up in your flutter code. I am still unclear why this was done. @CariusLars - can you let us know what the logic was for this originally?

resie001 commented 2 years ago

any solution? Cause one of my projects used this package. @CariusLars

resie001 commented 2 years ago

Hey @miias , recently i fork this repo and make little adjustment for iOS. If you wanna try it, you can use this repo. but don't make high expectation for this forked repo though, i just college student 😅

ehabme commented 2 years ago

any update guys ? i have the same problem ? i don't have a real phone so i upload alot to testfight for test the same issue :( what can i do ? i tried to set scale as (1.0,1.0,1.0) but no new !

resie001 commented 2 years ago

hey @ehabme , maybe use my repo, forked from this repo. But don't make high expectation for this forked repo though, i just college student 😅. I just edited for iOS code that have scale as 1.0, for my case it just worked.

ehabme commented 2 years ago

hey @ehabme , maybe use my repo, forked from this repo. But don't make high expectation for this forked repo though, i just college student 😅. I just edited for iOS code that have scale as 1.0, for my case it just worked.

yes , i got it bro , i did the same you said and working good , thank you bro , and all plugin developers

remakerich commented 2 years ago

Guys, Sorry I'm a bit off topic, but Is it normal that on iOS objects are rendered without any lighting... they look like raw 3D models, very bad to look at, cuz they have no fidelity at all.

On Android objects look decent, because theres some lighting fx and even some shadows...

Does someone know how to fix it?