I had to fight some very annoying self-inflicted bugs, but now the basic hair conversion works in all my testscenes, even with some pretty pathological cases (e.g. all hairs with length zero).
Bonus: weird stuff happens if you set worldscale to 0.001 because my epsilon was a bit too big in this case - but at least all point arrays still have the correct length
I now made the epsilon smaller so even this crazy worldscale works now.
Todo: color export.
hair and fur
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: hair and fur
So would you say, we can expect some improvements in the next alpha? or is this some ongoing work that will take some more time?
Re: hair and fur
What is really annoying is that I currently have to call a Blender function through Python for each hair strand.
For example, the conversion of a hair system with 200,000 individual hairs has these timings:
- Calling Blender's co_hair function 200,000 times to fill a numpy array with coordinates: 5.342 s
- Checking the points for invalid ones, calculating the number of valid segments etc. (this code was pure Python before and is now C++): 0.083 s
- Tessellating the hair with "triangle ribbon" mode: 1.05 s
I will have to check again if I can somehow do the first step in C++ as well, but last time I looked it wasn't feasible.
(by the way the same hair system takes 20.951 s to export with the old code)
For example, the conversion of a hair system with 200,000 individual hairs has these timings:
- Calling Blender's co_hair function 200,000 times to fill a numpy array with coordinates: 5.342 s
- Checking the points for invalid ones, calculating the number of valid segments etc. (this code was pure Python before and is now C++): 0.083 s
- Tessellating the hair with "triangle ribbon" mode: 1.05 s
I will have to check again if I can somehow do the first step in C++ as well, but last time I looked it wasn't feasible.
(by the way the same hair system takes 20.951 s to export with the old code)
Re: hair and fur
That is a huge improvement anywayI will have to check again if I can somehow do the first step in C++ as well, but last time I looked it wasn't feasible.
(by the way the same hair system takes 20.951 s to export with the old code)
Re: hair and fur
As I thought, I found no way to speed this step up.
I even tried calling the co_hair function from C++ (though boost::python), but that was even slower.
So, I'll write the color export and then it should be done.
Re: hair and fur
Had to cope with non-existent documentation again.
But now the mode "UV image -> vertex colors" works again for hair.
I think I will add a new mode that only copies UV information to the hairs, without creating vertex colors, and try to make the UI less confusing.
But now the mode "UV image -> vertex colors" works again for hair.
I think I will add a new mode that only copies UV information to the hairs, without creating vertex colors, and try to make the UI less confusing.
Re: hair and fur
Emitter vertex colors -> hair vertex colors support is done:
Re: hair and fur
Awesome results ! you're inspiring