tutorial unreal engine 4 para arquitetura

18
This is a public community guide to using Unreal Engine 4 for architectural visualization. Last updated :28 Feb 2015 We will keep adding content to the guide and check for suggestions from you, so feel free to comment and suggest changes. This document is public, so share the knowledge and play nice! To comment, select a piece of text or a pic, right click, and click comment. Text with comments will be highlighted. To suggest changes or add new content simply edit the document. The font for suggestions is green. When editing, please provide links when mentioning external sources like videos or documentation. You can use the chat feature if you log in with your google account. Below is the table of contents. Right click then click on the link to jump to a specific chapter. Preparing content for UE4 Models - 3ds MAX 3d Meshes Polygon optimization Migrating from Vray UV Mapping Light Mapping Collision LOD FBX export Blender workflow Vegetation - SpeedTree Landscape Generation Natural

Upload: alex-fernando

Post on 16-Nov-2015

369 views

Category:

Documents


7 download

DESCRIPTION

Passos básicos para projetos de arquitetura no unreal engine

TRANSCRIPT

  • This is a public community guide to using Unreal Engine 4 for architectural visualization. Last updated :28 Feb 2015 We will keep adding content to the guide and check for suggestions from you, so feel free to comment and suggest changes. This document is public, so share the knowledge and play nice! To comment, select a piece of text or a pic, right click, and click comment. Text with comments will be highlighted. To suggest changes or add new content simply edit the document. The font for suggestions is green. When editing, please provide links when mentioning external sources like videos or documentation.

    You can use the chat feature if you log in with your google account. Below is the table of contents. Right click then click on the link to jump to a specific chapter.

    Preparing content for UE4 Models - 3ds MAX

    3d Meshes Polygon optimization Migrating from Vray UV Mapping Light Mapping Collision LOD FBX export Blender workflow

    Vegetation - SpeedTree Landscape Generation

    Natural

  • Urban Esri CityEngine Ghost Town 3ds Max Script

    3d People (What other software do you use?)

    UE4 Fbx Importing Materials

    General Painting Map Generators - crazybump, Shadermap 2, Bitmap2material, Genetica Substance Quixel Suite

    Vegetation Importing SpeedTree Grass

    Lighting - static Lighting - dynamic Matinee and Recording Interactivity

    Lights Other subjects??

    Collaborative Workflow

    I. Preparing content for UE4

    A. Models - 3ds MAX

    1. 3d Meshes Unreals default unit is 1 cm, so match 3ds Max units to that. Use meshes with a relatively low polycount, but not as low as in video games since the goal is high quality archviz. High poly meshes can kill your framerate. Organize meshes in 2 groups:

  • The architectural meshes, used only once throughout the scene (the architectural assets, the landscape and the streets etc), all have their pivot at the same location, at 0,0,0 world coordinates for faster importing and positioning. You can divide some of the meshes up in multiple elements for better light build results. (ex. the walls consist of separate meshes on each side of the building)

    The props (candles, books, pillows, benches etc) - used more than once, each have a local

    pivot, at their lowest point on the z axis.

  • Pivot can also be set up using the options of one of the batch exporters - see 9. FBX Export

    2. Polygon optimization Reducing poly count is essential for UE. It is also important when working with your 3d library that is produced for the standard rendering industry. 3ds Max has 3 basic modifiers for this: Multires, Optimize, ProOptimizer This process can be tricky for more complex objects such as a car where some objects are more detailed than other. In this case you will need to take individual parts and optimise them. Do not forget to check protect UV option when optimizing.

  • 3. Migrating from Vray This topic intends to offer tips and tricks on how to make this process fast and easy. The main idea is that you have to open a vray object, convert all materials to standard materials with all textures in place, and optimize the mesh without ripping the UVs. Bellow is a test using this scene convert script: AK-VRmtl to standard.ms As you can see the script maintained only the diffuse maps. You will have to place all the other maps manually in UE4.

    4. UV Mapping UV mapping on channel 1. We used custom UV only on important meshes such as the main walls and floors, where the final output needed to match the original building precisely. On all other meshes we applied a standard UVW mapping of 100x100x100cm. We recommend doing UVW on all objects, you may never know when a map will be applied in UE. On objects with more materials use Default 3ds max Multi/Sub Object. For a good fbx export, all materials should be standard 3ds Max (no vray, etc.). UE will also recognise if you use a diffuse map.

    http://www.scriptspot.com/3ds-max/scripts/vray-material-to-standard-material

  • 5. Light Mapping This process is really time consuming. It is required for Light Baking in UE4. We really hope that in the future the engine will be fully dynamic and light baking will be a thing of the past. The current fully dynamic feature, LPV (light propagation volumes) yields mediocre results. On texture channel 2 of each object make a new uv mapping in which all polygons are placed within the one unit square of the uv space. For quicker results use Unwrap UVW modifier with default flatten mapping (This is not the best result method)

  • *UE docs: More details on Lightmapping

    6. Collision All meshes used in games must have collision geometry, otherwise you could walk through walls. Same goes for archviz navigation. *UE4 docs: Collision documentation Unreal can generate few types of collision geometry based on the mesh geometry. However, if the 3d meshes are very complex this can add up and cost you a lot of resources which translate to lower frame rates. Its best to have most of the collision made of simple boxes in 3dsMax. And remember, objectA must have a collision mesh with the name UCX_objectA with the pivot point in the same place.

    https://docs.unrealengine.com/latest/INT/Engine/Content/Types/StaticMeshes/LightmapUnwrapping/index.htmlhttps://docs.unrealengine.com/latest/INT/Engine/Physics/Collision/Reference/index.html

  • 7. LOD In video games this is very important. LOD defines how detailed objects are rendered at certain distances, so that the GPU makes better use of resources. We skipped LOD creation for now, and this may have lowered our final frame rate. Well experiment more with LODs in the future, in the meantime help us expand this section! *UE4 docs: More on LODs

    8. FBX export Try one of these scripts to help you export your assets FBX to UE4 Batch Exporter 1.1 TS_UE4FbxExporter Let us know if you use other scripts and tell us about the workflow!

    9. Blender workflow There is a guide detailing the Blender - UE4 pipeline here on the unreal wiki.

    B. Vegetation - SpeedTree Up to now SpeedTree has the best integration for vegetation in UE4. Keep in mind that all trees have Lightmaps, Wind and Ambient Occlusion. Unfortunately you cannot use the standard SpeedTree library because those models don't have with light maps for UE4. Try to learn from Maico Girardi, he has great tutorials. Also see Marco Girardis ST grass. (for UE4 grass please check the UE vegetation section below)

    C. Landscape Generation 1. Natural 2. Urban

    a) Esri CityEngine b) Ghost Town 3ds Max Script

    D. 3d People E. (What other software do you use?)

    II. UE4 A. Fbx Importing

    Once you are done exporting, run UE4 and start setting up. Start a new project and pick the blueprint first person template. For optimal quality and starter content, settings should be like in the pic below. Dont forget to specify the location, otherwise it will be stored on your windows partition, and projects can pile up pretty fast and eat up your HDD storage space which is annoying if you are using a SSD.

    https://docs.unrealengine.com/latest/INT/Engine/Content/FBX/StaticMeshes/index.html#staticmeshlodshttps://forums.unrealengine.com/showthread.php?41210-3dsmax-Maxscript-FBX-to-UE4-Batch-Exporter-v1-1http://www.scriptspot.com/3ds-max/scripts/3ds-max-to-ue4-fbx-scene-exporthttps://wiki.unrealengine.com/Static_Mesh_from_Blenderhttps://wiki.unrealengine.com/Static_Mesh_from_Blenderhttps://www.youtube.com/playlist?list=PLZRcZobSPvohIrxqJkpybD_-dvlAGLd77https://www.youtube.com/watch?v=6wG4Tam4MY0

  • The Unreal YouTube Channel has lots of good tutorials here, watch as many as you can ! Its important to read all the pop-ups related to the UI to get your bearing. One important

    thing to remember, your project can have multiple maps, and the content browser to the left displays the assets shared by all the maps in the current project. If you delete an asset in the content browser it will be removed from all of your maps, so careful with that! We found out the hard way

    FBX importing is as simple as dragging and dropping the FBX files in the content browser with standard settings, except the combine meshes option. Keep that off.

    https://www.youtube.com/playlist?list=PLZlv_N0_O1gaCL2XjKluO7N2Pmmw9pvhE

  • Lightmap UVs should be generated externally, auto-generation is still not good enough. Maybe they will improve on this in future updates. Collision will use mesh geometry if checked; not a good choice for high poly meshes. Importing materials can be useful if you dont want to bother replacing them (not recommended, UE4s physically based shaders are great), or if you want to replace them and identify them more easily on a mesh with a lot of material ids. This is what i did for vehicles.

    Next step is to drag and drop meshes from the content browser, into the scene (map). They are added to the scene outliner on the top right as you do that, and you can edit details in the lower right pane. This is where the location coordinates can be edited. As i mentioned earlier, we set the pivot point at 0,0,0 coordinates in MAX, then set the same coordinates here in UE4. This is how we imported and positioned all the architectural assets in one move.

    Props are imported pretty much the same way, except you have to position them manually,

    one by one.

    B. Materials 1. General

    This is when you start creating some simple materials and lights to get a basic idea on how it will look. You can find video tutorials for materials here, and more info here.

    Material creation is a 3 step process: First, google seamless images of what you need and apply a high resolution filter (ex.

    wooden floor seamless texture). Its recommended for the texture dimensions need to be a power of 2, so go for 512x512, 1024x1024, 2048x2048, or 4096x4096.

    https://www.youtube.com/playlist?list=PLZlv_N0_O1gbQjgY0nDwZNYe_N8IcYWS-https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/index.html

  • If the texture you like isn't seamless or a power of 2, then proceed to step 2: Photoshop editing - image resize or a bit of custom dimension cropping will get you the right

    proportions and size, and the offset filter + Healing brush will make it look seamless. Click on offset then set both horizontal and vertical to half the size of the texture. That will

    get the seams in the center of the image and make it easier to edit them out using the healing brush tool.

    This wood texture was 2000x2000, so we upscaled it to 2048x2048

  • 2. Painting

    3. Map Generators - crazybump, Shadermap 2, Bitmap2material, Genetica Step 3 is creating the other texture maps using the original texture. We only created normal

    maps and a few specular maps for this project. There are several tools available for map creation, we tested CrazyBump and Shadermap 2,

    they are both great. On the next project we are planning on testing out Allegorithmics Bitmap2Material, which is PBS ready, and Quixel Suites NDO. Shadermap can export all maps with one click.Geneticais a great tool for creating tileable textures based on photos but even better for generating procedural maps (biggest amount of noise types of any program i know of). Equalize Texture is a photoshop script that make texture flat from wrong light.

    http://www.crazybump.com/http://shadermap.com/home/http://www.allegorithmic.com/products/bitmap2materialhttp://quixel.se/ndohttp://www.spiralgraphics.biz/genetica.htmhttp://www.spiralgraphics.biz/genetica.htmhttps://dl.dropboxusercontent.com/u/4341444/Flat_texture.ziphttps://dl.dropboxusercontent.com/u/4341444/Flat_texture.zip

  • After you are done with map creation get them in the content browser (UE4 only accepts onlycertain file types) and create a basic material. Connect the new texture maps to their respective material parameters (diffuse map to base color, normal map to normal, specular map to specular). Alter other material parameters like roughness and opacity to suit your needs and you have your basic material ready. For more advanced materials use epics tutorials.

    A basic material only needs diffuse and normal maps and looks like this:

    https://docs.unrealengine.com/latest/INT/Engine/Content/Types/Textures/Importing/index.htmlhttps://docs.unrealengine.com/latest/INT/Engine/Content/Types/Textures/Importing/index.html

  • Quick shortcuts: click while holding t : creates a texture node at that location using the currently selected

    texture in the content browser. If you don't have a texture selected in the content browser when doing this, you will get an error message at the bottom of the node like in the pic above. link

    click while holding 1 : creates a constant at that location. link click while holding u : creates a Texture Coordinate expression at that location. link click while holding m : creates a Multiply expression at that location. link

    4. Substance 5. Quixel Suite

    C. Vegetation 1. Importing SpeedTree 2. Grass

    Here is a great grass asset made byAaron Neal. In the video comments you can find all the details for making this grass and also the project with grass ready to use.

    D. Lighting - static Firstofallreadthis,itsthedocumentationonglobalillumination.After you are done with imports and materials you can start experimenting with lighting. Drag

    anddropadirectionallightfromthemodesareaintothescene.

    In our case, while the church needed strong lighting (50 intensity, 15 indirect contribution), the

    school needed a directional light with low intensity (7.5) and a high indirect contribution factor (30). This is because Tadao allowed just a touch of light to penetrate the church walls for that dramatic crossshaped light effect, while the school receives a bit more light. The pics below show just that (high exposure,therealthingisdarker).

    https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Textures/index.html#texturesamplehttps://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Constant/index.html#constanthttps://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Coordinates/index.html#texturecoordinatehttps://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Math/index.html#multiplyhttps://www.youtube.com/watch?v=AFvdK6ZPBN0https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/Lightmass/index.html

  • Altering the direction of the light could have resulted in a very different look but we preferred something abitmorerealistic.

    More info on directional lights can be found here. Since there is no formula for the perfect setup and each scene has different lighting requirements, youll have to play around with the parameters and findwhatsuitesyourneeds.

    https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightTypes/Directional/index.html

  • Modifiedsettingsaremarkedwithyellowarrows,everythingelseisstandard.When we were done setting up the lighting we built the light by pushing the build button. You

    should keep it on preview for a faster workflow until the scene is done then build it on high or production quality.(youcanfindtheseoptionsinthedropdownmenuofthebuildbutton.)

    After the light build was complete, we were looking to tweak the look of the scene even further, so we used the post process volumes in the Modes/Place/Visual tab. We dragged and dropped them into the scene, set the scale to encompass the room/ scene we were looking to adjust, and started experimenting with the parameters. In my opinion, the ones with the biggest impact are GI and Depth of

  • field. Consider that using some of the post process effects can make your scene look better from an artisticstandpoint,buttheycandriveyouawayfromphotorealism.

    The parameters we tweaked are contrast, a bit of vignette, bloom, GI, screenspace reflections, andDOF.Therearenoformulashere,sotrythemout!

    We left everything on theworld settings tab on default, as post process volumes gave us better localcontrol.

    E. Lighting - dynamic F. Matinee and Recording

    You can find everything you need to know about matinee in the documentation provided by EPIC here: userguide, howto, and an examplebreakdown.

    After you are done with the creation phase , you can record it using matinees tools, or you can do it using external software likefraps.

    In order to have a high framerate you should record image sequences and then complete the video inadobeaftereffects, add sound and other effects. If you want quick results then just use the movie recorder in the engine. Recording the video with the engines tools can sometimes make the video a bit laggy. you can see that in most UE4 videos online. Ive had better results using fraps. Just make sure the viewport is fullscreen and you set the taskbar on auto-hide.

    G. Interactivity

    Lights Heres a quickvideo uploaded by David Boura on how you can turn lights on and off by using a keyboard key.

    H. Other subjects??

    III. Collaborative Workflow One of our goals was to use UE4 as a collaborative tool, so we experimented with Perforce,

    GoogleDrive,andDropbox.Perforceisok,itsavesmultipleversionsoftheproject,sothatyouhaveaccesstotherevision

    historyifyoumessup.Itoffersplentyofcontrol,butitshardtosetup.ItalsousesatonofHDDspacetostorerevisions.Youcantuseittomakerealtimechangesandeverytimeyouwanttoworkonyourprojectyouhavetogothroughaprocessofcheckingoutandthencheckingin.Itstimeconsuminganditsnotworthit,unlessyouhavealargeteamandneedmorecontrol.

    I found that the best way to work in small teams is to use a cloud storage tool likeGoogle Drive / Dropbox etc. Dropbox didn't offer enough storage space unless we bought a premium package, so we went for GDrive. You simply share your project folder with your team and every time anyone makes a change (and saves), the project is updated in the cloud. If you only want to add assets to the content browser,youdontevenneedtoclosetheengine,itupdatesinrealtime.

    UE4archvizguideSince version 4 of the engine is not even a year old and updates and new features are rolling out

    regularly, I thought it would be a good idea to create a public UE4 archviz guide that everyone can contribute to, so we can keep up with the updates and share the knowledge. The guide is a google document that can be updated in real time, and that anyone can comment on, so help us fill the empty sectionsandtellusaboutyourexperienceusingUE4forarchviz!

    https://docs.unrealengine.com/latest/INT/Engine/Matinee/UserGuide/index.htmlhttps://docs.unrealengine.com/latest/INT/Engine/Matinee/HowTo/index.htmlhttps://docs.unrealengine.com/latest/INT/Resources/Showcases/MatineeFightScene/index.htmlhttp://www.fraps.com/http://www.adobe.com/en/products/aftereffects.htmlhttps://www.youtube.com/watch?v=-OnwqoKsClchttp://www.perforce.com/https://www.google.com/drive/https://www.dropbox.com/