Start a new topic

Cannot scale 3D Model up or down...

Cannot scale 3D Model up or down...


Hi! 

I have three different 3D models and each of the displays well when target image is recognized. However the 3D objects are too large. I checked Javascript documentation and found description of "scale". However non of 3D objects that I have react to scaling... Am I missing something?

I tried different values for "scale": 

0.5  -  which is support to scale my object down to half. 
0.05 - No difference 
0.005 - No difference 
0.00005  - No difference. 3D object is still huge. 

I was thinking may be javascript gets cached  but no, if I change 3D object name to request another object to load, it works. New object loads but still no difference in scale. Car 3D model available in Wikitude examples folder displays well but I guess it was created of a proper size. Tried scaling the car object up to 2 for example. Did not work either....  Am I missing something?

 

    var modelCar = new AR.Model("car.wt3", {

                                 onLoaded: this.worldLoaded,

                                 scale: {

                                 x: 0.5,

                                 y: 0.5,

                                 z: .05

                                 },

                                 translate: {

                                 x: 0.0,

                                 y: 0.05,

                                 z: 0.0

                                 },

                                 rotate: {

                                 roll: -25

                                 }

                                 });

Hello Sergey,

I cannot see an error with your instantiation of the AR.Model object. Could you zip all files of the project and post it here? If you don't want to post your project publicly you can send it to forum@wikitude.com with the subject "Cannot scale 3D Model up or down..." then I can have a closer look at it.

Regards,
Christian

Christian, thank you very much for helping figure out the problem with scaling. It works now! 

I am having the same issue. Can you please tell what was the solution?

In Sergey's case the initial scale was overwritten by a PropertyAnimation. Usually, when experiencing scaling issues, the original model is too big and the scaling value has to be set very low. To figure out the scaling value: one square of the grid in the Wikitude 3D Encoder equals the height of a target image if you use image recognition in our SDK.

 

Hope that helps,

Christian

salam khan wrote "I having having issue with pinch to zoom when snap to screen a 3d model. It is working fine with iOS but not working with Android. What could be the problem? Is this a bug ?"

 

This is a different issue. I split the thread. The new thread can be found at https://support.wikitude.com/support/search/topics?term=Issue+with+pinch+to+zoom+of+a+3D+model+in+snap+to+screen+mode

I am also having an issue with scaling a 3D Model on a GeoLocation. I would like to adjust the scale of the model depending on the distance to the user. But the scale stays always the same. Can you please help?

I think it has something to do with my 3D model. When I use earth.wt3 from the 05_3dModels_6_3dModelAtGeoLocation example it works. But my own model does not work...

Can I upload my 3D model maybe, so you can check?

Hello Ingrid,

What I would recommend you do first is check our documentation regarding how to add animation to 3D models and the forum as well as you will find several posts there. I have placed some links below:

1. Appearing animation
2. How to display 3D animation on Geo
3. Unable to run animation in 3D model created using Blender

Animation of the planets is done similarly to the 3D Model sample where the circular movement is composed of multiple AR.PropertyAnimations that are combined using AR.AnimationGroups. The animate(planet) function is responsible for creating these animations for a moving planet.


Thanks

Eva

Hello Eva,

Thank you for the response. But what I mean is that the model does not scale at the first place. So without adding animations. I give it a scale on creation but it is not applied to the model at all.

Maybe I can send you the FBX so you can take a look at it?


Greetings, Ingrid 

Hello Ingrid,

Could you please send me apart from your FBX model your complete AR experience (.html, .css, .js files, assets, target images) so we can test internally?

Thanks
Eva

 

Hello Eva,


Thank you for looking into this! Where can I send the sources to? I already tried support@wikitude.com and forum@wikitude.com, but that doesn't work.

Hope to hear from you soon.


Greetings, Ingrid

Hi Ingrid,

You should be able to send them at support@wikitude.com. If the files are too big then you can also upload them somewhere and send the url.

Thanks
Eva

 

Login or Signup to post a comment