Has anybody had any experience trying to draw a Procedural Mesh directly to the screen instead of In-World? I’ve managed to get wireframe rendering in Slate but they’re not exactly performant, and not tried a mesh with a simple material applied yet.
If anybody could shed any light in that thread, I’d much appreciate it. I’m at a slight disadvantage in that I need to rebuild the wireframe and it’s vertices each frame due to the screen-space transform and the culling. If there’s a way to cull the meshes by polygons, that would be great too.
[=nako_sung;432855] @mflux you procedural mesh generator can be executed in editor by checking ‘activate in editor’.
[/]
Yeah! I realize that now, that’s really really cool. Before I tried to have the V8 instance on the same actor as the procedural mesh, and that was a mistake since moving the actor causes V8 to reinitialize every frame (!!) in the editor.
[=nako_sung] @mflux Great post! BTW, I think that BP class isn’t necessary. It can be implemented/replaced with JS only. You can create a proc gen component inside your class.
I also think that it is possible to publish your some three.js - unreal.js code as a module in NPM, so others can refer it by ‘npm i three-ue4’.
[/]
, can you please show me how this is done? I’m very familiar with JS, just not with Unreal’s API. Where do you look up Unreal’s API code (I can find that in Google), and how does that translate over to JS? For example, how do you create a component in JS, with UnrealJS? Do you mind writing an example?
Did anybody succeed to get ProceduralMeshComponent.h included in 4.10(.1)? I’m still struggling with it. Seems as if the header and class is part of a in the new release but even after some hours I did not succeed to get the file included into my project.
Hi, I’m new to Unreal engine and I was trying to use this method to build my own meshes dynamically. However, i’m confused with the collision function: It seems that it build collision successfully but how does it make it? I noticed some functions may related to the collision function:
Functions I seem to create a collision directly defined by the mesh and functions II seem to create a bounding box. So, my question is :
1.How does it define collision? by Functions I or byFunctions II ? or both works in the collison building process?
2.If i had misunderstood the process, then what's the flow of buiding collision?
Basically, I need to dynamically update triangles as well, however UpdateMeshSection won’t allow it and CreateMeshSection is too slow. I’m looking into extending ProceduralMeshComponent but a bunch of required stuff is private. I’m not really sure if I’m wasting my time going down the wrong road here, so some advice from you guys would be great.
Using an ‘index buffer’ like this is how most stuff actually gets rendered under the hood. The big advantage is that you can re-use vertices. So if you imagine a rolling landscape, each vertex is actually re-used by about 6 triangles - it is ‘shared’ by the triangles around it. By splitting vertex information from triangle information, that vertex only has to be copied/transformed once. In the old scheme, you would have to duplicate the vertex. One you start thinking of things as “ok, which unique vertices do i need, and how do i connect them into triangles?”, I think it is actually easier to build stuff. Certainly my test Blueprints are simpler using ProcMeshComp than CustomMeshComp.
[/]
By the way JamesG I know it’s been months since you’ve posted this. I just got started with UE4 and was able to do these with the ProceduralMeshComponent. Great work! I’m still trying to extend it and push its limits.
Basically, I need to dynamically update triangles as well, however UpdateMeshSection won’t allow it and CreateMeshSection is too slow. I’m looking into extending ProceduralMeshComponent but a bunch of required stuff is private. I’m not really sure if I’m wasting my time going down the wrong road here, so some advice from you guys would be great.
[/]
So has anybody been able to convert procedural meshes to static meshes? I’ve been using procedural mesh generation to make fancy shapes, but I can’t figure out any way to copy them. My goal is to randomly create a few models at the start of each level, and then combine them together to get a bunch of random enemies fast. Is it fast enough to just create another procedural mesh and redo the collision generation and so on?
Hello.
Yesterday i’ve done scrolling this thread. Today i tried to create some procedural stuff, but i failed at the first step, on compiling code in vs. I use UE4.10, and try to compile example with cylinder:
[=SiggiG;300290]
Here is a quick example on how to use the new ProceduralMeshComponent in 4.8.
[/]
But, i cant compile this class at all. The reason is: indentifier “FProcMeshTangent” not found. Somewhere on answerhub i found that include of ProcedurialMeshComponent doesn’t requiered any more. Also i saw solution like that - create blueprint, extend it with cpp, do all mesh calculations in cpp, an then just bind trigs and point to procedural mesh component in blueprint.
So, the questions is - how to get it work on this simple example? What is the best practise of procedurial meshes in UE4.10? Can i done it completly in cpp, or i must create blueprint wrapper for it?
You can do everything in C++ (I’m doing so), but you definitely need to add #include “ProceduralMeshComponent.h” if you want to use it.
However, I also had big problems getting it to work in a fresh project and I ended up creating a new project and adding a class that extends ProceduralMeshComponent. I assume that the engine will then add or activate anything that makes it work.
With the “old” GeneratedMeshComponent it was enough to add some modules in your build.cs file but this didn’t work - at leats not for me - with the new PMC.
Right now i have some progress. According to this wiki pagei make it work. But one problem now - Intelli Sense in VS cant find this includes. Also i cant find any api documentation, where i can check how to call all of this functions.
I found some header files in folder. There was one more cool file called “KismetProceduralMeshLibrary.h” inside of this file i found one cool function that generates tangents and normals. I want use it but i cant, cause i dont know what to #include, in my .h file.
So, main quastion is - how to include it properly, to be everything work as it should. I whant intelisense understand my includes, not only build system.
Hi, I’m on 4.10 and when generating a mesh in blueprint I can’t seem to feed a straight color array variable in the Vertex Color slot, only a “make array” node works.
This means I have to manually set a color for each vertex instead of generating them procedurally. Any help?
Nope, number is right but it won’t even let me connect the array to the input. When I try I get one of those automatic adapter nodes placed in between, as if the data type is wrong, but it’s definitely a color array. If I connect out of it I get a make array node.
mh, it seems the vertex colors need to be Color Structures and made of bytes rather than Linear Colors made of floats, however I don’t think you can actually create a Color Structure color as a variable? At least I’m on a Mac using 4.10, and I only have Linear Color as a variable option. Therefore I can’t make a vertex color array procedurally right now.