Horde3D

Next-Generation Graphics Engine
It is currently 24.11.2024, 05:39

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 05.07.2008, 09:48 
Offline

Joined: 10.04.2008, 09:13
Posts: 86
It seems ColladaConv doesn't take the unit scale into account when converting a
Collada file. When there's a:

Code:
<unit meter="0.01" name="centimeter"/>

entry in the file all positions are not converted.


Top
 Profile  
Reply with quote  
PostPosted: 07.07.2008, 11:11 
Offline

Joined: 17.02.2008, 21:08
Posts: 24
Location: Switzerland
Horde3D has no concept of a fixed real-world scale, so it wouldn't currently make sense to rescale things based on unit values.


Top
 Profile  
Reply with quote  
PostPosted: 07.07.2008, 12:11 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
reiko wrote:
Horde3D has no concept of a fixed real-world scale, so it wouldn't currently make sense to rescale things based on unit values.
I would tend to disagree - if we don't apply the scale in the collada converter, someone has to apply it manually afterwards. We can ignore the units entirely, and just multiply by that unit-scale value.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 07.07.2008, 22:07 
Offline

Joined: 17.02.2008, 21:08
Posts: 24
Location: Switzerland
That's not really a scale that should always be applied... it just specifies the scale of the model against a "real world" unit. Not everyone will be using metres as their unit of length in their application, so it doesn't always make sense to multiply (or divide, in this case - note that it means that 1 model unit is 0.01m) by the specified unit. If you want to scale the model, you should really use a scale transform instead.


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 13:43 
Offline

Joined: 11.06.2008, 10:34
Posts: 119
Still slightly confused on Horde's Scales, and how it treats each object. At the moment if you load a geo model file, HordeEdit seems to apply its own scale, (e.g. 0.2 0.2 0.2) - what reference is this based upon?

So if im correct in reading the thread, the unit definition within the Collada file is currently redundant? and if thats true, what defines the model size once converted to GEO?

_________________

Let's bring 'em out! Any old iron! Any old iron!
A door opens and a homewife brings out a rather sophisticated-looking ground-to-air missile system, and dumps it on the cart.
Thank you.


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 14:02 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
If you add a model to the scene using the editor, it will be added with a transformation that should fit into the current camera viewing frustum. That may be not the best way to add it. I just used this method to avoid question like "where is my model" when the model's default size does not fit to the current scene scale and may be much to big. Next to that there may be bugs in the calculation of this transformation. I remember that I changed something but can't remember if it was before or after the release of the last official version.

So the transformation used for the reference model in the editor has nothing to do with the transformations used in the .scene.xml file (or in the collada file). Instead it replaces the default transformation of the root node in the .scene.xml file. But the root node has the identiy matrix by default anyway.


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 14:03 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
PuG wrote:
So if im correct in reading the thread, the unit definition within the Collada file is currently redundant? and if thats true, what defines the model size once converted to GEO?
The exact size (in world units) that the model was originally. The converter doesn't change the size of the model, it just outputs it at the same size.

When you are creating a game, you typically come up with a scale (1 unit is one meter, a character is then roughly 2 units tall), and model to that scale.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 14:10 
Offline

Joined: 11.06.2008, 10:34
Posts: 119
Thanks for the replies! Just as swift suggested I was about to use 1 unit = 1 meter, just need to get Modo & LW dialled into the same.

Volker - Perhaps it might be a good idea to add an option to allow the user to select in regards to the default object scale?

_________________

Let's bring 'em out! Any old iron! Any old iron!
A door opens and a homewife brings out a rather sophisticated-looking ground-to-air missile system, and dumps it on the cart.
Thank you.


Top
 Profile  
Reply with quote  
PostPosted: 16.09.2024, 07:01 
Offline

Joined: 02.01.2017, 02:59
Posts: 24
yup, the converter should have a scale option, as not all assets come from the same place.
I will look into this, but I"m not sure how this works with animation? I would assume apply the scale to everything except rotations?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group