Home Technical Talk

Snapping the modo bend tool to UDK

polycounter lvl 6
Offline / Send Message
repete polycounter lvl 6
Allfromonesegment_zps0b36433f.jpg

Hello all

I started working on modular cave segments a few weeks ago and I could not for the like of me get my 90 degree bends to snap to UDKs grid. I searched and searched the internet void and found nothing on how to do this in modo.

I finally found a way how to do it :)

I have been using my own pie snapping menu that locks modos grid to UDK’s without any effort and the pie menu will assist you in keeping your bends locked to the UDK grid. This bending solution should work on the normal modo grid set to game units but I personally cannot work that way.

Here is the pie menu link: https://www.dropbox.com/s/6rml8uk2oaoejdm/ModoGameUnitSnapping.zip

modopiemenu_zpsbe855748.jpg

F1 activates the pie menu. The macros and cfg files are included !


Step 1
Make sure the dimensions tool is activated and subtract the value of the vertical side of the dimensions tool off the total length of the segment.

step1_zpsec5f6b87.jpg



Step 2
Input the value you get into x in the Action Center Auto 3D (this changes of course if you are bending forward or backward)

step2_zps537b36ab.jpg



Step 3
Adjust the snapped edge loop by pulling it to the right, down and back again to it's original position

Step3_zpsa04cfee1.jpg



Step 4
Now the segment is snapped to the UDK grid

Step4_zps7fa88ba0.jpg



360 270 180 can be achieved with one segment:

360_270_180_90_zps7c3e5999.jpg



Also works with uneven bends:

unevensegments_zpsceae8ada.jpg


selfexplanatory_zpsd4f8f1d5.jpg



and the result in UDK:

UDK_zps1ad6de6e.jpg



I hope this helps some of you Modo / UDK users on your modular ventures ;)

Good luck

Pete :)

Replies

  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    Good idea, but modo already changes the snap to grid value with respect to zoom levels. But it would be useful for an easy access via pie menus in some cases :) oh btw what's with these crazy measurements, like 204800 ??
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Err... I'm getting a sense of Deja Vu here. Did you not see my last reply to your other thread? Or are you just living up to your username? :poly124:

    http://www.polycount.com/forum/showthread.php?t=130480

    As igi says, and as I said in your previous thread, using fixed snapping is not necessary; you have mistakenly imported something from udk (possibly by having the incorrect unit under import settings—I believe meters is default which would explain this) which caused the default UDK cube to be sized up x100, from which you took 102400 as being a grid number instead of 1024. 25600 won't align with 102400. 256 and 1024 will. So change your settings and make things easier for yourself. Even if for some strange reason you must use fixed snapping there's no reason to use 102400.

    As for getting a perfectly matching bend there should be some way to do so without having to manually move the end to a gridpoint. What you could do is set the start and end points, then bridge edges with smooth on, like so:

    Fg4WYzX.png

    No need to mess around with numbers or ruin your perfect circle/bend by fiddling with the end edges to make it align to your grid.
  • JedTheKrampus
    Options
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    That's not a perfect circle though:

    Oo8U1Wd.png

    Whereas his method is.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Excellent point. You could start with a toroid primitive and get one though. That'd be even easier than connecting two edges. Then just remove unecessary geo for your 90/180/270 bend.
  • JedTheKrampus
    Options
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    Another advantage of his method is that you can use it on something more complex than a tube if you'd like. Fully greebled and all that. And it would still fit for modularity.
  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    Yes, fitting bent shapes into the grid has always been a problematic thing in 3d modeling tools. In max you'll need to final edit your end vertices to snap them into the grid. In modo you don't have access to world positions of your selected element, but thankfully there's a powerful grid system. I'd just fit the shape to be bent into a bounding box by eyeballing and fix the end edge by using 'snap to grid'.
    Still I don't get the purpose of using rather weird measurements :poly122:. It seems you're multiplying everything by 100 in modo, instead of doing this, you can easily change your meters per game units to 0.01 to get correct size in udk.
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    He we go again :poly124:

    I did exactly what you did Bek and I get this:


    Bekssettings_zpsfe4953fa.jpg


    so far so good right ?

    Then I exported using your grid settings and game units set to 0.01 and this is what I get in UDK:

    BekssettingsUDK_zpsca4ec533.jpg


    Then I compare my forced fixed grid to Beks grid and I get this:

    beksmodocubes_zpse6001e9c.jpg

    The large cube above is 256x256 the same as the UDK scene, the cubes 16x16 and 128x128 using modos grid need to be scaled.

    The bending calculation gives you a perfect circle as you can see in the pic below and I don't see how simple subtraction is hard work :poly122: nor do I see pulling an edge loop to the right and down as hassle, it gives perfect results.

    You seem to be hell bent on contradicting my findings Bek *shrug* and what about the people who use the force fixed grid and find it useful, we can't all be wrong can we ?

    perfectcircle_zps99fb70a3.jpg


    @igi

    I have my game units set to 0.01 and the grid I am using is force fixed and that is why there are 3 zeros after the power of 2 dimensions. This enables you to draw out power of 2 snapped units without thinking about scale or zooming in or out to get the proper scale.
  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    This is weird, I still fail to see necessity of using this method as a workaround. From what I understand here, the most direct solution gives you wrong results. I just tested this mesh and the scaling worked perfectly. (latest july 13' udk release)

    modo_scale_test_1.png

    This is the mesh I used: FBX
  • g0th
    Options
    Offline / Send Message
    g0th triangle
    Handy stuff!
    a tip worth to be said is to do the subtraction directly in the field that you enter the subtracted number (z-x)
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    repete wrote: »
    You seem to be hell bent on contradicting my findings Bek *shrug* and what about the people who use the force fixed grid and find it useful, we can't all be wrong can we ?
    I fear you are beginning to take this discussion personally; which is not my intention at all. I am firmly convinced that you have made a mistake in setting up your grid/export which I would like to sort out—especially if one of us happens to be spreading misinformation to other users. I'm sorry if it seems like I'm attacking you & your contributions.

    So, fixed grid. The only situation I can see it would be useful is when you have say a large selection and you don't want to do a lot of zooming to get the grid level you want (or conversely, you have a very small selection and don't want to zoom too far out). I've never really had this problem when working though, so I'm dubious as to fixed grids benefit. If you prefer to use it by all means, but understand that fixed grid is not the correct solution to your mesh scale differences inside udk.

    What you're doing is drawing out items that are 100x larger than the default grid (so 12800 instead of 128 ) and then exporting, when what igi and myself are doing is using 128 and exporting. For some reason your items imported into UDK are scaled to 1% it seems. What file format are you exporting as? All versions of FBX work for me. Importing the default udk cube back into modo matches the grid with my settings. The reason you were having problems with that in your previous thread was that you were measuring it by your x100 grid, not the grid it actually adhered to. Perhaps post your unit/workplane/fbx settings, although I don't see any fbx settings related to scale... you're not doing anything odd like exporting .obj, converting to .fbx then importing to udk are you? Or using any custom fbx exporter? igi's cube should work for you in UDK. If it does not, then something is wrong with your udk import settings. If it does, then something is wrong with your modo export settings.

    Basically; fix your scale problems at import/export rather than changing your whole grid system based on incorrect values. You'll be saving yourself time in the long run and making sure your scenes are compatible with all other users.
  • WarrenM
    Options
    Offline / Send Message
    I have the same results as igi and Bek ... Game Units with 0.01 scaling gives me a 1:1 mapping with Unreal.
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    No scale issues here :poly121:

    I know what the problem is. The FBX export script I use is scaling my fixed grid to UDK units.

    The reason I use the fixed grid is for modular work on a large scale:

    This pic is my actual height map exported out of UDK.
    modular_zps4e5765e6.jpg


    I could just build "kits" and build them into the terrain in UDK but I find this looks repetitive and not very organic. My way is to build modular parts that are unique to the terrain and designed as modular sectors so having the grid set in modo to forced fixed makes the process a lot easier. The parts are exported into mudbox and I do some simple sculpting, I freeze both ends of the modular segment in mudbox before I sculpt so they stay modular in modo / UDK. For this type of work at this scale my grid settings work like a charm in modo. Sectors are then exported to UDK and interlinked. The reason for the large numbers btw 102400 etc is simply to make the grid bigger so I don't have to think about or zoom to scale, try setting your grid to forced fixed at 1024 and you will see what I mean. Even at this grid size the FBX exporter works like a charm.

    This has left many of you perplexed but remember that not everyone works the same way as you.

    On that note I will leave you with my latest find:

    Perfectly snapped 45 degree segments using my bend technique:

    45_zpsad90e074.jpg

    So now I can get 45, 90, 135, 180, 225 etc with no texture stretching visible, zero seams and all modular :thumbup:

    Goodluck
    pete
  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    oh well, we could add more zeros next to it or contrarily we can divide them by 100. As long as it's human readable then it's fine. Even though I can't seem to get what's the matter to have a dynamic grid, still it's all up to you. Your bending technique can be applied for anyone using their meters per game unit conversion value as a decimals of 10 :):thumbup:
Sign In or Register to comment.