TVPT / VoxelSniper

The premiere long-distance brush editor for Minecraft
Other
128 stars 115 forks source link

Augmenting voxel sniper using modern data techniques #160

Closed ztokdo closed 11 years ago

ztokdo commented 11 years ago

I would like to help develop an interpolation plugin for voxel sniper. The idea would be in building the exterior of an object you wouldn't actually have to build all of it, but rather start using techniques in image processing to modify structures.

Examples would be an erode-dilate(removes single blocks not connected),dilate erode(fills holes), bilinear interpolation(building only a few sections then filling them, and patchwork.

Other ideas would be curvature, sectioning, etc.

I'm working on a PhD in the subject, i don't expect compensation, but would like people who are familiar with the framework to import, read, and export datapoints.

itsjoekent commented 11 years ago

(Just my 2 cents)

Analyzing real world terrain through image processing, and creating a (set?) of algorithms that convert that into sniper brush configurations would be much useful. For example:

Here is a picture of a few rocks in the ocean

I would then compare a rock to a sniper shape & find the closest match. Once I have the shape & what I'm trying to create, you can start to assume what brush(es) you need for the job, where to click for each brush, and if applicable what parameters. In the rock example, I just created a few voxel / box, and applied the erode brush on one side a few times, then did a single smooth.

Minecraft example

Honestly though, as much as I love you using our platform I feel it may be adding complications. Have you thought about just creating a image processing platform that turns pictures into voxeldata(Coordinates, ID, etc)? Once you have the voxel data, you could spend a few minutes creating a bukkit plugin / minecraft mod that iterates over your processed results & sets an actual in-game block to the value. Theoretically if your platform is just creating data files, you could write a mod for any voxelgame that supports modding if you ever wanted to demonstrate your results in multiple voxelengines.

Not much of a image processing person (so I may be looking at the approach 100& wrong), but what I do know is that most of us have barley enough time to even maintain the plugins let alone do this. Unless @Monofraps has some magical free time I don't know about

Good luck on your PhD! Let me know what you think about what I suggested, but I will understand if you can't switch.

giltwist commented 11 years ago

We already have brushes that sort of do this, most notably Erosion and Blend Ball. They've made a huge difference for terraforming. I can imagine this being pretty useful for repetive structures, but I'm unsure of how it would work on the sorts of creative builds we use Sniper for.

On Sat, May 18, 2013 at 2:00 AM, deadlybutter notifications@github.comwrote:

(Just my 2 cents)

Analyzing real world terrain through image processing, and creating a (set?) of algorithms that convert that into sniper brush configurations would be much useful. For example:

[image: Here is a picture of a few rocks in the ocean]https://a248.e.akamai.net/camo.github.com/8f7cd1235e53a05dbf147e2fd4230131c18b03c6/687474703a2f2f63646e2e656261756d73776f726c642e636f6d2f6d6564696146696c65732f706963747572652f323330353736362f38333139363532302e6a7067

I would then compare a rock to a sniper shape & find the closest match. Once I have the shape & what I'm trying to create, you can start to assume what brush(es) you need for the job, where to click for each brush, and if applicable what parameters. In the rock example, I just created a few voxel / box, and applied the erode brush on one side a few times, then did a single smooth.

[image: Minecraft example]https://a248.e.akamai.net/camo.github.com/4799cdd8e8ff78dcf73c00ed401ed831d1eb9ba6/687474703a2f2f692e696d6775722e636f6d2f654d656136326d2e706e67

Honestly though, as much as I love you using our platform I feel it may be adding complications. Have you thought about just creating a image processing platform that turns pictures into voxeldata(Coordinates, ID, etc)? Once you have the voxel data, you could spend a few minutes creating a bukkit plugin / minecraft mod that iterates over your processed results & sets an actual in-game block to the value. Theoretically if your platform is just creating data files, you could write a mod for any voxelgame that supports modding if you ever wanted to demonstrate your results in multiple voxelengines.

Not much of a image processing person (so I may be looking at the approach 100& wrong), but what I do know is that most of us have barley enough time to even maintain the plugins let alone do this. Unless @Monofrapshttps://github.com/Monofrapshas some magical free time I don't know about

Good luck on your PhD! Let me know what you think about what I suggested, but I will understand if you can't switch.

— Reply to this email directly or view it on GitHubhttps://github.com/TVPT/VoxelSniper/issues/160#issuecomment-18095747 .

nristock commented 11 years ago

The erosion algorithms we currently implement are super simple. Don't get me wrong but there are tons of erosion algorithms which are way more advanced. Instead of using simple neighborhood iteration (which is often used to simulate thermal terrain erosion) there are also hydraulic erosion algorithms (I don't have a specific name in mind, just google for 'hydraulic terrain erosion').

-- Back to topic It is not particularly easy to implement data export and import using our current system. VoxelSniper 6 will bring an API that allows custom brush registration. (current development API is over there: https://github.com/TVPT/VoxelGunsmith) You can use this system to stuff your algorithm's bussiness logic into a custom brush. Sniper will handle everything else - from parameter parsing to block I/O. However, the API is still not final. It is very unlikely that we change it dramatically but since VoxelSniper 6 it not yet released, smaller changes are more than possible.

EDIT: Found it! http://oddlabs.com/download/terrain_generation.pdf

ztokdo commented 11 years ago

Its fine that its not easily integrated in voxel sniper. I can do it in world edit in a couple of hours probably. Then I'll have to make a tutorial on how to do it. (mostly, because I'm not coding the math, I'm using my old code) (http://www.diss.fu-berlin.de/diss/servlets/MCRFileNodeServlet/FUDISS_derivate_000000001196/04_dissmw-chap4.pdf;jsessionid=2749B589FDDA7942DEE8090263E32976?hosts=) figure 4.10 is the method for further explanation of my original idea.

I don't think it would be to hard to to take a picture of terrain and create techniques to duplicate them. The main issue would be reading in the picture from a file and projecting the image (since picture is not directly vertical). Probably You would start with the image then pull the terrain. (Images are flat, so the trick would be how to pull the terrain.) Also, I would need a color table for the items. Another problem is that I use Feed the Beast, So i have many many more material types than in the standard game. I'll probably use their textures since they have a larger variety. I'll figure out how to do that eventually. I'd be interested in doing such a project. Although its not clear to me why so many things lose compatibility yet. so I guess I'll figure that out as I go.

Probably I'd work out pulling the terrain first.
Then reading in images. Then defining the colormap. Then placing the image onto the terrain. But yeah, that project will take a bit of work. I do like the idea of pulling terrain though. I think that would be a sick plugin as well, so its a good starting place. Also, by labeling the terrain by color, I bet I could create a montonic, and diatonic texture map of about 4100 colors a piece. That would probably be useful given that our computers here have 256 GB of ram, I think I could test it on my work computer as well.

But yeah, I'd be down to discuss more details about your stuff in the future. I look forward to bringing engineering and modeling into voxel sniper.