A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Assets and Asset Store' started by Wright, Jun 25, 2013.
I have a question works voxeland with mapmagic and CTS ?
MapMagic yes, CTS no. I believe it's planned though.
Yeah I had/have the same issue. I believe it has to do with how he changed the Noise generators. A newer tutorial should be made updated past the "Legacy" nodes and maybe even show how to add rocks/trees with MapMagic too.
@Wright - Could you maybe add a screenshot feature in the Node Editor for easy debugging, or rather, easier error reporting to you? Some node sheets are bigger and a pain to take a picture of.
sad in map Magic cts works when i use voxeland in map Magic than i can use cts ?
Like I said I am not sure if CTS works with Voxeland yet. Voxel terrain uses triplanar shaders. There could be working being done on it though, but 5.0.1 doesn't have it. He's working on MegaSplat so CTS is probably a planned support.
There is no easy way to convert standard MapMagic terrains to Voxeland. Textures Output cannot be just replaced with Voxeland Output node. Voxeland Output uses absolutely different (and more complex) algorithm, it does not just blends layers in a Photoshop manner, but it creates layers in 3D space. This requires not only the significant graph changes, but changing the whole approach to the graph creation. That's why I'm not converting Island or Demo scenes to be used with Voxeland - they will require the whole graph created from scratch, and it will not have much in common with the original one.
It's stored on MapMagic wiki, not Voxeland one: Voxeland Output node. However, it does not describe the way to convert MapMagic demo scenes to Voxeland due to the reason I've mentioned above. Feel free to share any ideas about what kind of MM-Voxeland integration tutorial could be made.
YoToasty, I've got plans to integrate Ultimate Survival with MapMagic first, and then I see what I can do to make it work with Voxeland. I'm going to start with MM because Voxeland is more complex asset.
The thing is that you cannot use Voxeland in MapMagic. It's the other way round: you use MapMagic as a generator inside Voxeland.
I don't remember if CTS supports triplanar shader with vertex input instead of control maps, but if it does I will add it's support in a next couple of months.
Do you mean MapMagic grpahs?
Yes, an image of the graphs.
Actually you can use "Save as Copy" button to save your current graph as an asset file and attach it to bug description. I can see the graph by downloading it and storing in assets. Maybe it's not so convenient as a screenshot, but this way I can easily see it in action.
For all beta testers: try the new TextureArray shader on GitLab. It supports up to 24 block types both on PC (dx11) and Mac - and it's even a bit faster than the standard one.
Any Voxeland user can join the beta by emailing me your order number and your GitLab account name if you have one.
And btw check out Voxeland material manual page.
Man your assets are great, and I enjoy them. However man your MapMagic tuts and docs are on point, but voxeland holy hanna bro can you please just hire a documenter or something haha. I have been staring at that sync data checkbox for a while now and googling like mad THERE IS NO INFO ON WHAT IT DOES.
Hi @Wright .. a small question
In Map Magic, can you mix the Voxeland outputs with the normal Object output? I have objects I wish to scatter on the terrain, but they can't really be Voxeland blocks because they have physics attached and are picked up as real objects. Is this a supported mode? And is there a mechanism to disable the objects when out of range so they don't fall through the unbuilt and/or collider lacking bits of the Voxeland terrain?
Xype, thanks. As you can see I'm working on Voxeland documentation right now - literally. Guess it will take a week or two to update it.
twodave, I don't think it's possible by the reason you mentioned: something's got to enable/disable the objects along with MM or Voxeland chunks. In the second case Voxeland handles it, but these objects have to be Voxeland blocks to work properly. I have not tried using collider+rigidbody Voxeland objects, but there should be nothing that prevents doing it.
Ok guys so I have mapmagic, love it, have voxeland, love it, I need nice water though. Got Aquas but it needs terrain input and voxeland is not a terrain, anyone have a good suggestion to make a nice water level system?
Wright, thank you, i do see you working on it, but having that button all this time with no info on what it does is just annoying me lol.
BTW if anyone is interested I have navmesh baking real time using voxeland/mapmagic, can dig, navmesh updates, npc's (and characters if you go that route) start falling to the new level. On players at the moment it sometimes makes them walk a circle to the bottom of the hole but otherwise it works. Is fairly easy to set up, was just hard to put it together at first due to documentation lacking on unities side. There is a couple of lines to add to the chunk.cs otherwise its external scripts from the core systems.
add this after the MeshFilter constructor:
public NavMeshSourceTag nmstag;
add nmstag = go.AddComponent<NavMeshSourceTag>(); after the //creating chunk components before the if
then make a new cs file and name it NavMeshSourceTag.cs and get this for content https://pastebin.com/U4FLDg0H
Note: I can't remember if I made changes to this file, so I linked my code to make sure I didn't forget something, original is from the unity navmesh github.
then another file named LocalNavMeshBuilder.cs and here is contents https://pastebin.com/CJCQfyky
Note: Original source was from Unity Github, made a few changes, put it in a coroutine, currently set to rebake every second, can be adjusted as you like I found 1 second was a good amount of time to keep updated if making a dig/mine system due to action time to dig and mine 1 second is hardly noticable if there is a delay, doing the calcs too much can cause performance issues, recommend tweaking for your specific game.
put the localnavmeshbuilder as a component on a empty object and adjust its size, OR just slap it on the player and let it follow it around.
Note: I havn't added any serialization or saving, this is just basic steps. I see the question asked a lot so thought I would point everyone in the correct direction, enjoy.
Important Note: Currently if you use triplanar it will break the navmesh.
I havn't noticed any performance issues doing this on a 300x300 at this time.
In theory this should also work with infinate terrains by moving the baker with the player, which I have seen even Dennis say runtime baking with infinite is not possible...might want to take another look
Works fine, I use it for trees, prefab spawns exactly that, a prefab with all its stuff including rigidbodies, colliders, scripts. My personal example you chop down the tree it still does everything you expect a chopped down tree to do, falls over, hits the ground, rolls downhill.
That's what I was thinking. I had no issues with it.
Honestly the hardest thing I am having to find is some friggin grass that looks good and works with voxeland, everything wants a terrain
Finally sorta have something that works had to splice a few things together for grass, but its angled weird, will look into that later.
Has anyone had an issue not being able to edit the terrain in either play mode or editor mode?
At the moment I cannot do either.
It was working last night and now it doesn't, not sure what I changed, if anything.
I have the "Edit in Playmode" checked.
Try unchecking it, just for sillyness, and also make sure you didnt click the static checkbox at the very top which may have caused it to bake the meshes. I have noticed 2 things, does not matter that I havn't had edit in playmode checked for quite some time, nor does it seem to make a difference if I check the wind box or not in grass settings.... This is with 2017.1.0p4
Edit: yes I noticed the grass issue before I started seeking new grass.
Yeah I made sure I hadn't baked the meshes
I also restarted Unity just to be safe but no luck.
I stepped through the code execution and found that land type being passed into the alter() is -1
If I change it to 1 then it works as expected.
Note that I cannot edit the terrain from the editor either.
m_Voxeland.Alter(aimCoord, m_Voxeland.brush, Voxeland5.Voxeland.EditMode.dig,
Debug.Log("Should be destroying terrain.");
I have been using Aquas with both Voxeland and MapMagic for some time, I don't recall having any issues doing integration but it was quite a while ago. I believe others also use Aquas.
It will be interesting to see how your performance goes once you attach the LocalNavMeshBuilder to the player object.. The code on GitHub is based on hashes for the NavMeshSoures but changing the sources can cause a full rebuild which can cause a high CPU spike and your game to stutter. In the end I restricted LocalNavMeshBuilder to 64m and used A* pathfinding for AIs beyond that range.
You can also add the NavMeshSources in the unity editor and checking the box that copies components to the runtime created children (I think it is already checked by default), this avoids the need to edit the source files themselves.
I goofed off with it on the player some, works fine, can use a lot of optimization but its mostly because i have too many static things going on atm, need to write in some exclusions so it only picks up the chunks and nothing else, that should keep performance smooth. I tried that with the copy components to children, it didn't add the tag for whatever reason, so I put those couple lines in the chunk to solve it. Point was it is possible, that code is prototype ready only, if you use what I posted in a shipped game thats not smart lol.
What I really need to do is basically copy the layer that shows in the editor, that looks flat like a terrain, and use that information to bake. Should be able to find it in the code and just use existing stuff to save a mess with a bit of work and digging. That would also, or in theory should, solve the breaks on triplanar use bug.
Aquas would not recognize the collision with voxeland to generate foam and such to get that sexy shoreline effect. It isn't that it did not work, it just looked like crud, where I bought the calm water for 12 bucks and looked 10 times better.
Should mention I am doing multiplayer, the server handles and holds the navmesh so cpu stutters because of the client doing too much is less of an issue. In testing server+play is all in one though, and no problems performance wise. Again, performance concern with that crappy prototype code would be other static things in your scene.
sean-bradbury, are you sure that any of the land types was selected? According to that code landTypes.selected returns -1, this happens if no block is chosen.
Xype, feel free to share the grass link here if you'll finally find it.
I had no problems trying AQUAS along with Voxeland. The foam is displayed like it's a terrain - actually it seems to be working with any mesh:
And even in caves:
ill try it again gave me nothing but headaches,. I used the speedtree(tm) rough grass desktop...when I looked up my game looked just like 7 days to die lmao, it was the same grass model and somehow I picked many of the same textures while quickly setting up.
Oh had to use the lod 2, of version 2 of rough grass in that pack....its the only one with small enough vertices
@Wright : I believe so is the best answer I can give
The weird part was that I couldn't modify the terrain from the editor either.
I started a new project up to test and as expected that one worked.
I can add some debug, remove the hardcoding to '1' and see what the code is saying.
I just bought Voxeland and MapMagic with the intention of using it with Ultimate Survival. This if fantastic news!
Could anyone tell me how to make multiple static terrains? I've tried going through the wiki, but there is more about MapMagic (that I'm using with Voxeland) than there is about Voxeland.
What I'm trying to do is create a roughly 2km x 2km voxel terrain. The default size seems to be around 300, so obviously I need 6-9 x 6-9 terrains. I was reading that you can't put more than one Voxeland object per scene and I thought I read that it was possible to create more terrains, but not how. Any help would be appreciated.
A related question - would these terrains all have separate graphs? I want to create biomes in each. Multiple biomes per terrain as well, possibly.
I have a simple question: How do you switch between block type for land blocks? I have two land blocks defined, but I can't find a way to select the second block type and add with the brush. It always adds the first block type. If I move the second block type up so it's first in the list, then everything changes to that block type. I can't find a way to paint with both block types. Is there some way to click and select the block type to paint with?
Denis is working on voxeland documentation. He has just been focusing on code a lot but over the last little while I have noticed he is working on voxeland docs finally. There is a link I think on the last page somewhere in one of his posts to the docs in progress.
In the meantime, the odd thing you can do is set to voxeland infinate, change the 300 to whatever you want, then set it back to static. It wont change while it is set on static. Odd I know but hey whatever at least this works.
Go to land blocks, make the one you want to paint with the more open one. Example click on the second one so it opens up to see where to change its diffuse and normals. That should make it the brush's paint type. If this does not work let me know. I am saying this from memory as I don't have voxeland loaded at this moment working on something else. WIll be happy to load it and give a better definition if this does not work for you.
Yep, that's true. But, to be honest, currently I'm testing and submitting the new MapMagic version (it will have documentation updated too), and I'll get back updating the Voxeland manual once it's done.
That's right - once you have created the new block, you should click on it's name (the default one is Block or Land, depending on Voxeland version) to select it. Once you clicked on the block you should be able to set it's textures and material properties (height, metal, gloss) - and can set it on the terrain. If you have a block selected but can't add editing Voxeland - please report a bug.
You don't need several Voxeland objects, it will be impossible to welds them and unreasonably difficult to assign MM graphs. You need just one terrain, but for the size of 2km I'd like to recommend you using infinite mode, where the terrain chunks are created only within some limited range.
Okay it's weird because this is exactly what I was doing, but now after loading a different project and then going back to my Voxeland based project, it works just like it should! Making a note to myself to always try restarting Unity if something unexpected happens.
My plan is to use this for multiplayer (UNet, probably) and I don't want them to have an infinite terrain. I'm using it with Ultimate Survival (I know you're working on integration). So basically I wanted to use VL for the ability to make nice overhangs, but procedurally generate things using MM to speed up level design.
I don't mind "streaming" the terrains to each player at 300m chunks, but how could I keep changes I've made manually? And how would I keep them within the 2km x 2km bounds? I know I can pin and lock some terrains for any grids I would want to modify by hand, but not sure how to keep each player from going beyond them.
Voxeland has a "dynamic limited" mode - the terrain chunks will be created procedurally, but the overall terrain will be limited within a given square. And since chunks are generated based on persistent voxel data all of your terrain changes will be kept.
So I would set the mode to Dynamic Limited within the Mode and Ranges foldout and then set the terrain size to 2000m?
I would have to use one single graph for the entire 2km terrain, correct? But I could manually edit with the brush and it will retain all changes across chunks and across the entire terrain. Do I have that correct?
If I read it right, when you run around in voxeland it destroys when you get far away and creates as you get near, but when you make a change on a chunk that chunk gets "pinned" and pinned chunks get their data saved so it is not generating from the seed. Please correct me if I am wrong Denis.
So I would set the terrain total size to 2km though, correct? What constitutes a change to "pin" it? Like can I just make a single block change in the Editor and it will pin it in Play mode?
When using infinite terrain each chunks is undergoing a number of calculations:
- In the beginning the chunk has nothing at all except coordinates and some rules on terrain generate defined by Voxeland or MapMagic generators.
- First step is calculating it's voxel data. Consider voxel data a 3D array of bytes - each byte sets the number of block type used in a cell. This stage is called "generate".
- When you get closer to chunk it's mesh is calculated, smoothed, painted, etc using the block data. This stage is called "build mesh".
For dynamic limited terrain all chunks are "generated". I.e. all of the block data for the terrain is defined, but chunks are not "built". They are building only when camera approaches them.
If you change a chunk in an infinite terrain it will be pinned int the sense that it's block data will be kept, and it will not be "re-generated" no matter how far you travel from it. But it does not mean that it's mesh will be persistent, it's mesh still could be removed and "build" from block data dynamically.
Such pinning has no sense when using limited terrain since all of the chunks are generated. Consider them all pinned from the beginning.
BTW for static terrain all of the chunks are both generated and built.
I'm working with MapMagic as a generator for Voxeland and noticed that the maximum height is 200 "blocks". Where is this defined? And can it be changed?
You can adjust the "Height" value in Voxeland's Generate foldout.
What is the best way to get the type of block I just dug? I'm leaning towards RaycastHit and getting texture name somehow but I'm not sure this is the best route to take.
CoordDir looks like it might get me closer...
Found a good method that seems to work:
voxeland.data.GetBlock(aimCoord.x, aimCoord.y, aimCoord.z)
This returns a byte number that seems to correlate to the Land Block position in the editor. It would be nice if this function could accept just a CoordDir and split the x, y, z out in the function. But, I suspect Denis will point me to a better method.
I'm a little concerned that there's 3.6 million tris and 2.3 million verts when I look at the stat window. Is this a valid concern? I love playing with Voxeland, but I'm struggling to use it practically. I'm being recommended to sculpt a mesh terrain with a maya plugin.
I asked Denis if he might be able to output a single mesh with a user specified resolution so that it can be bumped up with tessellation if we needed using other shaders like RTP and Megasplat. He stated he is considering this option and other customers have asked for the same but right now as far as I understand he is updating the manual and then working on Megasplat integration. Hopefully after that or at the same time of Megasplat development lower outputs will be added as an option.
You are doing that right. GetBlock is a proper method to get a block type at coordinates before actually digging.
Jeremy-Borton, it depends on what are you making exactly. Voxeland is a narrowly focused terrain engine. If you do not need caves, voxels or changeable terrain in your game you'd better consider the standard terrains since voxel terrain creates a huge overhead.
BTW How big is your terrain? Are you using infinite mode? I'd really like to recommend switching to infinite if the terrain size is more than 500 blocks.
Yeah, unfortunately I'm making a static world of which has tunnels and all kinds of crazy terrain. It needs to be preloaded as it's used in multiplayer and I can't have overhead during runtime, which means I need to be able to get the mesh and texture data... I also don't want it procedurally generated. Designed worlds imho are almost always better for gameplay.
I had an idea to use quickbrush and paint quickly a bunch of low poly rocks with single box colliders all over voxeland, , and then I deactivated voxeland, and it worked to give me overhangs, bridges, tunnels..., but I was still left with 1 mil of polys not including all the LODs that I'd need. It's kinda hard on ram.
My terrain was 500
I'm currently thinking maybe I can use voxeland to create the overall terrain, and then get the mesh, decimate it, recreate the uvs, and then load it back into unity to paint it...and then if I need to change anything I'd just have to do it in maya...
But I must say, I love playing with voxeland. Keep working on it. It really lets me shape the terrain in such a satisfying way.
If only what is loaded/rendered is a concern and not file storage then you might want to look into using the asset InstantOC to be added to each chunk. LOD distance optimizing is good but the ability to disable rendering of all objects close by like directly behind you or a terrain chunk close by but hidden by a house or another chunk can greatly increase performance. I have requested the ability to have components be generated to all chunks to be able to make this happen. Denis did add it to V5 but unfortunately I have not tried it yet, I'm waiting for the megasplat integration to test/optimize everything first. Also baking to mesh will help performance and the ability to output custom Voxeland resolution has also been requested.. if Denis is willing & able, it will take some time to have these features.
Lastly, if you do try to decimate it I would recommend keeping it within Unity until the Unity FBX Exporter is compatible with the megasplat and voxeland shader if you need correct texture/proprietary UV layout otherwise you might be best to use any of the various decimation tools on the asset store which could give you realtime quality feedback -this will also allow you to keep the UVs/texturing.
I'm testing out my Voxeland scene on ios and running into errors on the Voxeland terrain for the shaders. So the voxeland terrain is rendered black on the iphone. Looking at the compiled code output for the land shader, I see lots of errors for metal:
Keywords set in this variant: DIRECTIONAL
-- Hardware tier variant: Tier 1
-- Vertex shader for "metal":
// Compile errors generating this shader.
-- Hardware tier variant: Tier 1
-- Fragment shader for "metal":
// Compile errors generating this shader.
I saw a post from about 4 years ago, @Wright where you responded to another user about ios and provided a link to some ios script files to fix some problems. Is there a way to fix the current Voxeland 5.0.1 version to make the shaders work on ios? I'm using ios 11.
I guess you are confusing procedural mesh build and procedural generate. Voxeland can do both, but I'm talking about mesh creation only. Here I've recently tried to explain the difference:
That might work, but just keep in mind that block type (texture) information is stored using vertex data tangent channel. I don't know how decimation works in Maya, but Max does not take any tangent information into account when using MultiRes.
BTW you can scale Voxeland object up if you don't need 1-unit details. It will use just a quarter of feces and verts within the same 500-unit distance.
It's hard to recall what was that way to fix Voxeland on iOS four years ago, but I've never considered mobiles as a Voxeland target platform. However nowadays mobile platforms became incredibly fast, so I can reconsider that. Anyways it would be cool if you could find a link to that post.
Noob here >> From everything I've gathered about voxeland and map magic, I am a little confused on which one I should start with and the main differences between them? Is it simply just the voxel part of it? Can I switch my project endlessly in between the two to do different things?
I will have many more questions to come I'm sure, thank you very much!
Here's the last post from 4 years ago after you provided a link to some js files https://forum.unity.com/posts/1401454/
I know the shader problems are not problems with the scripts compiling, but just wondering if there is any way for the shaders to work on ios. Thanks.
maybe try plugging in some legacy shaders
lulzadr, Voxeland is a voxel terrain engine. It can make caves, overhangs, etc. It has ambient occlusion, height-blended triplanar shader and other staff that I hope make it look better than the standard terrains. It also allows to change the terrain in playmode. It can generate an infinite world out of the box, but it would be a simple noise-based map.
MapMagic is an infinite land generator. All of those graphs, nodes and biomes are the part of MapMagic. But it works with the standard terrains terrains.
These two assets are completely different, but when using both you can set MapMagic as a terrain generator for Voxeland (instead of a simple noise map).
hoodoo, odd thing, I don't remember I moved or deleted anything in voxeland folder, but can't find this file. Anyways it was either for v.1.04 or 2.0, and current version is 5. I'm pretty sure it's not compatible with the last Voxeland version - especially if it is .js.
I will look for a way to make it work with metal, but can't promise I'll succeed.