WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-16-2007, 02:33 PM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
Scaling

Hello. I am running into weird things with scale. I made a box in 3dsmax and it is 1 m by 1 m. Then I scaled it by .1 in all directions and added it to my world. However, it is spanning from -5 to +5 in either direction. Why is this? I need to be doing some fine calculation of the coordinates of holes in this box and I need consistent scale.

Also, I want to add text to the specific coords that I find for the holes, however it seems the text coordinate system is different - 0,0,0 is in the lower left corner, not at 0,0,0 in my world. How can I get text to translate to a coordinate in the world? I tried this:

Code:
text = viz.addText('Hi')
text.translate(0,0,0, viz.ABSOLUTE_WORLD)
That did not work.
Reply With Quote
  #2  
Old 07-16-2007, 03:52 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Did you set your system units properly within 3dsmax? Have a look under the Reference -> 3D Models -> Creating and exporting 3D models -> Distance units section of the Vizard documentation for an explanation on how to do this.

Text is aligned to the lower left corner by default. If you want to align the text to its absolute center then change the alignment with the following command:
Code:
text.alignment(viz.TEXT_CENTER_CENTER)
Reply With Quote
  #3  
Old 07-17-2007, 01:55 PM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
Great, that fixed the text. I'm having problems with scaling the text though. I use text.setFont. I have tried values ranging anywhere from .3 to 36 and in all cases the text is gone...any ideas?

Code:
for x in range (-10, 10):
	for y in range (-10,10):
		       text = viz.addText('(' +str(x) + ', ' + str(y) + ', -1)')
			text.alignment(viz.TEXT_CENTER_CENTER)
			text.translate(x,y,-1)
			text.fontSize(6)
Also, I followed all the directions in the 3dmax tutorial about scaling and my 1m square box is still spanning from -5 to +5 in my world. Ideas?
Reply With Quote
  #4  
Old 07-17-2007, 08:53 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

You should only use the fontSize command when the text is being displayed on the orthographic HUD. Otherwise, just use the node.scale() command to change the size of the text.

I can't tell what is going on with your model without looking at it. If you want me to take a look then email the .max file to me at lashkari@worldviz.com.
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


All times are GMT -7. The time now is 05:36 AM.


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