WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Scaling (https://forum.worldviz.com/showthread.php?t=1148)

mjabon 07-16-2007 02:33 PM

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.

farshizzo 07-16-2007 03:52 PM

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)

mjabon 07-17-2007 01:55 PM

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?

farshizzo 07-17-2007 08:53 PM

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.


All times are GMT -7. The time now is 08:33 PM.

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