Hi! So I got the add-on to work that it voxelfies the model but I noticed that the different voxels are multicolored. I tried changing the size from 0.001 to another, but that didn't seem to work.
Remember you changed line 91 in the Script from percentage to ratio.... but that also changes the numbers: 5% = 0.05.
So change the line like this:
That should work.
Hey aartsa ,
There are some changes in the Blenders Python script since this course.
From the 'voxelfy_1,1.py' script included when downloading the source files, make the following changes.
Line 108
currently:
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="DataTransfer")
delete apply_as='DATA', to read:
bpy.ops.object.modifier_apply(modifier="DataTransfer")
Line 123
currently:
bpy.ops.mesh.select_random(percent=count, seed=count)
change percent to ratio and after count / 100:
bpy.ops.mesh.select_random(ratio=count / 100, seed=count)
line 123 is part of the operation to reduce each face to a single color.
the select random operation now uses a ratio between 0 and 1 instead of a percentage between 0 and 100, so dividing by 100 will give 0.01, 0.02, 0.03 etc, etc, while looping through the count.
0.01 is equivalent to 1%, 0.02 = 2%, 0.03 = 3%, etc, etc.
This should work now as intended in Blender v3.0
Hope this helps.
@jlampel , if you have the time, would it be worth updating the script with the source files?
I have used the code from the source files
It maybe line 67 instead of 108
and line 90 instead of 123
if you are using the earlier version of the script.
There are a few version floating about on my drive.
I suppose I should clean up a bit.
Just wondering...
I tried changing the size from 0.001 to another
did you change that back?
Well, the only two things I can think of then, are:
1. there still is a mistake in the .py file you have. Try it with: https://drive.google.com/file/d/19eUwTFLOB9d2wen5u7BBwrMqwffRjkJb/view?usp=sharing
2. there is something wrong with your graphics card driver (make sure to update to latest).
3. something else
Thanks for troubleshooting this spikeyxxx ! I noticed that the download for the course was an older version and didn't include all the fixes, but that's been updated.