-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run / develop this project #3
Comments
In Arch Linux the same command works. Only had to install mono:
|
How can I run this on a PC? |
@ultrasam I lazied out and created a new C# project in Xamarin Studio (which is pretty much like Visual Studio) and added the C# files which where in the repo. Had to add references to |
When creating a new C# project in Visual Studio it gives me several options: Which one should I pick?? |
Use a Console Application and remove the |
Right click References > Add, select System.Draw |
Ok, perfect that worked it compiled with no errors, now how do I use the program?? |
After following @squarism 's directions I am getting
After googling I don't see a simple answer to that. Any one here encountered/solved it? EDIT: I was able to get it to do a bit more by following these commands in addition to what @squarism posted. Not sure if this is the best way, but it seems to be working.
|
@ultrasam is the samples.xml files actually copied to the build directory ? If it isn't you could try copy pasting it there manually to confirm it fixes the issue you're having. I can't remember what was the setting to include a resource file in the build system of VS though... EDIT: you will probably have the same issue with all the images |
Ok I put the samples folder and samples.xml inside the bin/Debug/ folder and it worked!!!, it started creating a bunch of BMPs, now if I want to use my own designs, should I put them on the samples folder?? |
yes, and reference them in the samples.xml file and fiddle with the properties a bit |
Is there a pre-compiled version of this? I am very new to C#, and have no idea how to compile or run it. >.> |
Here: https://dl.dropboxusercontent.com/u/24996373/TileCreation.rar I hope this helps somebody |
Thanks, that's perfect. ^^ |
If you make any new bitmaps or any interesting tileset could you share it, I want to learn |
Windows Installation Instructions:
In my example I had WaveFunctionCollapse-master as my working directory. |
Thank you all for helping me to understand how to set this up! |
In Fedora 24 this worked for me (besides mono, sudo dnf install mono-devel mono-data-oracle
mcs -pkg:dotnet /reference:System.Drawing.dll *.cs
mono Main.exe |
@NNNenov First, remove the foundation param at all, for default flowers it's hard to set up. Ground in results will be in the middle of a picture, but that's fine. Do contradictions remain? If yes, I need to see your bitmap. |
In Ubuntu 16.04 running the command results in the following: Can't figure out what reference am I missing :( including System.Xml changes nothing. |
@imaginary-unit Do you have the Stuff.cs in the same folder ? The extension method in question is here : https://github.com/mxgmn/WaveFunctionCollapse/blob/master/Stuff.cs#L47 |
@kchapelier Ouch, somehow I didn't include it.. thanks! now it works. |
@mxgmn yeah it looks like I picked the most fussy one to test first! It works fine without the foundation param. I am curious though what this foundation param means and its input values, in the example its set to 102, but the source image is only 23 pixels high? |
@NNNenov Foundation is a special case of constraint. I use it in examples like Flowers, City, Platformer to make the ground level be at the bottom of the output. If you delete the foundation param from samples.xml, you'll see that ground appears anywhere in the middle of an output, not necessary at the bottom. Why 102? It goes through input image in a scanline order. First it sees a 3x3 pattern of sky, so 0 is the index of 3x3 blue box. 1 is the index of 3x3 blue box with one pixel of yellow in the bottom right corner, and so on, 102 is the index of top row earth, bottom two rows sky pattern. |
I ran the program just fine, but I'm unable to open any of the .bmp files. Image viewer is giving me a message saying "File has bogus header data." Does anyone have any idea why this may be? |
@BrianLovelace128 Try renaming them to png, this is a known issue which will probably be fixed in the next version ( #1 ) |
@mxgmn I thought I understood this but the 3x3 pattern part threw me off a little. |
@gromilQaaaa @mxgmn I think the second question was if WFC can output a tiling texture. I believe you could achieve that by using a N thick border constraint on the output array, where top/bottom left/right is repeated, and cropping that from the final output? |
@selfsame @gromilQaaaa Then sure, periodic="True" option generates a periodic texture. Most of the examples on the readme page are periodic. |
@mxgmn So periodic means the images should tile seemlessly, then? Didn't realize that. |
@nanodeath Yes. I scroll right/left up/down in videos and gifs to demonstrate that generated images are periodic. |
@mxgmn Ah...I had no idea what the panning was supposed to signify. I just assumed you were generating a larger image than what was initially being shown, and then panning for effect. Anywho, glad to learn more about the codebase. |
@nanodeath I also stacked 2 tiled "Rooms" outputs in the readme to demonstrate that they stack seamlessly. |
@NNNenov @nanodeath Pardon, nvm, this actually can be done fast, I'll do it right now... |
@NNNenov you can take a look at this version of the tiled model, I use strings instead of bitmaps that include a rotation number and parse that for the 3d display ("0foo", "3foo") https://github.com/selfsame/WaveFunctionCollapse/blob/master/SimpleTiledModel.cs |
In this castle example top row is First, note in the Castle example tower tile has symmetry type L despite its picture having symmetry type X. I've redrawn it a little so L-symmetry would be apparent. Imagine that we don't have any symmetry system at all. Than we also need to add lines like |
Step 2 fails, saying:
I have tried various things without success. |
@pointyointment I don't know why it fails, but you can also try building through Visual Studio:
|
nuget install Microsoft.Net.Compilers -Version 1.3.2 Not sure what changed since I posted, but it seems a version is required now. |
Not sure if this is still active but could somebody expand a bit on a 3D extension of the SW?? |
SW = software and Thanks - hadn't seen that - will give it a try. |
I want to generate a city for my voxel game, do you have a simple example, other than knots, to start understand ? thanks. |
@procfxgen You mean a 3d example? 3d version is not released yet, so only Knots so far. Check out 6 2d example tilesets here, the algorithm is the same in all dimensions. |
I play with knots 3d example, how to add ground ? |
@procfxgen Add ground.vox and ground.png, then in data.xml add the ground tile and vertical and horizontal adjacencies with existing tiles. |
@procfxgen Try this
It should generate vertical columns. |
sorry volume is empty .... "vertical" correspond to blue axis (Z) and "horizontal" (X,Y) to red axis in magicavoxel ?
|
@procfxgen This data.xml
and this samples.xml
should generate vertical columns. If you want 3d, I think it's better to wait for a proper 3d release in September-October, it'll be much easier to experiment with, or try VoxModSynth. |
@procfxgen Yes, vertical corresponds to blue in MV, left=top, right=bottom. Horizontal - to red, and then it mixes red and green with symmetries. |
@mxgmn, is there a way you can close and lock this issue? Right now it seems to get reused every time anyone has a question (and emailing 23 people in the process), when really those questions should be new issues. Thanks! |
@nanodeath Oh, didn't know about that, closing. |
For anyone curious (on a mac):
Run:
🌻
The text was updated successfully, but these errors were encountered: