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 368 - 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



Silgrad Tower from the Ashes
Lofting, and it's efficiency in collision modelling - 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: Lofting, and it's efficiency in collision modelling (/Thread-Lofting-and-it-s-efficiency-in-collision-modelling)



Lofting, and it's efficiency in collision modelling - Razorwing - 01-19-2007

-=Download Max Scenes=- for this tutorial.

It's a 7-zip archive. 7-zip is a freeware zip program which can be downloaded from 7-zip.org. It can achieve superior compression compared to any other zip program out there.

What you need for this tutorial:
- 3D Studio Max v8.0
- NifSkope (optional)

I don't know who first discovered that lofting produced more efficient collision models. I read a comment about it on ESF, something along the lines of that "someone had gotten it to work and it was better". So I tried it out, it worked like a charm, and so I thought I'd write a tutorial. But I want to make clear that I was not the one who discovered it.

I'm not an expert, and I'm not saying that this method is the best possible way to go about this - only that it works.

WHAT IS LOFTING?
Lofting is a way of modelling based on splines. Usually you would model with modifying primitives, or create splines that are quickly converted to editable meshes, or whichever way you prefer. But by lofting a spline you're creating a threedimensional object that'll never be an editable mesh.

WHY SHOULD I LEARN TO USE IT?
Lofting splines produces more efficient collision models. In other words you can improve the performance of your models in-game, or get collision molded closer to your model without sacrificing any.

WHY IS IT MORE EFFICIENT?
Hmm. Hmmmmm... *cough*. I don't have the faintest idea Big Grin It's a fact that can be proven though, which I'll show at the end of the tutorial.

[Image: th_TutCollisionLoft_TutorialScene01.jpg]

1.

Open TutorialScene01.max, which looks like the image above. There are two objects in the scene;

* CollisionBoxModel is, despite its name, the threedimensional object since I was creating my own collision box object during this job.
* CollisionLine is a spline I created that will form the base for the collision.

As you see, I drew the spline so that it would match the silhouette of the threedimensional object. Before I discovered lofting, I would have converted it to an editable mesh, extruded the polygon, then added a Cap Holes modifier, then just to be sure I would have added an Optimize modifier just to be sure there were no redundant faces.

What you should do now is create a new Spline consisting of only two vertices. Place the first vertice at X0 Y0 Z0 and the second vertice at X0 Y55,8 Z0 so that you end up with a simple line. This line will be used for what is called a "path". It will tell CollisionLine how it should extend.

[Image: th_TutCollisionLoft_TutorialScene02.jpg]

2.

Open TutorialScene02.max, which looks like the image above. As you see I've created the line mentioned in the previous paragraph.

Select CollisionLine. Now go to the Create panel, select Compound Objects in the drop-down list, and click the Loft button.

In the Loft rollout, find the Skin Parameters and expand it. Set the Shape Steps to 1 and Path Steps to 0. (Image #1)

Now, under Creation Method, click the button Get Path. With the button depressed, click on the LineForLoft, and it should look like Image #2.

As you see, the Loft model extruded the wrong way. I'm not sure why it does that, but it can be fixed very easily. Select LineForLoft, which through the lofting process has now been connected to CollisionLine. In the Line modifier, select Vertex, then select the far vertex. (Image #3) Just for fun, try to drag it around a bit and you'll see some interesting things happening with CollisionLine. Big Grin When you're done, set the coordinates of that vertex to X0 Y-55,8 Z0. Presto, it's flipped to where it should be for this model. (Image #4)

Delete LineForLoft and CollisionLine from the scene, you won't need them anymore. If you've been working on your own model in this tutorial you should keep a copy of them for backup purposes, it may come in handy. They should not be exported with the model though.

Like you would normally do, select the collision model, go to the Utilities panel, click on the NifProps button, tick "Is Collision Mesh" and set the appropriate material and layer settings. Since my model is an invisible speedbump to facilitate movement, I went with Metal and Transparant. You'd think it would be Ground, but if I had used that layer the player would have seen the yellow frame. (Image #5)

[Image: th_TutCollisionLoft_TutorialScene03.jpg]

3.

If you haven't completed step 2, or if you want to doublecheck if my description of step 2 made sense, open TutorialScene03.max which looks like the image above.

All that's left now is to export the model like you would usually do. But what I would suggest is that you check out the two nifs I included in the Experiments folder in NifSkope. Select the NiTriStripsData block, then scroll down the Block Details window until you find the value Num Triangles. This value equals the collision model's facecount. In the case of the lofted collision there are 64 triangles, while the usual collision resulted in 96. The more complex your collision, the more noticeable the optimization effect is.

Here's what the triangle info looks like:

[Image: th_TutCollisionLoft_ColBox02-LoftedC.jpg] [Image: th_TutCollisionLoft_ColBox02-UsualC.jpg]


- Zarf - 02-02-2007

*applause*

Efficient collision meshes are a must. They are controlled entirely by the CPU, which, no matter how powerful it is, just isn't cut out for rendering invisible meshes. During one of the earlier releases of RP (0.6, methinks), there were serious FPS issues right inside RP, because so many models had just a copy of their mesh as a collision. So the CPU was trying to render one version of th world while feeding your graphics card... a total mess. Newer collision meshes for those models has yielded somewhere around a 40% increase in FPS. Turning off collision, which stopped the collision mesh math from taking place, yielded the same result.

Those of you who think you don't have to worry about collision, please reconsider. It's way more important than you might think!