• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Lofty dreams of curvy things...

Started by SimFox, June 19, 2008, 09:33:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SimFox

Here is another re-print from Forces of Light and the Geometry of Shadows:


Creating curved shapes -say like roads on-rumps etc, is challenging enough; but texturing them properly so as to save the the sense of direction is even more so. Luckily there is a tool that will allow to do both with greatest of ease! It's called LOFT Here is a sort of introduction to it:

Loft, along with Boolean etc., belongs to the group of so called COMPOUND OBJECTS – those made of more then one "ingredients". In case of LOFT those are Path and Shape which will be extruded along it. Most wonderful thing about Loft is the fact that not only it creates geometry, but also maps it in a way that would be humanly impossible (or very lengthy and complex) to do otherwise. I hope people reading this are familiar with abbreviation UVW – texture map coordinates space. What loft does – it maps U along the spline or other path you've chosen and V across it.
Ok let's make us some Lofts.
Here are two ingredients – simple enough. I normally start with SHAPE, but there isn't really any reason for that . you can do you path first as well.
OK here is our SHAPE:


It represents cross-section of our future Loft-road. I guess there isn't any need to explain how it was made – sufficient to say that it is editable spline. This done, to the task of creating Path:


This is even simpler – just line with filleted corners.

I want to say couple of words here about the Curve. Curve is a mathematical concept. Unlike Vector Graphic packages Max represent it graphically through the finite number of straight sections. So the closer you get to it the more apparent it becomes that you're faking it, baby! This number can be selected prior to line/Circle, etc creation in Interpolation Roll-Out, or altered afterwards in Modify panel to suit your requirements. Default value is 6. One way to ALWAYS have smooth curve is to check the Adaptive option – that way the closer you get the more steps MAX will, on a fly; stick in – eternal bliss! But beware as it could make geometry "heavy" and doesn't work Post Factum – for instance Loft based on such a path will not update with zooming in.

But no worry, smoothness of your Loft can and should be modified internally. I'll return to this topic later. 
OK all we need is here lets LOFT.
To do so select your path and then chose Loft in Compound Objects of Create Panel:
This will bring you to this menu:


There are few items here I would like to you pay some attention.

Take a look at Creation Roll-Out. There are tree option as to the destiny of the ingredients of the Loft – Path and Shape. First – Move – both get consumed by the Loft creating and are no more. Second – Copy – both Shape and Path are preserved but not connection between them and future Loft. You can edit them and it will not affect Loft in any way. And third – Instance – as name suggests both are instances in Loft – giving you possibility to edit either of them and see Loft changing instantly before your eye! It's pure Magic! I guess there is no need to explain which method I would suggest to use!
OK, taken decision on the creation method choose get shape and select the Shape. Your cursor will change like this when you are over "allowed" object:


Done that, this is what you may see:


Doesn't look very smooth, does it? Let's fix it from within the loft. Select it if for some reason it got itself deselected and open Modify panel.  There open Skin Parameters Roll-Out. Here is what you should see:


I guess there is no need explaining Capping thing, so let's take a closer look at Option Group. Here you see Shape Steps and Path Steps. Both are crucial to the appearance of your Loft. Path Steps controls number of steps along the path and Shape Steps across it.

Remember how angular did our road look with just 5 Path Steps :


here is what it looks like with 22 Path Steps:


OK, now let's tackle the Mapping!
Create simple Checker material – ideal tool to check (pan intended) Mapping issues. To do so place Checker Map into Diffuse slot of the Material.


Apply it to the Loft. Remember to make it visible in the Viewport!

Here is what you might get:


Your actual look may differ depending on exactly where you model crosses it's way with this procedural map. Any way, this doesn't really matter as I'll explain now what you should do to get it look right.
In Modify Panel view of Loft open Surface Parameters. There are tons of interesting and important stuff there but for now we'll concentrate on Mapping Group. Here is what you'll (most probably unless you were tampering with it already) see.


Apply Mapping should be checked as this is, actually, what tells Max to do it wonders. I'll not go into Real-World Mapping – check MAX's manual for that, but let's take a look at Length Repeat and Width Repeat dialers. These control how many times Mapped UVW space will repeat itself along the length (U) and along the Width (V) of Loft. Here does magic start! Go and change those values! This is what it looks like with values as seen in the screen shot.


There is one more issue here though...

Take a look at this render of the loft with Length Repeat of 200 and width Repeat of 4,4

At first it may look fine. But look carefully – checker ignores the topology of the "central bump" it stretches across it as if there would be entirely flat surface despite the fact that light indicates otherwise.


To resolve this issue we should go back to Skin Parameters. I had 0 Shape Steps at the moment of that render. For something flat or only with clean linear corners it would be fine, but bump on our road is a curve. For UVW mapping to be able to cover it properly it needs some steps there. Increasing shape Steps to 5 solves problem:


Hope this will help everyone to avoid all so many mapping and texturing blunders and open new horizons in your creativity!