The following warnings occurred:
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 100 errorHandler->error
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined variable $location - Line: 1250 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 1250 errorHandler->error
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 34 - File: global.php(956) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(956) : eval()'d code 34 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $messagestyle - Line: 45 - File: global.php(959) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(959) : eval()'d code 45 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $boardmessage - Line: 45 - File: global.php(959) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(959) : eval()'d code 45 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5342 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5342 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$bottomlinks_returncontent - Line: 7 - File: global.php(1059) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(1059) : eval()'d code 7 errorHandler->error
/global.php 1059 eval
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 606 - File: inc/plugins/simpleckeditor.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/simpleckeditor.php 606 errorHandler->error
/inc/plugins/simpleckeditor.php 517 simpleckeditor_is_allowed
/inc/class_plugins.php 142 setCKeditor
/global.php 1253 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 606 - File: inc/plugins/simpleckeditor.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/simpleckeditor.php 606 errorHandler->error
/inc/plugins/simpleckeditor.php 233 simpleckeditor_is_allowed
/inc/plugins/simpleckeditor.php 521 simpleckeditor
/inc/class_plugins.php 142 setCKeditor
/global.php 1253 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 67 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 42 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 218 makeprintablenav
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 43 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 6219 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 218 makeprintablenav
/printthread.php 218 makeprintablenav
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 4 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 6251 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 6251 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 6136 google_seo_url_profile
/inc/functions.php 6204 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 6136 google_seo_url_profile
/inc/functions.php 6204 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 10 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 6136 google_seo_url_profile
/inc/functions.php 6204 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Silgrad Tower from the Ashes
Faking shadow detail in 3DS and Photoshop - Printable Version

