Announcement

Collapse
No announcement yet.

Runtime Mesh Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by Koderz View Post
    Hey [MENTION=29116]NanoVoxel[/MENTION]: Did you download the github repo itself (either as zip or through git)? If so the RMC is a submodule that you have to update if you pulled through git, or you have to get it from the main repo and put it in the plugins folder if you just downloaded it as a zip. The other alternative is to get the release zip that should be fully working from the releases page on github.

    https://github.com/Koderz/UE4Runtime...mples/releases
    That worked thank you!!!

    Leave a comment:


  • replied
    This is super cool, bookmarked.

    Leave a comment:


  • replied
    Hey [MENTION=29116]NanoVoxel[/MENTION]: Did you download the github repo itself (either as zip or through git)? If so the RMC is a submodule that you have to update if you pulled through git, or you have to get it from the main repo and put it in the plugins folder if you just downloaded it as a zip. The other alternative is to get the release zip that should be fully working from the releases page on github.

    https://github.com/Koderz/UE4Runtime...mples/releases

    Leave a comment:


  • replied
    After downloading the Example project from Git Hub I'm getting the following error. I have latest version of 4.12 and vs installed.

    Click image for larger version

Name:	1.png
Views:	1
Size:	8.9 KB
ID:	1112201

    Leave a comment:


  • replied
    Originally posted by S0rn0 View Post
    You basically said word for word what I was thinking. I will be looking into the texture arrays for sure that could be a nicer approach.
    It looks like they are getting a bit of attention and a merge will be happening sooner than later.

    Thanks for your very detailed answer.
    They're probably the best approach for block voxel, and yeah I'm glad it looks like they're about to be merged.

    That PR has been a long time coming. That PR was started by Hilmar back in October, and I cleaned it up/bugfixed it and maintained it for the past couple months so I'm happy to see them looking into it now.

    Leave a comment:


  • replied
    Originally posted by Koderz View Post
    While I definitely get the desire for doing separate materials, it's likely going to limit you rather quickly. The problem with the RMC, and well any component for this, is that to do separate materials you need separate draws. For the RMC that translates into separate sections for each material. If you have a couple materials, you're probably OK, but if you have tens or hundreds of materials, you're going to get very poor performance for any decent scale voxel. The problem is pretty simple if you have 100 chunks with 1 material you have 100 draw calls, if you have 2 materials you have 200 draw calls, so the count goes up very rapidly and it won't take long at that rate to start limiting yourself by the draw call counts.

    Atlasing is one way to get around it, another way is to use texture arrays. I have an open PR ( https://github.com/EpicGames/UnrealEngine/pull/2340 ) for that to the engine but have no idea if/when it would be merged. So if you want to use a source build of the engine you can find them in my repo ( https://github.com/Koderz/UnrealEngine ) but that would require building from source.

    With either atlas or texture arrays you can use additional textures to supply the other PBR info/normals etc. The only time I split apart the mesh in my system is for things like foliage and water which need a completely different render model.
    You basically said word for word what I was thinking. I will be looking into the texture arrays for sure that could be a nicer approach.
    It looks like they are getting a bit of attention and a merge will be happening sooner than later.

    Thanks for your very detailed answer.

    Leave a comment:


  • replied
    Originally posted by S0rn0 View Post
    Koderz, this is some great work! Thank you for the amazing contribution.

    Quick question for you regarding materials, a friend is trying to create some procedurally generated terrain using cubes (for the moment) and is having a hard time deciding how to apply several materials for each type. I suggested a texture atlas, but she would much rather create the materials individually.

    Any suggestions I could pass along?
    While I definitely get the desire for doing separate materials, it's likely going to limit you rather quickly. The problem with the RMC, and well any component for this, is that to do separate materials you need separate draws. For the RMC that translates into separate sections for each material. If you have a couple materials, you're probably OK, but if you have tens or hundreds of materials, you're going to get very poor performance for any decent scale voxel. The problem is pretty simple if you have 100 chunks with 1 material you have 100 draw calls, if you have 2 materials you have 200 draw calls, so the count goes up very rapidly and it won't take long at that rate to start limiting yourself by the draw call counts.

    Atlasing is one way to get around it, another way is to use texture arrays. I have an open PR ( https://github.com/EpicGames/UnrealEngine/pull/2340 ) for that to the engine but have no idea if/when it would be merged. So if you want to use a source build of the engine you can find them in my repo ( https://github.com/Koderz/UnrealEngine ) but that would require building from source.

    With either atlas or texture arrays you can use additional textures to supply the other PBR info/normals etc. The only time I split apart the mesh in my system is for things like foliage and water which need a completely different render model.

    Leave a comment:


  • replied
    Koderz, this is some great work! Thank you for the amazing contribution.

    Quick question for you regarding materials, a friend is trying to create some procedurally generated terrain using cubes (for the moment) and is having a hard time deciding how to apply several materials for each type. I suggested a texture atlas, but she would much rather create the materials individually.

    Any suggestions I could pass along?

    Leave a comment:


  • replied
    Originally posted by TK-Master View Post
    [MENTION=141752]Koderz[/MENTION] this is an awesome plugin! thanks for releasing it for free
    I'm using it for an interactive fluid surface which needs a buffer of the previous vertex positions so this is pretty great for this sort of thing

    Is there any chance you can look into tessellation? It's probably the only missing feature I need!


    I do plan to look into that here soon. IIRC from my quick research a while back it requires adjacency info in the index buffer which there's a utility function in the engine to calculate but I think it's currently only in editor builds. So you can probably use it right now in editor, but since we can't link editor modules at runtime we'll likely have to get Epic to allow it to be in packaged versions. I might look into it more in the next few days assuming I wrap up my collision work soon, which has been slow going due to 15-20 minute re-compiles of half the engine any time I breathe in the direction of a header...


    [MENTION=1374]JamesG[/MENTION], just wanted to check that you got the stack trace and other information I sent you regarding the physx crash? Hopefully in the next couple days I'll have a working setup for multi threaded cooking. Also as a part of the statement above, any chance we could get BuildStaticAdjacencyIndexBuffer from the MeshUtilities (assuming that really is what's needed for that) in a way we could use it in a packaged, non-editor build? Or should I just re-implement it in the RMC, since all it's really doing is wrapping the nvidia tessellation library?

    Leave a comment:


  • replied
    [MENTION=141752]Koderz[/MENTION] this is an awesome plugin! thanks for releasing it for free
    I'm using it for an interactive fluid surface which needs a buffer of the previous vertex positions so this is pretty great for this sort of thing

    Is there any chance you can look into tessellation? It's probably the only missing feature I need!

    Leave a comment:


  • replied
    Originally posted by Stoon82 View Post
    It's probably exactly that... I'm doing all the work in the blueprint's construction script as of now: create the vertex-array, index-array, add runtime mesh component, create mesh section.
    But I have the array creation behind a boolian-branch (if initialize_mesh_data == true, add vertecies to array)... so when I duplicate the BP, the array is still empty and the RMC crashes the engine and the BP is taken from the content browser. It's not too hard to get back, but actually, I can't edit it, since every time I open it, the engine crashes again. recreating that shouldn't be too hard, if still neccessary.
    But after all, I didn't want to be all that negative: I love the procedural mesh component, and from all I could try and see, the runtime mesh component works a treet (besides the mentioned effect) and adds even more speed and flexibility.

    If someone knows how to make and octree-database on server side to stream data to the client, the step to have something like midgen's CashGen Plugin and add editable landscape like here (https://www.youtube.com/watch?v=yTRrv4lBVyc) with overhangs and cliffs.
    I can add editor only conditions to just log an error and bail instead of assert crashing here later on tonight, that will let you in to edit it without crashing.

    Worth of your other question with the octree-database, it's not easy to stream large binary data in ue4's networking from everything I've seen. If you're around the Unreal Slackers chat you can find me, I'm working on things that might be somewhat similar to what you're wanting.

    Also, while I don't really use BP functions for the RMC/PMC the PMC was updated not too long ago to use LinearColors in BP saying that the regular color didn't work so I stuck with that in the RMC.

    Leave a comment:


  • replied
    Another question though:
    I had trouble creating an array of 'color structur' from a BP and it doesn't allow for feeding in an array of linear colors; the same goes for procedural mesh component. I could be totally of the track here, but I tried quite some time to find a workaround and never got it to work. Any advice anyone?

    Leave a comment:


  • replied
    It's probably exactly that... I'm doing all the work in the blueprint's construction script as of now: create the vertex-array, index-array, add runtime mesh component, create mesh section.
    But I have the array creation behind a boolian-branch (if initialize_mesh_data == true, add vertecies to array)... so when I duplicate the BP, the array is still empty and the RMC crashes the engine and the BP is taken from the content browser. It's not too hard to get back, but actually, I can't edit it, since every time I open it, the engine crashes again. recreating that shouldn't be too hard, if still neccessary.
    But after all, I didn't want to be all that negative: I love the procedural mesh component, and from all I could try and see, the runtime mesh component works a treet (besides the mentioned effect) and adds even more speed and flexibility.

    If someone knows how to make and octree-database on server side to stream data to the client, the step to have something like midgen's CashGen Plugin and add editable landscape like here (https://www.youtube.com/watch?v=yTRrv4lBVyc) with overhangs and cliffs.

    Leave a comment:


  • replied
    [MENTION=43854]Stoon82[/MENTION] I'm not quite sure I understand what you're attempting to do. That assert is when you pass an empty vertices array to CreateMeshSection since it can't handle that safely. I need to switch those over to log errors in editor though instead of just assert crashing the engine...

    Let me know more what you're trying to do, or if you can recreate it in a little test project and share that, and I'll try to figure out why it did that.

    Leave a comment:


  • replied
    Runtime Mesh Component keeps shooting my (test-)project: when I dublicate a blueprint containing RTM and then doubleclick to open the blueprint, the engine crashes with this report:

    -------------------------------------



    "Assertion failed: Vertices.Num() > 0 && 'Vertices length must not be 0.' [File:C:\..\Documents\Unreal Projects\ULNExample\Plugins\RuntimeMeshComponent_v1.0\Source\

    KERNELBASE
    UE4Editor_Core
    UE4Editor_Core
    UE4Editor_Core
    UE4Editor_RuntimeMeshComponent!URuntimeMeshComponent::CreateMeshSection() [c:\..\documents\unreal projects\ulnexample\plugins\runtimemeshcomponent_v1.0\source\private\runtimemeshcomponent.cpp:850]
    UE4Editor_RuntimeMeshComponent!URuntimeMeshComponent::CreateMeshSection_Blueprint() [c:\..\documents\unreal projects\ulnexample\plugins\runtimemeshcomponent_v1.0\source\private\runtimemeshcomponent.cpp:948]
    UE4Editor_RuntimeMeshComponent!URuntimeMeshComponent::execCreateMeshSection_Blueprint() [c:\..\documents\unreal projects\ulnexample\plugins\runtimemeshcomponent_v1.0\source\public\runtimemeshcomponent.h:62]
    UE4Editor_CoreUObject
    UE4Editor_CoreUObject
    UE4Editor_CoreUObject
    UE4Editor_CoreUObject
    UE4Editor_CoreUObject
    UE4Editor_CoreUObject
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Engine
    UE4Editor_Kismet
    UE4Editor_Kismet
    UE4Editor_UnrealEd
    UE4Editor_UnrealEd
    UE4Editor_UnrealEd
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    kernel32
    ntdll

    -------------------
    After restarting, the blueprint is gone from the content browser, even though the files are still in the project folders.

    Leave a comment:

Working...
X