WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-24-2014, 04:22 PM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
Question Meters in vizard

Hello, could help me to know how much equals a linear unit vizard in meters.
position objects to do with:

Viz.addChild obj1 = ('Obj1.dae', pos = [0,0,0])

if I want to add another object to exactly 1 meter from the first object I would do as

* Viz.addChild obj2 = ('Obj2.dae', pos [1,0,0])

but this throws me results that are not real.

my objects are cubes which I made in SketchUp where 1m is that while each side.

doing some trial and error calculations I realize that following this
1m. = 39 units vizard.

What I can say about this
Reply With Quote
  #2  
Old 07-25-2014, 07:46 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
Seems like a meters - inches problem. I'm not sure whether Vizard uses the metric system, but check the scaling of your object in Sketchup, especially your settings while exporting. Alternatively, you could first scale your object in Vizard to the right proportions. To check whether the scale of your object is 1 meter, import a standard box in Vizard (viz.add('box.wrl')), which is 1 cubic meter if I recall correctly. You can compare the size of your custom objects to that of the box.
Reply With Quote
  #3  
Old 07-25-2014, 08:41 AM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
Thanks, I already did that but the box.wrl has Vizard is smaller than expected
Reply With Quote
  #4  
Old 07-25-2014, 12:01 PM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
some work and box vizard but blender and effectively are the same size. Thanks Frank Verberne
Reply With Quote
  #5  
Old 07-25-2014, 12:21 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,457
When loading collada models use the collada scale option to convert from inches to meters:

Code:
viz.setOption('viz.model.apply_collada_scale',1)
Reply With Quote
  #6  
Old 07-25-2014, 12:26 PM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
Hi Jeff.
Your code is in Vizard??? if it is, I have do it.

model=viz.Child('modelo.dae', pos=[0,0,0])
viz.setOption(model.apply_collada_scale,1)


????????????????????????????????????
Reply With Quote
  #7  
Old 07-25-2014, 12:52 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,457
Yes, but set the option before loading the model:

Code:
viz.setOption(model.apply_collada_scale,1)
model=viz.addChild('modelo.dae')
Reply With Quote
  #8  
Old 07-25-2014, 02:27 PM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
Jeff.

I have error "AttributeError: 'VizChild' object has no attribute 'apply_collada_scale'"
I don't understan

My code is:
model=viz.addChild('ID_1.dae')
viz.setOption(model.apply_collada_scale,1)
Reply With Quote
  #9  
Old 07-25-2014, 03:06 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,457
Sorry, the name of the option is viz.model.apply_collada_scale. That will be applied to all collada models loaded after it is set:

Code:
viz.setOption('viz.model.apply_collada_scale',1)

myModel=viz.addChild('ID_1.dae')
Reply With Quote
  #10  
Old 07-25-2014, 03:14 PM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
Excelent, it is perfect. Thanks
Reply With Quote
Reply

Tags
distance, meters, size, unit

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
Realistic Light and Shadows Using Vizard and 3DS Max jde Vizard 4 07-13-2012 10:58 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 10:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 10:46 AM
.3DS importing in Vizard and 3D Studio jde Vizard 1 08-28-2009 03:14 PM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM


All times are GMT -7. The time now is 03:36 PM.


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