WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Mapping position data to a scaled transform (https://forum.worldviz.com/showthread.php?t=5401)

tokola 07-10-2015 10:28 AM

Mapping position data to a scaled transform
 
1 Attachment(s)
I have the following problem and was wondering if there is a solution. I want to use a scaled version of a top-down map, and have all position data transformed to the scaled map. A visual representation is included in an image. The gray/green map is the scaled version of the actual 3D space, which is superimposed with transparency (delineated also with a red line).

The map has a scale factor of [1,1,1.2]. How can every position passed to the map be automatically transformed to correspond to the correct spot? I use preScale but probably in the wrong way, as it scales the original 3d node, too.

I would appreciate if there is a way that does not involve multiplying every single value passed with a factor, as this would entail a considerable amount of tweaking.

Thanks!

Jeff 07-20-2015 04:32 PM

Take a look at the onTheFly.py tutorial script (File > Quick Open > type: onTheFly). That shows a top down map of the scene and draws the position of the viewpoint in the map.

tokola 07-26-2015 10:50 AM

Thanks Jeff. I've seen this while trying to find a solution. However, it's an 1:1 scaling of the actual virtual world. If you notice the attached image, I want to have a different vertical scaling, translating all position data to reflect this change.

Is there a way to do this?

tokola 08-02-2015 10:06 AM

Jeff,
any updates on this?
Thanks!

Jeff 08-03-2015 01:46 PM

The onTheFly example script gets the view position of the bird's eye window in pixel coordinates. Those x,y,z pixel values can be multiplied by any scale factor when drawing the vertices that represent the view path. Are you also adding a bird's eye sub-window in your application?

tokola 09-12-2015 12:37 PM

Jeff,
Sorry for my long absence, I was away for the whole August.
I am using a bird's eye sub-window indeed. I followed your solution of multiplying each x,y,z position value that appears on the map with the scale factor. I was just asking if there is a more "automated" way to make this work, instead of having to apply the factor on every call of things (quads) appearing on the map. Probably not?

Jeff 09-16-2015 02:45 PM

You could try applying a scale factor to the on-the-fly node instead of each vertex that's added.


All times are GMT -7. The time now is 06:16 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC