Clamp Scale during OBJ import

I was importing an OBJ, and the scale comes in very small.

There is a Clamp Scale option that seems to “read” in the docs that it can change the scale of the imported OBJ, and if you don’t want to modify it, you can set it to 0.0

I imported the same OBJ 3 times, using a Clamp Scale of 0.0, 10 and 100, and the resulting imported OBJ had no change in scale? :confused:

Any thoughts?

Did a test importing an obj file.
Set the clamp to 0, the object came in full size with a scale of 1
Set clamp to 10, the object came in 10% of the original size with a scale of 0.1
Set the clamp to 1 and the object came in 1% of the original size with a scale of 0.01
Using Blender 2.64 RC2, no other changes made to the obj import settings

Attachments


Hmmm…I am using Blender 2.63…guess its time to upgrade. Downloading now, thanks for testing it!

BTW, I need to scale “up”, can you negative the scale? EDIT: That made no sense at all…I guess I would need it at like 1000, which would be 10x

I find that importing OBJ is quite hard. It does matter where the OBJ comes from. Different packages have different units and exporters. So my workflow is (I work in metric system) I import the model without playing with this setting. Often the model comes in flipped on different axes (again it’s a matter of export settings in your app). Then I go to the top view and scale the model (I set blender units to meters so that I can see what the spacing of the grid is) to a value which is what I want (usually 1/10 or 10x solves it) and rotate it. After that it’s important to apply the scale and rotation, because without it some measurement based modifiers wouldn’t work. I usually move the model near 0,0,0 position(this is a good practice in 3d apps). And if you work like this you can surely go negative.

It is a good idea, but I am actually trying to automate the import of an object from another application, so in that case the scale, rotation and position should be consistent coming from that application to Blender.

OK, running 2.64 RC2:

I exported the default cube to the desktop, as a wavefront OBJ (default choices)

Then File -> Import -> Wavefront OBJ
Select Clamp Scale and change from 0.0 to 10
Select the cube OBJ and press Import
No change in size versus original

Then File -> Import -> Wavefront OBJ
Select Clamp Scale and change from 0.0 to 100
Select the cube OBJ and press Import
No change in size versus original

I must be missing something in the steps above???

It works for me. I made a cube 2x2x4 meters in sketchup (where I work in milimeters). Exported an OBJ and imported into blender. With clamp disabled it acts as kilometers (blender units are meters so it understands my 2000mm as 2000units=meters=2km). Now when I import with clamp set to 10 it imports as it is supposed to. With clamp set to 1 the import is 10 times smaller as it shlould be so the clamp works. Try to import the attached OBJ which contains this cube.

Attachments

Untitled.zip (12.2 KB)

Yea, that worked, using that OBJ in your zip, with a clamp scale of 10.

So, I then exported it back out (File Export Wavefront OBJ, default settings), and re-imported it leaving the clamp scale at 10, and it comes in at the same size :mad: …but here is what is strange, if I set the Clamp Scale to 3, 2, or 1, it comes in much smaller. Any integer above 3 (I tried 4, 5, 10, 100 and 1000) … and it comes in the same size.

How about this, I attached the same OBJ of yours that I exported. See if you can scale it different than I explain. Me-thinks its a bug. (which would mean that Richard got lucky in choosing the values he did, LOL!)

I also went back and re-tried the object I had, and Clamp Scaled it to 0.1, since it was already small…and it worked to make it very, very small.

sketchup.zip (13.8 KB)

Ok, it behaves as you describe. It even comes in right if I leave clamp at 0.00 (off). So my theory is that the word “clamp” is important. Because this object has 4 as its longest dimension anything from 4 up won’t make any difference since the model is smaller. The mechanism starts only if it finds some dimension of the imported model that is bigger than specified by the clamp value. Then it scales it down by some weird factor which I don’t completely understad. Which leads me back to my workflow :slight_smile:

it scales it down by 10 until the value is smaller then the clamp setting, this way if your model has 100==1meter, you still have a useful scaled down size.

Yea, I submitted a bug report, but all they did was refine the tool tip. IMO, they could call it “Reduction Scale” or “Scale Down”, or something that is not as misleading. With just the title of Clamp Scale, it infers that it is a scaling operation, with a lock or clamp to a specific scale.

Not a big deal in the grand scheme of things. Hopefully, the tool tip helps others not get as confused.