#My Remake of 3ds Max
I started remaking 3ds Max in UE4, just for fun.
*"
So more precisely, my two questions are: 1.How suitable UE4 would be for something like that in terms of performance? (let’s say I want to make something like Zbrush’s “dynamesh” feature, if anyone here is familiar with it?)
2.How suitable UE4 would be for something like that in terms of time/effort to make something like that in UE4 vs time/effort to do something like that with pure code from scratch. (keep in mind that I haven’t found a single engine for creating 3D applications so far,"*
#“It’s VERY VERY POSSIBLE” -Rama
#Video
I got as far as dynamically building Torus knots where you can set the exact specifications, and then you can watch it render!
Keep in mind I do the rendering slowly just for fun
Video on Forum
#UV Mapping and Collision
I later added collision and UV Mapping
#My 3ds Max Progress
I had selecteable triangles, could add and delete vertices, and flip normals and all of that. as you can see in video I had no issues rendering extremely high details meshes using DynamicMesh Builder
#Where to Start
Look up how rendering works in BoxCollisionComponent.cpp or SphereComponent.cpp
For legal reasons I can’t post too much code, but this is the general vicinity of what you want:
//~~~~~~~~~~~~~~
// Scene Proxy
//~~~~~~~~~~~~~~
FPrimitiveSceneProxy* USculptor::CreateSceneProxy()
{
class FDraw3DSceneProxy : public FPrimitiveSceneProxy
{
public:
FDraw3DSceneProxy(USculptor* InComponent)
: FPrimitiveSceneProxy(InComponent),
Sculptor(InComponent)
{
bWillEverBeLit = false;
}
//Draw Dynamic
virtual void DrawDynamicElements(FPrimitiveDrawInterface* PDI,const FSceneView* View) OVERRIDE
{
//draw to the PDI here!
}
#How To
I created a single actor with a single “Scultpor” component which is my custom version of 3ds max.
That single component renders all the geometry for a single object that is being edited and shaped by the user.
So you are always drawing the PDI of a component that is part of an actor, but you can draw a LOT.
This keeps everything contained, and allows me to create or delete my “Canvas3D” whenever I want, or hide it, or move it, as you see in my video.
#Dynamic Mesh Builder
Look up info on dynamic mesh builder in the source code
FDynamicMeshBuilder
Creating Static Meshes at Runtime
Wiki Tutorial:
To get UVs working you will need to study how dynamic Mesh does it and modify the procedural mesh code accordingly.
I posted about it on the forums and on answerhub several times.