related to the shadow bias: unit scale.. hellllppp!!! :(

   3051   3   0
User Avatar
Member
119 posts
Joined: July 2005
Offline
ok, Houdini uses arbitrary units right?

ive been testing a scene witha ball sitting on a grid with one shadow casting keylight..

when the ball is 1 unit in size and sitting on the grid, the shadows cast are in the right places, ie. in contact with the base of the sphere..

if i use uniform scale and reduce the size of the sphere to say… 0.3 (and ensure the ball is sitting on the grid as before) the accuracy goes astray, and the shadows are no longer in contact with the sphere, i cant find a shadow bias setting to adjust this problem.

this is an issue because the shots i`m working on vary wildly in scale i need some models in the sequence are a matter of centimetres high, and others a number of metres, i was planning of using 1 unit=1cm for shots where the small objects are used, and 1unit=1metre for the larger shots.

because if i used 1cm consistently the large objects will surely become a problem with z depthe accuracy, and vice versa if i use metres the small objects will become a problem.

could anyone help me figure this out, or give me some pointers as to how they generally work with units in houdini?

cheers,

Mark
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Well, there is no true “arbitrary units”, unless you mean related to inches, meters, etc. In the end, any computer program has to answer to the deity of float accuracy. I'll admit to being a little skeptical that changing the scale from 1 to 0.3 units could possibly cause any sort of noticable difference in visible shadows. I mean, you couldn't have various data sharing the same light if that were true. I just did a quick and dirty test of what you describe and it seems fine to me. I'm wondering if something else is at play here: for instance, if you're loading something at a huge scale, then scaling it in SOPs, then scaling it on OBJ level - all those transforms are being done in the render. Best bet to the scenario you describe(all sorts of scales on various shots) is to build/import/tweak your data as one step, and after ensuring you're at a decent and somewhat consistent scale, output the geo and read in again in the main file. If you need proceduralism, then build the source curves at the correct scale to start with.

I understand, though, that if you're thinking a change as small as you describle could cause all that much difference is a big issue. I don't think that's what's happening, as mentioned. I'd solve that problem first.

The existence of a Shadow Bias is dependant on the shader you're using. Are you using Quick Shadows?

Cheers,

J.C.
John Coldrick
User Avatar
Member
119 posts
Joined: July 2005
Offline
yeah, it seemed weird to me too.

i just recreated it but could only do so with silly numbers….. thinking about it its not gonna be a problem, i managed to make it happen this time with stupidly small numbers and this is expected, i dont know why it appeared to happen with the scale i was using before.

this time i did the plane, and ball thing, scaled the ball down to 0.002 then uniform scaled it back up to 10… broken.

hm hmm

cheers,

Mark
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Still not seeing it. I think there's some combination of things you're doing differently than me. Whether I use cheap ‘n dirty quickshads or a vex shadow shader with a map, scaling up and down by factors as small as .002 simply doesn’t introduce any error here. I don't consider .001 really pushing it. I strongly suspect it's more related to location of light, size of shadow map than scale of geo. If you're going to cast a shad map to cover a city 3000 units wide, and you want to do a closeup of a person's head against a wall, now *that* would be pushing it and you'd need to approach it differently.

Try altering the location of the light and the shadmap size to see if that helps.

Cheers,

J.C.
John Coldrick
  • Quick Links