Previous Thread  Next Thread

chat icon Midlevel Adjustment for Displacement

treddie

Posted: Thu Jan 03, 2013 9:58 am
Joined: 03 Jan 2013
Posts: 23
Hi,

I was curious why Blender has a Midlevel adjustment for displacement in length units? It seems crazy to have any kind of units like meters to determine what midlevel is. Why didn't they simply make it a percentage of gray? In other words, if you don't have an accurate idea of what scale an object is at, it seems illogical to base the midlevel on any distance at all. In fact, just what does it mean to say, for instance, "midlevel distance of 30cm"? 30cm from what?

Very confused Sad
Reply with quote


CoDEmanX

Posted: Thu Jan 03, 2013 7:41 pm
Joined: 05 Apr 2009
Posts: 695
just tested v2.65 and it's a slider from 0.0 to 1.0, no meters. What's your version?
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


treddie

Posted: Thu Jan 03, 2013 9:29 pm
Joined: 03 Jan 2013
Posts: 23
2.64...Time to upgrade!

Curious why they ever had it set up that way, though in 2.64 and earlier...strange.
Reply with quote


treddie

Posted: Thu Jan 03, 2013 10:23 pm
Joined: 03 Jan 2013
Posts: 23
2.65...Same problem. Is there a config setting somewhere that I can't find that normalizes that slider?
Reply with quote


treddie

Posted: Thu Jan 03, 2013 10:30 pm
Joined: 03 Jan 2013
Posts: 23
Interesting that the online doc says that it is normalized, but I still get units! I even did a complete uninstall of the previous version before installing 2.65.
Maybe I need to wipe out the user info, too.
Reply with quote


CoDEmanX

Posted: Thu Jan 03, 2013 10:59 pm
Joined: 05 Apr 2009
Posts: 695
go to scene tab and set Units to None!
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


treddie

Posted: Thu Jan 03, 2013 11:18 pm
Joined: 03 Jan 2013
Posts: 23
aHA! That did it! Thank you very much, CoDemanX.

One question though...When I am importing a mesh, I assume I need to select the correct units. Is the idea that once the mesh is imported, to then turn units to "none"? If so, on exporting, I assume I would then turn units back on, after displacement is finished.
Reply with quote


CoDEmanX

Posted: Fri Jan 04, 2013 12:31 am
Joined: 05 Apr 2009
Posts: 695
doesn't really matter, you can always change scale and if you set it to None before import, it should work just fine.
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


treddie

Posted: Fri Jan 04, 2013 2:53 am
Joined: 03 Jan 2013
Posts: 23
What units are native to blender? It's important, because if I work say in Meters in all my other programs, then I can avoid nasty scaling issues if Blender is using the same system. Having to worry about scaling can be a pain especially when the conversion can be some unknown factor of 10, or .3937x10^x, or something out of the ordinary.
Reply with quote


treddie

Posted: Fri Jan 04, 2013 10:08 am
Joined: 03 Jan 2013
Posts: 23
I'm still bugged by the fact that units would EVER be involved with the "midlevel" in principle. Bump height comes from values of gray FIRST, not some distance which has nothing at all to do with gray level until the end. The only time units come in is when you say, for instance, that 50% gray is no height (your midlevel) , pure white is max + height (+1) and 100% gray is maximum -height (-1). THEN you CAN apply a scalar to the gray level % that says that the heights are +-% * desired units. If you set your zero-height at 100% gray (black), then the range is 0 to +1 and again you can use Gray level % * unit scalar.
But saying, for example, that midlevel = 20cm makes no sense at all.
Reply with quote


CoDEmanX

Posted: Fri Jan 04, 2013 12:58 pm
Joined: 05 Apr 2009
Posts: 695
there is no native unit system. 1 unit is 1 unit. The value "5" imports as 5 Blender units.
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


treddie

Posted: Fri Jan 04, 2013 9:42 pm
Joined: 03 Jan 2013
Posts: 23
Quote:
there is no native unit system. 1 unit is 1 unit. The value "5" imports as 5 Blender units.


OK, on the surface that definitely simplifies things. But it also makes the situation more confusing in that units are offered in Blender. If those units are offered as a global units system to override Blender's unit-less system, that idea makes sense. But if it is only meant to be applied to some PART of Blender, like for displacement, that does NOT make sense if there are no global units beyond Blender's unit-less system.

And it still does not address why Blender offers the option of interpreting midlevel as being measured in some system of units (Please see my last post up).

But it is even more messed up...Even if you go "unit-less", the midlevel slider can go above and below value "+-1". In fact, the slider has infinite +- range. Without being normalized to "+-1" as maximum/minimum, there is no constraint on the range to tell Blender what degree of displacement corresponds to any particular gray level.

This really sounds and looks like a bug to me.
Reply with quote


treddie

Posted: Sat Jan 05, 2013 10:55 pm
Joined: 03 Jan 2013
Posts: 23
Can anyone comment on this? I am trying to get my mind around it, because the results I am getting for displacement are unpredictable. There is no easy way to set up a particular gray level to be zero-displacement, so I find that even those areas in the grayscale image that should not displace, in fact do, and that messes up how objects fit together, especially if they have close tolerances.
Reply with quote


CoDEmanX

Posted: Sun Jan 06, 2013 3:28 am
Joined: 05 Apr 2009
Posts: 695
if you really want to get rid of this, compile blender yourself with the following edit:

BlenderSVN\blender\source\blender\makesrna\intern\rna_modifier.c

line 1669:

Code:
prop = RNA_def_property(srna, "mid_level", PROP_FLOAT, PROP_DISTANCE);


change PROP_DISTANCE to PROP_NONE (it's for the subtype)

As long as it's PROP_DISTANCE, it will use the set unit system (0.0-1.0 for None, otherwise meters or feet). Without, it should treat the value always as 0-1 float range (normalized)
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


treddie

Posted: Sun Jan 06, 2013 6:56 am
Joined: 03 Jan 2013
Posts: 23
Thank you very much CodemanX.

I just checked the site for dev tools and will give it a try!
Reply with quote


Goto page 1, 2, 3  Next
 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group