+- Silgrad Tower from the Ashes (https://www.silgradmodding.net/forum)
+-- Forum: Discussions for Silgrad Tower TES IV (Oblivion) & TES III (Morrowind) (https://www.silgradmodding.net/forum/Forum-Discussions-for-Silgrad-Tower-TES-IV-Oblivion-TES-III-Morrowind)
+--- Forum: FAQ Board TESIV. (https://www.silgradmodding.net/forum/Forum-FAQ-Board-TESIV)
+---- Forum: Tutorials (https://www.silgradmodding.net/forum/Forum-Tutorials)
+---- Thread: Faking shadow detail in 3DS and Photoshop (/Thread-Faking-shadow-detail-in-3DS-and-Photoshop)



Faking shadow detail in 3DS and Photoshop - Zarf - 06-05-2006

As I will be gone most of the summer, and since I've decided that not doing this is just greedy of myself, I've decided to write a tutorial on how to fake shadow details in 3D Studio Max for models in Oblivion.

The way models are handled in Oblivion is simple. Faces that are pointing toward the sun are brighter, while faces that are not are darker.

[Image: th_shading.jpg]

As you can see in the above image, the faces that are pointing at the light are brighter than the faces pointing away. These are not shadows. This is called shading, and the following image shows what a scene without shading looks like.

[Image: th_shadeless.jpg]

Yikes. That looks like a cartoon, doesn't it? The following images shows shadows. The planes are all casting them. However, Oblivion's engine does not support models casting shadows. At least, not very good ones.

[Image: th_shadows.jpg]

Here's a simulated example of what Oblivion's lighting system would do to a typical Redoran Hut. Of course, this is highly exaggerated, to get the point across.

[Image: th_ohnoes.jpg]

So how do we fix this problem?

Here's a better idea of what it would look like with Oblivion's lighting system. Don't get met wrong: Oblivion's lighting system is fantastic. It doesn't cast ideal shadows, which would take up far too much processing power.

[Image: th_betteridea.jpg]

We must fake the shadows we want. This will be our end result once we fake the shadows. As you can see, it looks like the outer ridges of the hut look like they are casting shadows on the inside of the hut, which is exactly what we want. This tutorial will show you how to create those shadows, how to fake them, and how to implement them.

[Image: th_coolshadows.jpg]

In order to fake shadows, we must take shadow information and flatten them out into a texture map. This is an easy step. First, go to the "Create" panel. It's highlighted in this screenshot:

[Image: th_skylight01.jpg]

Now, move to the Lights panel, and select Skylight, as highlighted in Step 2 of the below image. Place your skylight anywhere in the scene, and go to the modify panel (The panel with the arrow pointing to it in Step 3).

[Image: th_skylight02.jpg]

Your scene should look a little like this.
[Image: th_skylight03.jpg]

If you were to render it out, you would see those nice, soft shadows. Skylights are great for this. However, there is one major drawback: It takes FOREVER to render! No wonder they didn't implement this in Oblivion.

Now then. Let's set up a model to fake textures on, shall we?

This is just a test model. It was created in three different parts, and will use two different texture maps. This is not a UVW tutorial, so we won't get in to that. Let's assume you already have your model UVW mapped, and maybe even textured.

[Image: th_divided.jpg]

Apply a white material to the entire model. The easiest way to do this is to select the entire model, hit the "M" key on your keyboard (This opens up the material editor), make a white material, and hit the "Assign material to selection" box.

[Image: th_showmehow.jpg]

Now, select one part of your model. Hit the "0" (Hit 0, not O) key. This opens up the "Render to texture" dialog.

[Image: th_theentirething.jpg]

The above picture shows you what to change. Select "Use Existing Channel" so the renderer will divide the model depending on your UVW coordinates. Then, click the circled "Add" button, which brings up the dialog that has the lower arrow pointing to it. Click "ShadowsMap", then the "Add Elements" button. Then, press "2048" to get a huge texture size. If the map you are using is only 512.512, you should hit the 512 button. If 1024x10124, hit the 1024 button, and so on.

Here's where Photoshop comes in. You might be able to do this with Paint Shop Pro, but I don't know how to use that program. No tutorial for you!!

Save the resulting image to your desktop or somewhere. Open it in Photoshop, and it should look something like this. Maybe without the black background.

[Image: th_shadowmap.jpg]

Congratulations! The hard part is behind you! All that is left is to get the texture for the building you were using before you realized there were no shadows on the model. This is the texture I was using:

[Image: th_redoran-base.jpg]

Now, take your shadow detail map, and put it on top of the base texture.

[Image: th_redbasewithshadow.jpg]

You should now have two layers: the base texture and the shadow texture. Here's where the magic really happens:

[Image: th_layers01.jpg] [Image: th_layers02.jpg]

Get it? I made the shadow texture layer "multiply" instead or "normal". This is what you get.

[Image: th_almostdone.jpg]

Check it out in 3DS Max. Are the shadows apparent enough? Need to add detail? Use the Burn and Dodge tools in Photoshop to add details. This is the unedited image in 3DS Max. There is a skylight, but it's not casting shadows. That evens out the lighting. The only shadows present are our textured shadows.

[Image: th_prettygood.jpg]

There's room for improvement. Say we want our shadows to be darker. This is easy, as long as you still have it open in Photoshop.

Select the shadow detail layer, and go to Image->Adjust->Brightness and Contrast. Here, you can change how bright or dark a layer is. Make it darker and put the contrast up to about 30. Save that map, and apply it in 3DS Max.

[Image: th_wow.jpg]

The shadows are now much more apparent, and even. Continue this process for the other portions of your model, and enjoy a professional-looking fully shadowed model ingame!


- Razorwing - 06-05-2006

Cool, thanks for writing it Zarf!
I'd love to mention your tut in a news item on the front page. As I'm not familiar with the subject matter, could I trouble you to give me a nice 1-2 senctence "soundbyte" to sum up your excellent tut? TIA! Big Grin


- Zarf - 06-05-2006

I'll give it a try. :-D

Quote:Do your custom meshes look like they are being lit from all sides? This tutorial shows you how to get rid of that problem, and even how to add details to your model with no performance hit!



- Razorwing - 06-05-2006

Quote:Originally posted by Zarf
I'll give it a try. :-D

Quote:Do your custom meshes look like they are being lit from all sides? This tutorial shows you how to get rid of that problem, and even how to add details to your model with no performance hit!

Perfect, I've posted it! :check: