Search Unity

[RELEASED] Realtime CSG - level design for Unity

Discussion in 'Assets and Asset Store' started by LogicalError-Unity3D, Aug 24, 2016.

  1. CrazeDevelopment

    CrazeDevelopment

    Joined:
    Nov 26, 2010
    Posts:
    22
    YES, THIS YES. I would really really love to have this feature. It would make, for instance, a pit of lava a lot easier. I won't have to build a collider to manually fit my shape or hackily place collider planes all over the place to define where I might kill the player.

    Also do you have a discord for RealtimeCSG? I would love a simple place to just drop cool images in regards to CSG stuff. Happy to make RealtimeCSG a discord! Always good for a little community to have an area to chat and support itself. I made Bolts original discord, with much convincing of the author. It's pretty big now, I handed off all ownership to Ludiq. If you don't like discord, totally get it! Just an idea.
     
    Last edited: Jan 5, 2019
  2. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @tarahugger yeah I'd love to be able to debug unity line by line as well .. maybe some day ...
    the idea is that in the next version there will be a low level API that does all the good stuff and the editor UI basically works on that API. So anything you can do in the editor, you could, by definition, also do in the API

    And if you want to work straight on the API and forego the UI entirely because you just want to procedurally generate something, you'll be able to

    Brushes can only be convex, so you'd only be able to join shapes if they're both convex. This is for algorithmic complexity reasons.. convex shapes are just so much easier to deal with, it's not even a contest. I may add generators that internally have multiple brushes, yet pretend to be one shape though. So from the UI it could potentially look like it's a generic shape & that it's actually something more complex underneath would be hidden from the user. (at least it's something I've been thinking about, probably not a v1 thing because I already have so much to do for v1)

    I'm definitely not going to put all options in the in-scene generators for that very reason, it would be such a mess of handles that it would be more likely that you do the wrong thing than the right thing & visual clutter would drive you wild.
    There will be an optional thing where you can see the measurements of the generators so you can see lengths, heights, depths, angles etc. etc. in case you need to be super precise about what you're making. This should help when you want to make sure doorways are traversable, ceilings are at a reasonable height etc. etc.
     
  3. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @CrazeDevelopment The runtime part of realtime CSG will have some sort of API that allows you to raycast into the world to find surfaces and their additional data. This will be available even if you baked the model to a mesh at build time.

    I just created a Realtime CSG discord: https://discord.gg/Aq8meZF
    I didn't make any channels yet, and I'll be traveling the next couple of days, but it's there :)
     
    CrazeDevelopment likes this.
  4. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Yeah I tend not to use it other than having setup one custom one, I guess I just hadn't seen something like a script where you can setup two or more layouts and toggle/cycle them with a hotkey? I'm sure it exists just not seen in it or looked into it.

    "I'm considering the edge approach, but there might be some caveats, we'll see"
    It seemed like a good way in my head but implementation and problems with doing it that way is a totally different thing :)
     
  5. Quakeulf

    Quakeulf

    Joined:
    Mar 26, 2013
    Posts:
    40
    Ok, so no composite colliders?
     
  6. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Realtime CSG creates meshColliders if the csg model is 'static'. It doesn't create composite colliders for dynamic objects though .. which should be do-able with a bit of elbow grease though
     
    Mark_01 likes this.
  7. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    So over the last couple of weeks I've been busy with the new CSG algorithm I thought up. I got the start (cutting) and end (triangulation) of the algorithm working, now I need to put the stuff in middle that makes it a full CSG algorithm. No mesh optimizations/fix-ups needed!
    cutting_without_optimizing.gif
    ---------
    Join the Realtime CSG discord: https://discord.gg/Aq8meZF
     
    Last edited: Feb 4, 2019
  8. giotta

    giotta

    Joined:
    May 31, 2015
    Posts:
    48
    Sorry for my english, it's really bad.
    Can I ask you if you're implementing some kind of mesh modification in runtime?
    I have not yet figured out if you can do something like this with your asset:
     
  9. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @giotta There will be runtime support in realtime csg 2 yes. The final mesh is generated from a CSG tree structure, where you can define which shapes (brushes) are added and removed to create a final shape. It doesn't work directly on a mesh, it creates a mesh. So if you wanted to do something like this, you'd have to basically constantly add new brushes to the tree or modify the shape of existing brushes.

    Actually, looking at this video, you could probably do this using some sort of height-field, which would be a lot simpler
     
    Last edited: Feb 5, 2019
  10. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    I have an announcement to make!

    I've teamed up with the SabreCSG community to start building RadicalCSG, which will basically be a combination of the best parts of RealtimeCSG and SabreCSG, build from scratch using the lessons learned from what didn't work so well in both CSG tools to do better this time

    It'll be open source and it'll be free

    Note however that not a single line of code has been written yet!
    (although it'll most likely use parts of what I've already written for Realtime CSG 2.0)

    You can find the discord server for Radical CSG here: https://discord.gg/tqwmKrc

    Also, I will obviously keep supporting Realtime CSG. And there will be a way to import Realtime CSG and SabreCSG models into RadicalCSG
     
    Mauri, led_bet, atomicjoe and 5 others like this.
  11. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Very cool.. yeah I could see it being tough doing it as a one man job, tools like this need more people involved at different parts to move things forward, or more funding to go fulltime It is a shame Unity never took it on internally, CSG tools are great and one like this was really good, but lacks features to compete with outside 3d modelling tools, at which point it's just another exporting/importing process you'd have to do to get more refinements on geometry etc, when ideally you want to be able to do as much if not everything in one engine.

    So I look forward to the progress on RadicalCSG :D
     
    logicalerror likes this.
  12. giotta

    giotta

    Joined:
    May 31, 2015
    Posts:
    48

    Thank you for your answer.
    When you say that I should not modify a mesh but create it through a brush tree, do you mean this? (I try to attach an image to make it clearer) giotta.png



    The problem is that once you have overcome the 40 brushes, everything slows down.
    Do you think it is possible with the changes you are making for the runtime that this becomes possible?
    At present, however, it is not possible to do anything?
    Thanks again
     
  13. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @giotta the realtime csg algorithm works iteratively, so it only updates what changed. If you overlap brushes, all these overlapping brushes will be updated every time. So the performance will be determined by how many brushes you overlap on a particular spot you're working on.

    You could however, join brushes together (in your code), when moving in a straight line, to avoid issues like this
    You could also just have a sort of heightfield where you just change the height..
    If you really need CSG, you could make a heightfield out of small cubes, and change the heights of those (not sure how accurate this needs to be)
     
  14. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Just released version 1.545 on https://realtimecsg.com , you can download it from the updates page if you bought it
    I'll update the asset store version soon (it takes a while before unity updates it after it's submitted)

    It fixes the following bugs
    • Fixed Changing ray snapping behavior would not be undoable / would not auto save in prefab mode (issue #289)
    • Fixed that if top gameObject didn't contain a CSGBrush/CSGModel or CSGOperation, but a child contained a CSGBrush, drag & drop would fail (issue #288)
      keep in mind that in order for placement of brushes to work properly, it still needs a CSG component on the top most GameObject, but at least now it won't fail
    • Fixed that a child gameObject of a CSG element would be removed on play (issue #286)
    • Fixed that a generated MeshRenderer or MeshCollider could get left behind sometimes when rebuilding the model
    It also has the following improvements:
    • Added support for two sided shadows (request #290)
    • Added an option in preference window called "Snap Non-CSG Objects to the grid" that, when enabled, allows you to snap non CSG objects to the grid when in Place mode (issue #202)
     
  15. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Just released version 1.546 on https://realtimecsg.com , you can download it from the updates page if you bought it
    I'll update the asset store version soon (it takes a while before unity updates it after it's submitted)

    It fixes the following bugs
    • Drag & dropping a mesh in the scene will no longer place it under a model (issue #291)
    • Fixed mac build being a debug build (fixes crash on a debug assertion being triggered)
     
  16. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi!

    I just released version 1.547 on http://realtimecsg.com/updates/
    • Made it possible to change material when material is invalid (used to be disabled)
    • Removed some warnings in 2019.1
    • Fixed issue with invisible helper brush surfaces (the items in the bottom right menu) not rendering in scene
    • "Update lightmap UVs" button is now enabled even when no surface is selected in surface mode
    • "Update lightmap UVs" button no longer causes surface helper window to get cut off at bottom
    • "Stitch Seams" is now exposed in model (available from 2017.2 and up) and will automatically be set on MeshRenderers. Note that this option only works with the progressive light-mapper.
     
    julianr and dadude123 like this.
  17. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    And this version is now available from the asset store!
     
  18. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi!

    I just released version 1.548 on http://realtimecsg.com/updates/
    It exposes some Mesh Collider "cooking" options, in unity 2017.3 and beyond, which allows you to optimize the generated mesh colliders.
     
    tarahugger likes this.
  19. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi,

    I just released version 1.550 on http://realtimecsg.com/updates/
    • Fixed UnassignedReferenceException during build process when trying to optimize removed helper mesh (a mesh not used at runtime)
    • Added option, in CSG options panel, to set the default for "Lock Texture To Object" on surfaces.
    • Improved deciding on selecting an additive or subtractive operation when extruding in or out of another surface (issue #159)
     
  20. Leight

    Leight

    Joined:
    Feb 27, 2014
    Posts:
    8
    Hello, i wonder if this tool can be used in runtime / build to simmulate objects destruction?
    This is exactly that i would like to achieve:

    For instance, if i'll try to spawn multiple instances of "destruction prefab" which should cut through existing geometry (lets say walls) during gameplay will it work correctly or could i implement this using existing API?
    Can this process be distributed to multiple frames?

    Thank you.
     
    Last edited: May 29, 2019
  21. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi @Leight , sorry but Realtime CSG doesn't work at runtime :-/
     
  22. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi,

    Some new versions have been released on http://realtimecsg.com/updates/

    Version 1.551
    • Fixed texture copying working correctly when model is not centered at 0,0,0 / texture locking is turned off / scaling is negative along one axis
    • Fixed texture rotating working correctly when model is not centered at 0,0,0 / texture locking is turned off / scaling is negative along one axis
    Version 1.552
    • Fixed cylinder not working due to texture copying issue
    Version 1.553
    • Fixed edit modes correctly being initialized/deinitialized when turning realtime CSG on/off when you have a selection (thanks @Hunted / @Cough-E!)
    • Fixed surface texture translation would jump after creating a brush when "lock texture to object" is set to off by default. (thanks @Hunted!)
    • Fixed memory leak where EditModeManager scriptableobjects would get removed properly (thanks @Hunted!)
    Version 1.554
    • Fixed issue that in model inverted mode, it would add new (hidden) infinite brushes instead of reusing the previous one (thanks @Hunted)
    • Fixed issue where the last used model would still be used even when it's disabled (newly created brushes wouldn't be visible)
    • Fixed issue where rotation tool would not be visible in Place mode when no CSG objects are selected (thanks @gloomyghoul)
    • Fixed issue with planes not being removed which was due to floating point inaccuracies while normalizing normals (thanks @Hunted)
    • Position Handles now highlight when overing over the arrows, just like modern regular unity position handles (thanks @Hunted)
    Cheers!
     
  23. BigGreenPillow

    BigGreenPillow

    Joined:
    Dec 2, 2013
    Posts:
    26
    Is it possible to load a custom mesh or use a dynamic generated mesh in Unity as a target for the CSG operations?

    Everything I'm seeing seems to be for starting work from scratch but would this be possible? If it is does the custom mesh have any requirements for the operation to work like being convex or could I have a custom mesh that is not convex and apply operations using a cube or other primitive?
     
  24. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    It's possible to generate a mesh using CSG primitives from code, but not using a regular unity mesh as input though, sorry
    Brushes need to be convex yes
     
  25. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hey!

    If anyone's wondering, I recommend you ignore the demo and just purchase it. Lovely asset, now a part of our production.

    The original post contained feedback on the evaluation version and does not apply to the full version. I've kept the evaluation version feedback as a spoiler here for the author to amend demo issues. I think the rotation widget feedback is still valid - possible improvements but other than this very happy!
    Been playing around with the evaluation, it's much more focused but it's still very error prone as of 2019.1.5f1:

    • Would like to rotate objects the unity way, from pivot center without having to painstakingly select an edge - it gets a bit stressy after a while flickering at me and so on with a huge sundial when I just need to rotate the object fron the center without drama - option possible?

    • Selecting a specific amount of sides for the cylinder is extremely hard for my computer, apparently. I can't type in a specific amount (it won't let me) and the slider keeps jumping over this. To address it I had to pop the window out.

    • Some kind of bug when the CSG model root is inside another gameobject. I wanted to create windows using a prefab which has the csg model to punch holes and add details, but also prefab props which aren't csg - the window frame and a trigger. The idea is that I can then just punch holes and doorways in everything and it's nondestructive, self-decorating and so but it was a little janky with position popping all over the place on undo an so on...
    • Often when in Place mode I like to position props I might have in the world. Like statues etc, I love that it helps with the grid but it does consistently get under my feet by not letting me rotate normal props, perhaps the console log errors are a part of the problem
    Code (CSharp):
    1. transform.position assign attempt for 'Debris 0 (115)' is not valid. Input position is { NaN, NaN, NaN }.
    2. UnityEngine.Transform:set_position(Vector3)
    3. RealtimeCSG.EditModePlace:RotateObjects(Transform[], Vector3, Quaternion)
    4. RealtimeCSG.EditModePlace:RotateObjects(Transform[], Vector3, Vector3, Single)
    5. RealtimeCSG.EditModePlace:RotateObjects(Transform[], Vector3, Vector3, Vector3, Single, Vector3, Single&, Boolean)
    6. RealtimeCSG.EditModePlace:HandleEvents(Rect)
    7. RealtimeCSG.EditModeManager:OnSceneGUI(SceneView)
    8. RealtimeCSG.SceneViewEventHandler:OnScene(SceneView)
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    10.  
    • Would like to control the flags for the object myself as we have an automated process that runs at editor time setting flags and so on so I'm guessing I just grab the Model component with my script and set those there instead and delete the rigidbody. Not a big issue but a rare decision for a level to have a rigidbody.

    • Few tooltip typos and oddities (sometimes they show the tooltip on 2 lines saying the same thing, and "U" is missing from "UV" in the Surfaces panel for reset.

    • A bug when Unity loads and entering play mode, I get these console errors with Realtime CSG installed which prevents us testing the game:
    Code (CSharp):
    1. NotImplementedException: The method or operation is not implemented.
    2. System.Environment.FailFast (System.String message) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    3. <Module>.n
    4. m+m..*ll*
    5. m.olo--k*on
    6. k. (System.String ) (at <019552c2af0a482294d0465f36196e2d>:0)
    7. <Module>.j.kj,.m
    8. .jk
    9. *l+*k-ol,
    10. ,+nl. (System.Object ) (at <019552c2af0a482294d0465f36196e2d>:0)
    11. System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    12. System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    13. System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    14. System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    15. System.Threading.ThreadHelper.ThreadStart (System.Object obj) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    16. UnityEngine.UnhandledExceptionHandler:<RegisterUECatcher>m__0(Object, UnhandledExceptionEventArgs)
    17.  
    The big problem is it spewing errors when I try to manipulate regular prefabs I have, which forces me to turn the whole thing on and off with ctrl + F3 when I would rather leave it on and model a little, place some prefabs and continue.

    I do think that the asset is better than probuilder and practical. If people use this for proper base gameplay geo and decorate it properly with separate meshes it's the ideal way to do things, so I'm happy I took another closer look.

    It's buggy at times but apart from the undo bug placing it in a position that couldn't be restored, the rest are mostly UI related except for the showstopper above which stops play mode and occurs on startup too.

    Perhaps they're evaluation woes? I used the latest eval for 2019.1
     
    logicalerror likes this.
  26. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    And now for my first question about wrestling with this new exciting beast. We want to have edge trims automatically generated for everything as a mesh. These are typically just cards extruded a short distance from an edge along the surface - perfect for mesh decals, a common workflow if I am not mistaken?

    I was thinking that as you have rich data about the CSG Model, perhaps we could generate this mesh decal "cage" of trims automatically?

    If so I would love a little orienting where to look/or any advice, thanks!

    Ref:


    I just need a little L shaped card running along all the edges that are greater than a threshold I guess, as it's such a labour-intensive thing and since we change the CSG often having this just magically update means we give it that lovely quality boost without spending time. I guess it would be any edges that belong to polygons > angle threshold or such... you would know more than me about the API so I'll take on board all you say.
     
  27. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Bug: clicking a non CSG object (such as my own player prefab) constantly forces it to pick the mesh renderer instead of the root. Could you add a check to see if it's one of your own objects before making that decision for us, it would fix the issue. In complex scenes it's a real pain point.
     
  28. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @hippocoder ah, the selection is supposed to just check if it's a csg component, and if not select it the regular way, but something is clearly going wrong. In the meantime you can turn realtime-CSG on/off using control-F3
    Thanks for the feedback about the evaluation version!
     
    hippocoder likes this.
  29. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    I just released version 1.556 on RealtimeCSG.com
    • Fixed UV generation being damaged by Unity's own MeshUtility.Optimize method (thanks @hippocoder for letting me know about UV issues)
    • Fixed not being able to select non-CSG mesh when a CSG object was behind it (thanks @gloomyghoul)
    • Fixed button labeled "V" when it should've been labeled "UV" (thanks @Hunted)
    • Fixed generator properly finishing a commit when the toolmode is changed before enter is pressed, or the commit button is clicked (thanks @Hunted)
    • Fixed some pivot issues (thanks @Hunted)
    • Fixed that pressing the hotkey for center pivot only works when in Rotate/EditMode-Place mode because otherwise there wouldn't be visual feedback (thanks @Hunted)
    • Fixed loads of other small things (thanks @Hunted)
    • Removed 'created infinite brush' debug message that should've been removed before, apologies! (thanks @Hunted)
    • Creating a Model/Brush/Operation in the hierarchy using the context menu now places the game-objects underneath the clicked item (thanks for the suggestion @gloomyghoul)

    I've also removed the evaluation version :(

    The evaluation version was always a challenge to get to work because I had to compile realtime-CSG as a dll and then obfuscate it so that people couldn't just decompile it. After all, if I released it with source people could just modify it to essentially become the full version .. which kinda defeated the purpose ...

    With every unity version it just got harder and harder to support the evaluation version, and with 2019.1 it just turned out that having precompiled dlls that reference unity dlls just broke .. completely. I've been trying for a while now to get it to work, and I just don't even know what is happening. Unity just spits out nonsensical error messages.
    This was the last straw for me.

    The whole evaluation version idea has just turned out to be a disaster for me. Having an evaluation version that has all kinds of weird unity issues and is not representable of the full version is useless to, well, everybody.

    Sorry :-/
     
    Petethegoat and hippocoder like this.
  30. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    All that matters is people pay the very modest fee you're asking for and just use it, it's a brilliant asset.
     
    Ony and logicalerror like this.
  31. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @logicalerror ! I am interested in your asset but I would like to try the evaluation version that you indicate on the asset store page before buying ...

    How can I get it? I have not seen any download link on your website

    regards
     
  32. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    50
    I bought it today. Will be using it for Unreal Engine Development. Just for your interest, as this is c++-based anyways!?, have you ever thought about porting it to UE4 ? The devs over there have the bsp-on-board-solution, but it is not as powerful and much slower to work with than with Realtime CSG. There is nothing like probuilder/umodeler over there, so the market it is uncontested yet :) thanks for all the work by the way ( or maybe as they are swimming in wealth now, they might be interested in buying your solution if you talk to them ). cheers
     
    Last edited: Jul 8, 2019
  33. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @ftejada sorry, I had to remove the evaluation version b/c of loads of issues with precompiled unity dlls. Because of those issues it wasn't representative of the final product & cost me more than 50% of my time spend on realtime CSG just to try to keep things working. In the latest Unity versions I just failed to get it to work at all due to bugs in Unity, and that was the final straw. Sorry.

    @DavidJares how would you use a Unity plugin for Unreal Engine development?? I'm confused
     
    ftejada likes this.
  34. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    50
    @logicalerror through the fbx-export-functionality ( which was important for me ) that you provide. I can bang out prototypical! level structures in unity, just drag the fbx over to unreal so it updates the fbx. not ideal, but still good enough for getting up and running in the early stage. I have both Unity and Unreal open ath the same time then.. I loved SabreCSG. I even love realtimeCSG more. It is just important to know that it is not a modelling-tool. its for prototyping and sketching out things.
     
  35. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    Hey, hey, hey! What about T-Junction problem? Is it solved? I am in search of solid CSG plugin, but almost all of them has that nasty bug.
     
    Last edited: Jul 14, 2019
  36. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    Bought and tested. That bug shows much less frequently, than in SabreCSG, but still present in some places.
    I have a weird bug, while moving brush jitters on some positions and prevents to place it correctly (placed on neigbour grid position instead of required). Maybe it's InputSystem problem, but why it's not appear while editing brush?
     
  37. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi @RegdayNull I'm working on a new version of the CSG algorithm that will not have any T-junction issues, but it'll take me a bit of time before it's ready
    I have never seen any jitter issues, so I'm not sure what's happening on your end? Is your grid size set to a really small number maybe?
     
  38. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    Jittering was caused by ProGrids package (even when toggled off). Updating it solved the problem.
     
    logicalerror likes this.
  39. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    FYI: Realtime CSG doesn't work in 2019.2 because of a Unity bug. Hopefully this will be fixed soon, otherwise I'll try to work around it
     
    xVergilx likes this.
  40. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    hippocoder likes this.
  41. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi, I put on another update on https://realtimecsg.com/updates/
    Version 1.558
    • Workaround for Unity font bug in Unity 2019.3
    • Realtime CSG preferences are now in Project Settings menu in Unity 2018.4 and beyond, removes warnings about preferencewindow being deprecated
    • GameObjects under a model no longer have their layers set to default at build time
    • Added option to set default for Preserve Uvs from within preference/project setting window
    • Added option to set to receive GI from lightmaps or lightprobes on model in Unity 2019.2 and beyond
    • Added option to snap to a relative distance instead of the grid. (there are some places where this is not implemented yet, this will be fixed in the future)

    Cheers
     
    hippocoder likes this.
  42. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    Hi. Nice update. Do you have any ETA for new CSG algo? And will it be just an update or same sort of thing, or requre full hierarchy rebuilding? Building the scene and in some places current algorithm failing to fill the mesh properly. Not very frequent, but still.
     
  43. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @RegdayNull No ETA, sorry. The new algorithm will be incremental, just like the current one. It'll also be managed, multi-threaded (realtime CSG is single threaded), and burst compiled. The new algorithm shouldn't have any of the gap issues that realtime CSG sometimes has. These gaps happen due to bugs in the mesh optimization algorithm in realtime CSG. The new algorithm will produce perfect meshes from the get go, so don't need an optimization pass. The optimization pass in realtime CSG is about 50% of the time it takes to perform CSG.
     
    hippocoder and slimshader like this.
  44. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Hi,
    Supporting multiple versions of Unity is a pain, and right now I'm supporting 5.6 to 2019.2 ..
    So I was wondering, is anyone here still relying heavily on 5.6 and 2017.x? And if you are, can you share why and how long you think you'll be stuck on that version?
    Thanks
     
    hippocoder likes this.
  45. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Got good hopes for new CSG when ready, I would not bother supporting anything that Unity does not support. 2017 LTS will cease support at the end of the year so focus could be 2018/2019 after that.
     
    hippocoder likes this.
  46. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No ETA :'(

    Does this mean it would have an ETA if there's an upgrade price or something..? :)
    And no I won't even mention DOTS!

    It's a shame Unity doesn't just push you onto the world building team and let you do what comes naturally.

    The new algo still is limited to convex though, right?

    2019.3 here. Why not just do what most applications and assets do, they reserve new features for new versions. I mean, it's not like the people stuck on an older Unity will suddenly have it stop working. They can always download that older version from your site.
     
  47. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @hippocoder the new algo is limited to convex, but at some point I might either lift that limitation, or build a wrapper around it to subdivide non convex meshes automatically under the hood.

    Older versions of Realtime-CSG will of course still be available for download, but new fixes etc. would only be available for new versions of unity .. and I don't want anyone to be stuck in a version with issues
     
  48. cjacobwade

    cjacobwade

    Joined:
    Jun 8, 2013
    Posts:
    10
    Howdy! I'm new to Realtime CSG but really impressed so far. Some probably newbie question that I couldn't find answers to in ctrl+f'ing the site:

    Is there a way to use Unity's built-in rotate and scale tools for an entire brush without having to do additional selection? I can appreciate the benefits the custom rotate and scale gives but the built-in tools are faster in some cases (for rotation, pixel hunting for a bounds edge is annoying and I have to think a bit to find the right edge for the rotation axis I want; for scaling, I can't figure out a way to scale the entire brush without manually selecting verts or surfaces). Would love to have those there by default or an option to enable them.

    Is there a way to vertex snap brushes to vertices on other brushes (as is the default when you hold V before clicking an object)? That's often a much faster way to align to objects than manually moving and trying to visually line them up.

    Is there a way to surface snap brushes to the surface behind your mouse position including other brushes (as is the default when you hold Ctrl + Shift before clicking an object)? Similarly to vert snapping that's a much faster way to get objects approximately where you want them with having to manually align just by visuals.

    Some minor notes:
    - Took me a long time to figure out how to toggle Realtime CSG and at first thought there was no way to toggle all the scene view stuff. I wonder if a button and tooltip in the sceneview bar would help
    - Would be nice to see the shortcuts moved to Edit/Shortcuts rather than Preferences/CSG Keys as it took me a while to track down

    Cheers!
     
    Last edited: Oct 11, 2019
    hippocoder likes this.
  49. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    There's some bugs with 2020, which don't crop up on other tools, just some kind of positioning issue when making new objects etc.

    Not sure what causes it to be offset, any idea where I can look?
     
  50. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    68
    ProGrids maybe?