AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / General Support / Q: how to set decimal precision
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  
3 pages: 1.2.3 last

Q: how to set decimal precision
Rate this thread
 
27821
 
Permlink of this thread  
avatar
  • sfu_Gene
  • Posted: 16 June 2008 12:49 AM
  • Total Posts: 103
  • Joined: 26 March 2008 07:04 AM

Hello!
Does anyone know how to set the precision of the parameter input fields to more than the 3rd decimal place?

Here’s the problem:
I want the models and assets I build to be compatible across scenes, so I need to use the same units in all projects. Now XSI does not support real scene units yet, so I assume one viewport grid unit to be 10cm, which obviously is the scale in which the skeleton and character primitives are built.
I’m modelling an object right now which has to be precisely 5.25mm high, which would be 0.0525 generic units - rounded to 0.053.
Best,
Gene



Replies: 0
avatar

Softimage tells that one si unit is one meter so I think you are 10 times too small.
In general I would stay away from too small (or too big) models couse that can give all kind of problems.
If it doesn’t matter for your scenes, scale everything up by a factor 10 or 100, just to be in the comfort zone.



Replies: 0
avatar
  • sfu_Gene
  • Posted: 16 June 2008 08:10 PM

I see, thanks.
Yet one XSI is definitely 10cm. Proof: Create a basic skeleton and have a look.
Also, look at simulations, where the scene scale plays a major role: acceleration, for example. Gravity force is set to an amplitude of 98,1 per default.

I checked it: a ball takes 37 frames to drop from a height of 100 units. Actually, it should be 25 at 25fps and 10m/sec, but scaled by a factor of 10, it would be wrong by a magnitude.

I really hope scene units will be implemented soon (You can find a units entry in the property sheet already, but it contains only color space yet).

Back to the topic:
So it is not possible to set decimal precision for parameters (like e.g. in 3ds max)?

Best,
Gene



Replies: 0
avatar

[quote=Sarford;6283]Softimage tells that one si unit is one meter...

I’m quite sure that one SoftImage unit is 10cms and not 1 meter.



Replies: 0
avatar

although the input box only shows 3 decimal places the actual precision is much greater. If you input > 3 dp XSI will take the number you input.



Replies: 0
avatar

[quote=SketchWork;6321]I’m quite sure that one SoftImage unit is 10cms and not 1 meter.

One softimage unit is whatever you want it to be. Make it a peanut length if you like.



Replies: 0
avatar

[quote=kim aldis;6324]Make it a peanut length if you like.

A peanut length it is then :)



Replies: 0
avatar
  • sfu_Gene
  • Posted: 16 June 2008 11:58 PM

[QUOTE=kim aldis;6323]although the input box only shows 3 decimal places the actual precision is much greater. If you input > 3 dp XSI will take the number you input.

Not in the PPGs. The parameters are rounded to what is specified in the related SPDL file.
Open the Script Editor, and watch what is logged when you set for example a sphere’s radius to 4,001 - this will of course work. Now set it to 4,0001 - It will be rounded to 4.
The opposite works: if you run
SetValue("sphere.sphere.radius", 4.0001, null);
in the Script Editor, it will not be rounded.

I figured how to edit a SPDL file to accept a higher decimal precision, thanks to Mathaeus:
http://www.xsibase.com/forum/index.php?board=16;action=display;threadid=25565

- open the SPDL file of a PPG (RMB in some empty area in the window -> Edit), Editor pops up
- open a Windows Explorer, make a backup copy (file location is shown in the Editor), rename it to e.g. xyz.spdl.orig
- find the parameter you want to be more precise, and add these lines (red)
e.g. C3DSphere.spdl:
Parameter “radius”
{
GUID = {085CAE71-89C6-11d0-A75C-00AA00BB6238};
Name = “Radius”;
Description = “Radius”;
Type = VT_R8;
Range = 0.01 to Max;
UIRange = 0.01 to 50.0;
UIType = “Number”
{
Decimals = 6;
}

Caps = Animatable, Persistable;
Class = E3DPROPERTY_CLASS_GEOMETRY;
}

It does not matter where to put those lines inside the block {}.
(Copy/Pasted out of C3DLightPoint.spdl, Parameter “ShadowMapSoft")
- Save the file
- Refresh the PPG (RMB -> Refresh)
Voilá! You don’t even need to restart XSI.

More info: XSI SDK Docs, “Defining Shader UI Controls with SPDL”.



Replies: 0
avatar
  • sfu_nixx
  • Posted: 17 June 2008 01:17 AM

[quote=kim aldis;6324]One softimage unit is whatever you want it to be. Make it a peanut length if you like.

But then you ‘ll have problems when you start dealing with dynamics, won’t you ? Isn’t that why SI suggests that 1 SI unit = 10cm ?

I ‘ve already said countless times how much I ‘d like to see this analogy reflected throughout the UI.

nick



Replies: 0
avatar
  • sfu_Gene
  • Posted: 17 June 2008 01:37 AM

I agree, nixx.
Internally, XSI shall use whatever units it wants, but in the user interface it would simply be more clear if you knew how “big” an object really is in units like mm, inches or whatever.

Sure you can make your peanut 1000 units big, but when you want to create a banana next to it from which you know it’s 15cm long, how many units do you have?

Say you have a cube with 0,01 units. How much is that in the real world?
Assumed 1 unit = 10cm, it would be 1mm.
What’s more obvious - 0,01 or 1mm?

All we want is that XSI does this simple calculation for us and displays some units in the UI!

In 3dsmax you can even choose both: which units are used internally, and which ones shall be displayed next to the parameters.
Two units are already too much for my taste. When you merge scenes with different internal units, it can do an automatic scale, but you buy all sorts of weird problems with that.

The solution for me would be a global parameter like:
1 XSI unit = xxx.xxx km/m/cm/mm/inches/peanuts…
and a checkbox: display units next to params or not



Replies: 0
avatar
  • inge_xsi
  • Posted: 17 June 2008 01:48 AM

Put plainly units in XSI are a weak spot and always have been.  Many people want to gloss over this but the fact still remains that XSI units are poorly planned and implemented and create a lot of problems for most users.

So please fix them and stop making excuses for what is clearly a problem area.



Replies: 0
3 pages: 1.2.3 last