this is the blog for the videogame company RobotLovesKitty.
Saturday, March 12, 2011
by the way...
Did I mention that I more or less solved the Z-Fighting problem?
Dim ra As Single = 0.001
Dim r As Single = rndz.Next(-100, 100) * ra Dim s As Single = rndz.Next(-100, 100) * ra Dim t As Single = rndz.Next(-100, 100) * ra value.x += r value.y += s value.z += t
Have you tried using the last three digits of the block ID? After all, random numbers are occasionally the same; block IDs are guaranteed to be unique, and in a single cell the last three digits are probably all you need.
Something like:
dim offset as single = (block.id mod 1000) offset = offset * 0.001 value.x += offset value.y += offset value.z += offset
might work? You could probably make odd offsets negative, too, in order to not bias things towards +XYZ
YES YE SYE Y SEYS EYEYS YSEYEYSYSYS YES
ReplyDelete^
ReplyDelete|
|
Awesome :D.
Have you tried using the last three digits of the block ID? After all, random numbers are occasionally the same; block IDs are guaranteed to be unique, and in a single cell the last three digits are probably all you need.
ReplyDeleteSomething like:
dim offset as single = (block.id mod 1000)
offset = offset * 0.001
value.x += offset
value.y += offset
value.z += offset
might work? You could probably make odd offsets negative, too, in order to not bias things towards +XYZ
that's a cool idea...
ReplyDeletenot 100% sure I am going to keep this change... it also sometimes makes the odd crack you could jump through...
I'm going to keep messing with it.