You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I always want my output to be bordered by a specific color, I've tried modifying the array returned by model.graphics() between iterations, but that clearly is not the way to do this... is there any way to do this currently? something like.
let model = new OverlappingModel(data, width, etc);
let startingArr = model.gaphics();
//Set RGB of first pixel to (0,0,0)
startingArr[0] = 0;
startingArr[1] = 0;
startingArr[2] = 0;
//Overwrite existing graphics array
model.setGraphics(startingArr);
The text was updated successfully, but these errors were encountered:
Currently there is no way to do this (whether in this port or in the original C# library/algo), and implementing this would not be trivial. The graphics array is only generated when requested, internally the algorithm works by segmenting the example pattern (data) in smaller chunks/patterns and storing the probability for each pixels of those patterns to be a correct choice for each pixels of the result image.
I'm leaving this issue open as it would be an interesting feature to try and implement.
In the mean time you might be interested to check Brian Bucklew's GDC 2019 presentation on how the algorithm is used and controlled in Cave of Qud. The "texture mode" Brian mentions is the overlapping model. Also, if you're still testing the water for your own procedural content generation system, you might want to check the js/webgl port of the ConvChain algorithm it's fast and supports pre-set "immutable cells", but this algorithm only handles 1bit/black and white maps. Hopefully you'll find a suitable solution for your problem at hand.
Thanks, I'll certainly watch that talk and check out ConvChain. In the meantime I've hacked together a solution involving combining several of the same output image and cropping to the largest contiguous image. Very slow but it sort of works
I always want my output to be bordered by a specific color, I've tried modifying the array returned by model.graphics() between iterations, but that clearly is not the way to do this... is there any way to do this currently? something like.
The text was updated successfully, but these errors were encountered: