Not signed in (Sign In)

Discussion Tag Cloud

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorC-A_99
    • CommentTimeJan 2nd 2014 edited
     
    This has always been somewhat of a problem for us; even those who have worked with Sketchup to NL for some time still don't produce optimized and clean models, and I'd like a thread where we can help others with that.

    With the approaching release of NL2, it is even more important that we keep our projects optimized so that we can make larger and more detailed creations without slowing things down. NL2 has reached new levels of sophistication, but all of the new tools require some know-how, dedication, and time in order to take advantage of. In fact, the differences between NL2 and fully fledged video game SDK tools (say, UDK or CryEngine 3 SDK) are far smaller than in NL1; we have more advanced terrain features, LOD objects, scripting, etc., giving the best designers a chance to build some amazing scenes. The screenshots we've seen so far are nothing compared to what's going to be possible.

    I'm going to try to break this up into a few categories:

    1. Object Meshes

    2. Textures/Maps

    3. Object Placement/Scene Arrangement


    Going to throw a few bits in here to get this started, by listing the most common mistakes and doing my best to find resources on how to correct them. Ideally, any contribution to this is welcome and I will integrate important info into the OP (here). It should not have to be explained that everything here is for the purpose of squeezing every last bit of performance out of the scene. Individually, an optimization on its own does very little, but combined, they mean the difference between ugly and pretty, slideshow and smooth framerates.

    Update: I'll also need your help as well. The thread currently assumes some knowledge of 3D modeling. For those who are unfamiliar with terminology and concepts in this thread, I ask for a Google search first, which should explain and depict some of the concepts. If it's still unclear, I'll edit into the OP's. I apologize for making rather halfassed explanations that limits this thread's usefulness to novices, but I'm trying to do what I can with the time I have. 3D modeling (even just the stuff that pertains to NL/NL2) is extremely difficult to encompass into a few posts of information. Essentially, what I also need is feedback. If something in this thread confuses you and can't be answered from a Google search or from basic 3D modeling knowledge, please post/ask so I can clarify it.

    Update: Trying to expand on things and running into the character limit. Pardon the dust in the meantime.

    *(Character limit, see next posts.)
    • CommentAuthorC-A_99
    • CommentTimeJan 2nd 2014 edited
     
    :: 1. Object Meshes ::

    The most common mistakes I see are:
    - Polygons that should be removed, but aren't.
    - Polygons that should be connected, but aren't.
    - Excessive use of polygons for curvature detail, lack of or improper smooth shading.
    - Double-sided polygons that should be single-sided.

    Good meshes require good understanding of how polygons work and how things are drawn. Here are some must-read's for those modeling in Sketchup:

    Image intensive thread on CryDev that looks to be extremely helpful for those unfamiliar with modeling principles and the quirks of Sketchup.
    Resources for Sketchup.
    Tutorial Links for Sketchup

    The way you model geometry will also have some effect on how lighting and shadows appear, although with modern shaders, this is becoming less and less of an issue. The larger concern is optimization and reusability.
    • CommentAuthorBye Tom
    • CommentTimeJan 2nd 2014
     
    Great initiative! Particularly the stuff about textures cleared some stuff up for me! :)
    • CommentAuthorC-A_99
    • CommentTimeJan 2nd 2014 edited
     
    :: 2. Textures/Maps ::

    Texturing isn't as difficult as it may seem. (No pun intended.) The most important tool here is arguably the Clone Stamp Tool, along with the Offset filter in Photoshop. These two tools will enable most of your work in making textures that tile well. Tiling textures is more than just removing seams; you also need to remove features that make the tiling obvious as well as coloring issues. For color, you'll want to experiment with tools such as the High Pass filter, or try out feathered selections and adjusting the hue/saturation.

    Non-tiling or limited tiling textures are worked with a bit differently. Keep in mind some objects should only need to tile in a single direction, such as with roads.

    Normal and specular maps are another story. There are techniques to create good normal and specular maps, but so far I've stuck to normal map generators such as CrazyBump or XNormal. (I have not yet gone through the process of reducing a high poly model to a low poly normal mapped model.) These maps are not supported in NL1 but will be in NL2, and are crucial to making quality textures/materials. Normal mapping is shown here.

    Alpha masking and blending are explained on the NL developer site. This technique is just as important in NL2 as it is in NL1. You will need to work with Photoshop (and/or Fireworks) to create these textures. GIMP is a good free alternative, of course, and if you're on Windows, I've heard good things about Paint.NET.

    Reminder: All images are made up of 3 or 4 channels: RGB or RGBA. Each channel contains a set of pixels according to your image's dimensions (i.e. 512x512), and these channels might have further uses than they were originally intended for. For example, in UDK, you can use the alpha channel as a specular map, since specular maps only require one channel worth of image data. The way NL2 will handle these features remains unclear.
    • CommentAuthorC-A_99
    • CommentTimeJan 2nd 2014
     
    :: 3. Object Placement/Scene Arrangement ::

    - Far away objects should be low detail. Detail should always be matched to how likely the viewer will be able to see it. A common example is using simple, low detail trees in the background, and higher detail trees in the foreground. NL2 will feature both new 3D trees as well as the old 2D trees from later NL1.x.

    - Object Instancing: NL1 does not support object instancing, thus, each object should ideally be copied in the editor. Problem is, NL1's editor does not provide any tools for bulk placement, rotation, and scaling of objects, and it doesn't support instanced meshes in .3ds files. Ideally, NL2 should support instances within a mesh, which would make things a LOT easier.

    - Large Object Break-Up: Large objects such as buildings should be broken up. If just part of an object is within view, the entire object is drawn, so break things up as necessary. The end result is a lot of intersecting polygons, such as with rocks (or small groups of rocks) around a water fall. A lot of polys you can't see will be drawn, but the huge amount of memory saved is far more important here. If you do need to clump objects together, make sure they have variety. Be discreet; do not make every individual brick its own object on a brick wall, but at the same time, do not make a ridiculously long brick wall that wraps around your entire track; such a wall should be broken up into pieces. (With similar wall segments reused where possible.)

    - The Whole Scene: Very large objects that make up huge chunks of the scene should never be used for performance reasons. In the past, I have not regarded this due to ignorance and due to the convenience of copy and pasting in a 3D modeler. NL2 should solve that problem. I will make room for one exception: Background detail objects. Still, it's good to break them up where possible, but by their very nature, they are low detail enough to be rendered all at once.

    - Materials and Textures: Especially for NL2, you will want to reduce the memory footprint on your materials. Reuse textures where possible. Using a single texture for a single object (say, a lamp post) saves memory over using multiple textures for the same object. You don't need to get ridiculous with this, but this is something you should be very mindful of, and if you understand the principles behind the environment demonstrated at that link, you'll be successful. Use normal and specular maps, combined with clever UV mapping to simulate different materials on one object.

    - Each material per object requires a draw call, and DirectX imposes a performance penalty per draw call. Keep the number of draw calls to a minimum. Someone more technically adept with the subject can explain better than I can, but essentially, what you want to do is limit the material breakup of objects where practical.

    - Occluders: New feature for NL2, IIRC from the NL2 thread, occluders are simply a material setting in NL2, although it may also allow invisible occluder blocks too, hopefully. Large objects should be set as occluders, such as buildings. Occluders ensure any object behind itself is not drawn, but this is costly to calculate for every object in the scene, which is why it's only done to specifically marked objects.

    _________

    Anyway, consider this thread a WIP, although the character limit is slowing things down a bit.
    •  
      CommentAuthorride_op
    • CommentTimeJan 3rd 2014
     
    Thank you very much for putting this topic together! NoLimits 2 can do many amazing things but it can't make up for poor optimization. The designer has to take this into account when making 3D objects and scenery. We have many tricks and best practices enabled to provide maximum control over optimized frame rates to the designer. It's up to him or her to employ these techniques to keep the scene running smoothly! This thread will help explain the basics and advanced techniques that are vital to a smooth running park.

    Thanks!

    -Ride_Op
    • CommentAuthorMGrides
    • CommentTimeJan 5th 2014
     
    Wow! Really good! Now we can learn how to do it right. Thank you very much for your effort and time! This is great!
    • CommentAuthorC-A_99
    • CommentTimeJan 12th 2014 edited
     
    Super important question to any NL2 developer who can answer it: Are SCO objects handled by their entirety when it comes to occluders, or does the engine internally break up each mesh and occlude them separately?

    I'll actually be testing this myself (I noticed you can peek through an occluder face and see the objects behind it being clipped out), but an official answer is always best.

    When it comes to NL2, optimization of your projects is even more crucial. While I don't know what's going on behind the engine and why a better video card is not noticeably outperforming a poorer laptop one, the one thing that's clear is that scene optimization is going to be super-important. At the same time, it's nice to be able to export a whole chunk of stuff at a time and get it in NL2 all at once. Unfortunately, I suspect this won't be feasible.

    (My current project right now is NL2-izing Grand Prix Round 2: Sickspeed Stadium, which will serve as a good testing ground for learning how to script/animate objects, setup lighting, figure out how to lock the environment to nighttime, etc. and I think the final result will be a lot of fun to experience in NL2.)

    Edit: Also need to know if there's some possible way to get scale vectors of 3ds objects in NL1. Positional and rotational vectors are less important but would be nice. This would be a huge help for those projects that were done with completely incorrect scaling, yet are extremely sensitive to accurate scaling (namely the precise values used in NL1), thanks!

    Edit: NL2 supports instances in .3ds files now, yay!
    •  
      CommentAuthorPhyter
    • CommentTimeJan 17th 2014 edited
     
    Sorry for the delay, C-A. Didn't see this question right away (actually I'm 5 days late). I assume you've probably gotten your answers by now but for anyone else that might read this, here you go.

    > Are SCO objects handled by their entirety when it comes to occluders, or does the engine internally break up each mesh and occlude them separately?

    Occluders operate on individual meshes within the 3D model file. The engine doesn't break anything apart because the meshes are already separate. But, no, it doesn't act on the 3D model file as a whole, which is what I think you were asking.

    Occluders are a material property. Any surface can become an occluder. Simply assign a material with a known name to a surface on the model using whatever 3D modeling software you're using. Then create an .nl2mat file with the 'occluder' property enabled. Assigning the .nl2mat file to the named material in the .nl2sco editor will allow that surface on that object to function as an object occluder.

    An object can have as many occluders as it has named materials/textures. It is extremely important to use occluders sparingly and in the right context. The occluder algorithm is computationally taxing and can result in a slow down if used indiscriminately. The more occluder surfaces you have the more likely you are to have no net effect. The world's best occluder object is a single-sided rectangular polygon. The best place to use occluders is when you can hide many ultra-high polygon models with a single simple occluder surface. Boxes make excellent occluder shapes as well if for instance occluding a complex exterior scene from rendering while inside a building. It would not make a lot of sense to turn the walls of an interior scene into occluders, however. You'll just need to experiment with this and find the best balance. Fortunately it's to apply the property to .nl2sco objects and see what works and what doesn't.

    > Also need to know if there's some possible way to get scale vectors of 3ds objects in NL1

    Unfortunately there is not. Even if we corrected the scale for the .3DS file, that new scale information would still disappear when you created the .nl2sco wrapper for it. So it wouldn't have made much sense for us to do that. Your best route will be to import your old NL1 assets into 3D Studio Max, Blender, or whatever software you are using, scale them correctly to the appropriate imperial or metric scale, and then export them again. They will then be ready for NL2 which interprets objects scale correctly.

    > Edit: NL2 supports instances in .3ds files now, yay!

    Woot! Control is even better with .nl2sco files. Now one change in the editor affects all of the instances of that object. And with so many properties, this can be an extremely powerful feature. Be sure to make good use of it.
    • CommentAuthorC-A_99
    • CommentTimeJan 18th 2014
     
    Thanks for replying. Over the course of those days, I managed to finally actually test some things which helped me answer some of those.

    After noticing that the instances are supported, I figured that would imply that occluders de-render them on a per-mesh basis. It's good to have this confirmed however, as I haven't actually tested occluders yet. However, I still need to run through the material editor; I've only had a brief look at it, but I did see the occluder option.

    I also developed my own technique for getting the approximate scale of the object when moving it to NL2. First, this is going to be a pain if you have many, many objects that need to be rescaled to NL2, to the point that you might as well just redo things at the right scale. But if it's just one or two objects, it's a reasonable solution. Say, for example, you have all objects in a single 3ds file packed into an NL1 scene. Worst practice possible, but let's say it was done that way.

    - Go to original 3D object used, set your units accordingly (1 unit = 1 meter), create a box of any dimensions. Make sure this box will fit in the NL editor, keep it positioned at (0, 0, 0), and preferably at something where you'll remember the dimensions of. We'll call it Box 1.
    - Export again, so that this box is in the NL editor.
    - Build box out of supports, line them up as close as possible to the 3D box. Use small wooden beams.
    - Run a CK export of the scene.
    - Open exported scene in 3D modeler. Again, make sure units are set properly at 1 unit = 1 meter.
    - Edit the support box. You want to create a new box that's lined up to the center of the support box. What I did was boolean all 3D beams together so I could snap to their centers, then created a new box and snapped its corners to the center of the support box corners. We'll call this Box 2.
    - Add the original 3D object to the CK exported scene, including the box you put in. Set the pivot point of this object so that its pivot is located at one of the corners of Box 1. Position this object so that the pivot/corner of it is in the exact same spot as Box 2. Scale it up or down until the Box 1 is as close as possible to Box 2.

    This gets you very close. It was accurate enough for me to rescale the track on Grand Prix Round 2: SickSpeed Stadium in order to match the track in NL2.

    Even if we corrected the scale for the .3DS file, that new scale information would still disappear when you created the .nl2sco wrapper for it. So it wouldn't have made much sense for us to do that.


    Although it was probably better to make measurements on the boxes and generated some numbers out of that (which would probably allow skipping some steps of the convoluted technique I came up with), direct vector information would've been quicker for rescaling the objects in the 3D modeler to their correct sizes. That's specifically why I asked for it; If you know how its scaled in NL1, you can make the proper corrections in the 3D modeling software.

    Anyway, at least now, the NL2 scale information gets retained and the user can see it and utilize it as necessary for their work.

    So in the end, we don't have a perfect solution, but this is very close, and it's only ever a problem for legacy tracks. Thanks again.
    • CommentAuthornannerdw
    • CommentTimeJan 19th 2014 edited
     
    I noticed an option in the Advanced tab of the NL2SCO editor called "Force 3ds Face Smoothing" for objects imported from Blender.

    I tried this option on a a model of a cube with a smooth cylindrical hole through its center, but the only way I could get proper smoothing was to duplicate all of the vertices where I wanted sharp edges. Otherwise, the smoothing was applied to all of the edges. Is there some way to avoid having to do this?

    I've got a student version of 3ds Max I could use, but I haven't learned its interface yet. It would be great if I could keep making my models entirely in Blender, since I've already put so much free time into learning it (specifically in preparation for Nolimits 2 ;) )
    •  
      CommentAuthorPhyter
    • CommentTimeJan 19th 2014 edited
     
    In Blender I believe you need to use the "Edge Split" modifier. Unlike Max, Blender does not export smoothing groups, so the entire model is either smoothed or faceted. Combining facets on a smoothed model therefor must be done by defining seams on the mesh.
    • CommentAuthorC-A_99
    • CommentTimeJan 19th 2014 edited
     
    nannerdw, I've been contemplating making a switch to Blender myself, so I'm not saddled by proprietary licensing restrictions with my own work. How's Blender exporting for NL in general? Are there problems with texture mapping / vertex split-ups when exporting to .3ds? The format is very limited and 3DS Max itself has to split vertices in order to maintain some texture mappings (thus breaking smooth shading), but I want to know that Blender handles it about the same. I still have not made much progress at all to learning Blender's UI, which I find to be quite awkward based on everything else I've used.

    Edit: Somehow, the links in the original posts got stripped out and I never noticed. If this (or any other problem) happens again, I'm going to have to move this guide to somewhere else (although I have no idea where lol perhaps as an html, doc, or pdf link or whatever), as I'm getting sick of these character limits and other sorts of problems.
    •  
      CommentAuthorPhyter
    • CommentTimeJan 19th 2014 edited
     
    The issue is a limitation within the .3DS file format itself.
  1.  
    Posted By: C-A_99nannerdw, I've been contemplating making a switch to Blender myself, so I'm not saddled by proprietary licensing restrictions with my own work.


    Blender is great as far as meshes go. Shading groups don't work, but Haven't been an issue I can't work around. UV maps work well, though for some reason filenames are being altered, so I'd stick to assigning textures using the NL2 object editor.
    • CommentAuthorC-A_99
    • CommentTimeJan 20th 2014
     
    @Phyter: I've seen a mix of issues in 3ds exporting, at least back when I used Object Creator and Amin8or. Anim8or broke smooth groups differently (and incorrectly) compared to Max, although other issues (particularly the lack of .png support and other features I started to need) drove me out and to 3DS Max. Anyway, there's a mix of issues in the 3ds format itself, as well as in the ways various programs import or export them.

    I don't use smooth groups as much as I simply use the smooth modifier, but this seems to cause optimization problems, since ideally, you want everything in a smooth group, and with as few groups as possible, or so it goes for one of the game SDK's I've looked at and read the docs for.
    • CommentAuthorLikiNilsson
    • CommentTimeJan 21st 2014 edited
     
    Anyone know why my textures aren't showing in NL2? Modeled and textured with Blender. The texture is in the right folder.





    EDIT: Got it to work. I UV mapped the model to the texture and then saved the texture as a new file to the parks folder. Than I assigned the material to it with the NL2MAT editor.
    • CommentAuthorJaynen
    • CommentTimeJan 24th 2014
     
    Maybe something to do with the maxium 8 letters for the file name. Also should it not say .jpg for the error message. Or at least some other format?
  2.  
    I sort of posted it in the wrong place last time, and I never got more than one response. This happens to my 3DS stuff seemingly when I approach catwalks with lights. Specular settings are shown, as that is what was claimed last time.