1/4/2024 0 Comments Unreal engine 4 3d modelsThe model can be rotated in local or world space. The model re-scales itself to a desired approx. The model is set to only receive light from lighting channel 1 so it is not affected by any other light (eg. The default comes with 3 point lights, using channel 1 (instead of 0) so it only lights the model and does not affect the scene. You can set up your own lighting in the Blueprint by using any of the Light components. The viewer is pretty straight forward with a simple set of features to give you a solid starting point to build the exact viewer for your own project. The Blueprint contains two important functions to use, SetMesh and Rotate. This is to ensure we don’t render the sky material into the texture so we get a nice transparent background. On BeginPlay the mesh is moved outside of the default Skybox. I’ve used this to filter out any Directional Light that may otherwise affect the lighting of this model. This is a new feature in 4.11, allowing you to set dynamic lights to only affect certain light channels. It’s important to note that the lights in the Blueprint are using Lighting Channels. The capture component renders to a RenderTarget (RT_ModelViewerOutput) which you can sample as a texture in any other material. The primary asset for this project is BP_ModelViewer, containing the model to render to texture, a few lights and a SceneCaptureComponent2D. You can find the download link to the open-source repository on GitHub below. Regardless, this sample project is stand-alone from anything I’ve done previously. I’ve had several people ask me how to create a 3D model viewer for use in such a system. Ever since Unreal Engine 4.0 came out I’ve had an inventory tutorial on my blog.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |