View Full Version : Q: how to set decimal precision
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
Sarford
06-16-2008, 01:07 PM
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.
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
SketchWork
06-17-2008, 06:29 AM
Softimage tells that one si unit is one meter...
I'm quite sure that one SoftImage unit is 10cms and not 1 meter.
kim aldis
06-17-2008, 07:01 AM
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.
kim aldis
06-17-2008, 07:02 AM
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.
SketchWork
06-17-2008, 07:15 AM
Make it a peanut length if you like.
A peanut length it is then :)
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".
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
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
inge_xsi
06-17-2008, 09: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.
GeneCrucean
06-17-2008, 11:17 AM
One softimage unit is whatever you want it to be. Make it a peanut length if you like.
No it's not! I wish people would stop saying this.
grahamef
06-17-2008, 11:27 AM
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 ?
Not really. The default strength of a gravity force is 98, which corresponds to a unit length of 10 cm if you are on Earth (Earth's gravitational acceleration is roughly 9.8 m/s^2). But if you are using a different scale, or simulating conditions on a different planet, you can simply change the gravity's strength.
SebasProulx
06-17-2008, 11:27 AM
In our studio, we use 1 unit = 10cm, I think it's pretty good, but that's what softimages as to say about their unit :
GeneCrucean
06-17-2008, 11:33 AM
Not really. The default strength of a gravity force is 98, which corresponds to a unit length of 10 cm if you are on Earth (Earth's gravitational acceleration is roughly 9.8 m/s^2). But if you are using a different scale, or simulating conditions on a different planet, you can simply change the gravity's strength.
Yes but that's a bs workaround. Then you have non-physical gravity scales? Lameo.
I love how you yourself even say that the default strength is 98... but then say that earths gravitational acceleration is 9.8 m/s^2. Love it haha.
kim aldis
06-17-2008, 12:02 PM
No it's not! I wish people would stop saying this.
Yes it is. Come on Gene, you know better than that.
There's a popular opinion floating around that the SI unit equates to 10 cm and that this is what you use when you use dynamics. This is absolutely not the case. It equates to 10cm if you use the default 98.1 cm/s^2 given by Softimage but there's nothing to stop you assuming 1m per unit and using 9.81m/s^2 instead. Or 0.00981 Km/s^2 and a kilometre to each SI unit. You can use whatever you want. Metric, imperial, furlongs ..... yes, even peanut length. You just need to work out the acceleration due to gravity for that particular unit system.
Grahame, please note, gravity is not a force, it's an acceleration. :)
GeneCrucean
06-17-2008, 12:19 PM
This must be the source of the confusion.
I understand you can use any unit scale you want and do whatever scale conversion you want. So in this sense you are correct Kim.
What most people (including myself) are asking for is a more intuitive system. If gravity's physical equation is 9.8 m/s^2... then make it 9.8 m/s^2. Not 98 "c"m/s^2. Which I didn't know they were using to be honest. Not to mention... I'm a Feet and Inches kind of guy so conversions take a little extra horsepower for me.
= lack of intuition.
Put it this way. I come from Max and I never had as many scale issues as I do now with XSI.
alexyork
06-17-2008, 01:54 PM
i'm currently in the process of being serious f*cked off with autodesk and max in general and am thinking seriously about upgrading my ancient fdn 4.0 license to essentials 6.5
however there are a few issues coming from max that put me off, units being the main one (and no native DWG import, but that's for a different thread).
simply put, in architectural visualisation (my profession) you absolutely *need* proper unit integration in your 3D package. it's not good enough to have to make the visual "choice* that one SI unit = 1 peanut, 1 banana, 1 supermagicamazingcustomobject. i need the UI to tell me, with absolute certainty, the exact dimensions and position of any object. i need to be able to import an object that is 10m in x, 20m in Y and 5m in Z and *know* that it's going to import to the correct, predicted position and not be 100 times bigger than something that should be the same size. max allows you to do this.
as has been mentioned here also, the ability in max to have an object modeled in, say, metres, yet view its dimensions in inches is a huge asset. frequently i work with architects in the US or elsewhere who will tell me an object needs to be, say, 50in tall. in max i can simply switch to inch display temporarily and quickly check everything. in xsi i would have to go into google or calc and manually do lots of conversions for multiple objects. = pain.
i need to be able to import a CAD drawing that's been done in mm into a scene that uses m and have it all work. in max this is possible.
i occasionally do verified architectural images, where getting a measurement wrong because your UI tells you the object is 0.006 peanuts to the left when it should be 0.6 bananas is not simply a pain in the arse, it will get me sued for many thousands of pounds.
i've been calling for proper unit integration in XSI since v3. (and also DWG import but that's another matter.....).
also can anyone confirm if the physical sunlight/skylight system in XSI requires a certain scale to function in a truly "physical" manner? (i.e. correctly). i.e. a building modeled in cm would it render the same as the same building modeled in m using this system?
i'm seriously looking for as many reasons to jump the max ship for good here, so any help would be much appreciated!
cheers,
mantom
06-17-2008, 03:07 PM
I don't know about the skylight, but the regular light shaders are not physically accurate, so what an SI unit equals is irrelevant because it won't work anyway.
I agree the SI unit definition needs to be more explicit. having physics that are defined in decimeters and rendering a scene using a lens shader that is defined in feet is not acceptable. Users need a homogenous environment in which to work. Planning and predicting your results is just as important as producing them.
i'm currently in the process of being serious f*cked off with autodesk and max in general
Exactly!
(I better not fully express my resentment for that particular program here)
Dear Softimage team, please note: this is a time where LOTS of frustrated max users want to transition. Make it easy for them and implement the few features they will definitely miss:
- units (please no arguing any more)
- a global param to set the decimal precision of all scalars (this thread)
- a complete set of curve editing tools (please finalize this half-baked curve/subcurve implementation: cut, combine curves, delete subcurves...)
- configurable(!) popup menus (called quad menus in max. An incredible workflow booster! Yeah, xpop: not 64bit yet, no quads.)
Archvis people (of which there are many), and not only them, will be eternally grateful!!
kim aldis
06-18-2008, 10:42 AM
If gravity's physical equation is 9.8 m/s^2... then make it 9.8 m/s^2. Not 98 "c"m/s^2.
It's both. Well, strictly speaking they're both the same thing. The acceleration due to gravity is 9.8m/s^2, 98cm/s^2, .0098km/s^2. It's also 32.174 ft/s^2 and, by my reckoning 82 peanuts/s^2. All are correct, none is wrong.
I'm not trying to pick a fight here and I don't disagree that there's a case to be made for catering for different unit systems. I'm just trying to clear some of the mud that inevitably gets stirred up by people's misreading or misunderstanding and occludes the truth of what's going on.
I've never been annoyed by the lack of unit in xsi, I use 1siU = 1 meter. (a mm is enough precision for me ;) )
but coming from from lightwave, I liked its way of dealing with units : you choose the default unit (inch, meters, what ever) and then, when you type a value, you can leave it unitless (will be the default one) or type an explicit unit (can be decimal or feet) and lightwave will convert it for you. I think you can even type 1m+2inches...
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.