I’m looking for a ‘Hello World’ C++ example that generates dynamic content. So far I have not really found anything, sorry I’m very new to Unreal!
I’m looking for something that loads an .obj or .fbx file from disk, place the mesh somewhere in the world add a light or two and then attaches a material with a texture (also loaded dynamic from disk) to the mesh. All this done in C++ code, not from any editor generated content. Is that even possible?
Example project would be greatly appreciated.
How about watching the Epic Games Tutorials for the Unreal Engine 4 on Youtube.
There is also a C++ Tutorial Series.
Normaly you create a class in c++ with some properties and components. For example
Later inside the Editor, you would create a BP of this class. You would import the fbx file
into the editor and add it to the BP StaticMeshComponent. Now you can place it inside your
I think this is the most simple workflow for a c++ beginner and you learn most of this
in the Tutorials on Youtube.
Well I’m looking for a solution that does not involve the editor.
I have watched most of the tutorials and they all use the editor to import meshes and to generate materials.
I’m trying to see if the Engine can be used for a very specific solution where all content is procedural generated in other applications and the engine is just used for rendering to image.
So my pipeline would be something like:
- procedural generate content.
- start engine
- load content
- render scene.
- save rendered scene to .png or whatever.
- shut down engine
Or something like that.
Although I still use the editor to load in assets, my assets only contain a filename to the file on the hard drive to read in, then when running in game, the mesh is dynamically loaded from the location specified, same with the textures, the materials are based on some templates, where I create a MID and assign the dynamically loaded textures. So it is possible, but at some point you will need to use the editor to at least set something up to kick off the whole process.
Do you have any source code examples? Sounds like you do more or less what I would like to do.
I will strip out some of the source from my game and upload them as examples
Heres a link to the code:
It will not compile out of the box as I have removed some propriety stuff from it. You will have to provide your mesh loading routine and load in your textures and such.