Start a new topic

Model and Drawable scaling to match real world's distance

 Hi everyone !

I am currently trying to display a grid at a 0 altitude to help the user to locate himself around GeoObjects (a square of this grid will represent 50m in reality for exemple) but I can't seem to manage to get good results...

I tried two things : using an ImageDrawable and using a Model.

When I'm using a Model, I get the expected result but the Model seems to be cut at a certain distance as if Wikitude wouldn't render completly wide Models...

(the render distance of the grid isn't linked to the context.cullingDistance)

I added pictures to show you what I mean ; the first one is taken at an emulated altitude of 25m and the second one at an altitude of 100m. On both pictures, the object is placed 100m ahead. On these pictures, we can see white and black dots showing some of the rest of the un-rendered grid.

And when i'm using an ImageDrawable, it isn't cut but I get trouble scaling it to perfectly match real world's distances. I tried scaling it by hand at different altitudes and report the scale factors in an excel table to draw the function  scaleFactor = f ( altitude )  but beside getting a weird function  ( I get something like f(x) = 50000 x^-0.85 ), it doesn't match well enough for each altitude.

Would you have any advice on how I could manage this ?

The ideal and easiest being, I think, completly render the grid Model but I don't know if it is possible



Hi Vivien

could you please send us your grid Model?

Best Regards,


Hi Alex,

Sure, here it is.
(62.1 KB)
(21.6 KB)
btw, the Model is set with the option
scale : { x: 32, y: 32, z: 32 }


Hi Vivien,

this seems like an issue that could be solved with mipmaps, unfortunately our SDK does currently not support this.

You can already see the issue when you load the model in the Wikitude 3D encoder.

A workaround for this could be to increase the grid line thickness with the radius. (thick lines on the edges, thin lines in the center)

Another way to solve this issue could be, instead of using a disc model with a grid texture, creating a 3D model of the grid.

Best Regards,


Hi Alex,

Thanks, it worked perfectly !
I didn't want to use a 3D model because I expected lower performances (my model has ~70K vertices) but it actually works better than with the texture...


Thanks for your help,


Login or Signup to post a comment