WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-10-2015, 10:28 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Mapping position data to a scaled transform

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!
Attached Thumbnails
Click image for larger version

Name:	map_transform.png
Views:	1825
Size:	296.1 KB
ID:	717  
Reply With Quote
  #2  
Old 07-20-2015, 04:32 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #3  
Old 07-26-2015, 10:50 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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?
Reply With Quote
  #4  
Old 08-02-2015, 10:06 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Jeff,
any updates on this?
Thanks!
Reply With Quote
  #5  
Old 08-03-2015, 01:46 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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?
Reply With Quote
  #6  
Old 09-12-2015, 12:37 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
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?
Reply With Quote
  #7  
Old 09-16-2015, 02:45 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could try applying a scale factor to the on-the-fly node instead of each vertex that's added.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing parent without changing absolute global position? The SundanceKid Vizard 2 05-23-2014 02:43 PM
Use saved text file data as replay sources problem mizutani_jun Vizard 4 10-14-2010 04:49 PM
writing joystick position to a data file Saz Vizard 3 12-17-2008 05:18 AM
Get position data in an own little program Researcher Precision Position Tracker (PPT) 2 02-01-2006 02:55 AM
tracking using quaternarion data jfreeman Vizard 2 06-01-2005 08:48 AM


All times are GMT -7. The time now is 06:44 AM.


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