Urho3D Wiki
Explore
Main Page
Discuss
All Pages
Community
Interactive Maps
Recent Blog Posts
Wiki Content
Recently Changed Pages
Pony canyon
Creating Seamless Procedural Textures with Blender
First Project
Material
Creating your own C++ components
Unofficial Urho3D Wiki
Terrain Shader with normal, specular and height mapping
Videos
USP Sound Test
USP level 3 in 73.3359s
USP level 1 in 74.5266s
USP level 2 in 115.323s
USP level 3 in 73.3359s-0
Tutorials
Build Urho3D 1.4 or higher
Blender to Urho3D Guide
First Project (Urho3D 1.32 and 1.4-ish)
Community
Recent blog posts
Forum
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Urho3D Wiki
70
pages
Explore
Main Page
Discuss
All Pages
Community
Interactive Maps
Recent Blog Posts
Wiki Content
Recently Changed Pages
Pony canyon
Creating Seamless Procedural Textures with Blender
First Project
Material
Creating your own C++ components
Unofficial Urho3D Wiki
Terrain Shader with normal, specular and height mapping
Videos
USP Sound Test
USP level 3 in 73.3359s
USP level 1 in 74.5266s
USP level 2 in 115.323s
USP level 3 in 73.3359s-0
Tutorials
Build Urho3D 1.4 or higher
Blender to Urho3D Guide
First Project (Urho3D 1.32 and 1.4-ish)
Community
Recent blog posts
Forum
Editing
Blender Techniques
Back to page
Edit
Edit source
View history
Talk (0)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Blender Techniques (for game developers) == This page covers multiple useful Blender techniques that are especially useful for game developers. Some basic knowledge about Blender may be required. === Creating Materials, Texture Baking & UV Mapping === So we made a "low-poly" model with a material in Blender: [[File:Blender well.png|left|thumb|470x470px]] [[File:Blender well render.jpg|centre|thumb|680x680px]] Left: Scene overview. Right: With the normal Blender-Render rendered result. The material has one diffuse texture and one texture for both normal and specular mapping: [[File:Blender well diff.JPG|left|thumb|617x617px]] [[File:Blender well norm&spec.JPG|centre|thumb|621x621px]] You could also use more textures and/or the node editor to create a diffuse, normal or specular map. You can determine what kind of map they are by using the settings in the "Influence" area. ==== '''UV-Mapping''' ==== Before unwrapping: create a texture (I used 2048pxx2048px for each one. That was a bit low for the normal map, but may be enough depending on use case and limits). The unwrap menu can be accessed by pressing U while in edit mode: [[File:Blender well unwrap.png|centre|thumb|253x253px]] The most useful options are: '''Smart UV Project:''' This mode uses connected faces to build connected areas. '''Important for the later baking:''' set an "Island Margin". 0.03 (one click on the right arrow) is often enough. There should be a margin of several pixels between the connected areas. [[File:Blender well smart uv project.png|centre|thumb|221x221px]] '''Lightmap Pack:''' This mode ignores connected faces at all. It tries to fill the whole texture equally with every face, depending on their relative sizes (relative big face = big area, small face = small area). This mode may be the best when wanting to use the available texture pixels in the most efficient way, but makes it quite impossible to edit the texture via painting on it. [[File:Blender well lightmap pack.png|centre|thumb|222x222px]] '''Cube / Cylinder / Sphere Projection:''' Good for cubes, cylinders and spheres. Terrible for everything else. '''Important:''' This mode is often using UV coordinates outside the normal texture area. This gives problems when baking (could work but Blender's baking ignores texture wrapping). '''Stitching with seams:''' Best option for some complicated cases, or if you want to draw on the texture, may be the half-manual technique of marking edges via "mark seam" (Mesh->Edges->Mark Seam) an then using "Unwrap". The mesh is divided manually into several areas, the boundary of each area is the seam. ==== '''Baking the Textures''' ==== The "Bake" area is in the "Render"-Tab: [[File:Blender well bake.png|centre|thumb|220x220px]] Urho3D has several material techniques for different cases, like diffuse map + normal map + specular map. Depending on your case you may need other ones (too) like Alpha, Shadow or Ambient Occlusion. In my experience choosing "Specular Colors" to create the specular map creates better results as "Specular Intensity". Baking in "Texture" mode yielded this result: [[File:Blender well baked.jpg|centre|thumb|221x221px]] This is the diffuse texture (this is a Blender screenshot, the UV lines are not on the texture. But you can also create an image with the UV-Map-Lines on it, which makes painting textures easier.). I used "Smart UV Project" to get a better screenshot for explanation. "Lightmap Pack" may have been better and would have been my choice for this case (both because of the better pixel usage). Create all the textures you want and remember to save every one after generating it. '''Loading the Textures''' After generating every texture, you need to exchange all Blender generated textures with the just generated images: [[File:Blender well retextured.jpg|centre|thumb|400x400px]] All textures that are not the maps that you want to load into Urho3D should be disabled. Every map should be set to its desired purpose in the influence area: set the diffuse map to Color 1.0 (and nothing else), the normal map to Normal 1.0 (and nothing else, like in the screenshot), and other maps like specular as well. '''Important for normal map:''' in the "Image Sampling" area you need to enable "Normal Map" with "Tangent" (like in the screenshot), or Blender will display the normal map weirdly. When done everything correctly, you should be able to see your fully textured model in the Blender view when being in object mode and material view (like in the screenshot on the left side). See [[Blender to Urho3D Guide]] for a tutorial on how to export to Urho3D. The model in Urho3D: [[File:Urho well.jpg|left|thumb|395x395px]] [[File:Urho well2.jpg|centre|thumb|400x400px]] Left: after first loading the well into Urho3D. Right: after adjusting parameters in the material file, repositioning and rescaling the model and rotating the sunlight. . === Using a High-Res Model to Create Normal Maps or other Textures on a Low-Res Model === I'm using the Blender monkey model called Suzanne as an example:[[File:Model bake low.jpg|centre|thumb|500x500px]] The normal low-poly model without any (active) texture and 507 vertices. I made a copy, applied a subdivision surface modifier (with three subdivisions) and drew some lines with the sculpt tool to create a high-poly model out of it (with 126,290 vertices): [[File:Model bake high.jpg|centre|thumb|500x500px]] The Blender bake area is capable of using one model to create textures for another model. It can be used to create a normal map out of a high-poly version for a low-poly version of the same model: [[File:Model bakeing.jpg|centre|thumb|500x500px]] You need to select both models (use shift) so that the low-poly model is the active one. This is display by the white text in the outline window (top right in the screenshot above). The selection is displayed by the filled circle behind the type icon (that thing between the + and the model name). Before baking, you need to create an UV-Map (I used "Smart UV Project" here), a texture and the texture needs to be saved (and also loaded into Blender I think, I loaded it as a texture in the texture tab and it worked). The checkbox "Selected to Active" in the bake area needs to be also checked to activate the model to model mode. The baking should produce a normal like the one seen in the screenshot. The models should be at the same position. After saving, reloading, applying and configuring the normal map, my low-poly monkey head looked like this: [[File:Model bake low result.jpg|centre|thumb|500x500px]] Yes these are still just 507 vertices! This technique is often used to make a low-poly model look much more detailed. This can also be used to create (seemless) textures by making a 3D-Model (like a brick wall) and baking it to a plane (texture in the sense of being more generic and not so bound to a specific model as the monkey above). Found a video that shows this as well: https://www.youtube.com/watch?v=8aS1P_29abs . [Anyone having ideas for more useful techniques?]
Summary:
Please note that all contributions to the Urho3D Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab