Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[RELEASED] Realtime CSG - level design for Unity

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

  1. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    @terrivellmann hi, can you describe what it looks like when 'it breaks the geometry'?
    putting all the generators in their own components is a goal of mine, but I need to rework some stuff before I can do that.
    Non-filled stairs are a good idea & shouldn't be too hard to implement, thanks for the suggestion
     
    Petethegoat likes this.
  2. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    I believe I have the same issue (same as the one I described earlier). Here's what it looks like in 1.500:
    Broken geometry: https://i.imgur.com/ZiobWci.png
    Proper geo after enabling CSG again: https://i.imgur.com/Kt2ydh1.png

    I think I can reproduce it, too:
    Disable realtime CSG with ctrl-f3.
    Go into playmode.
    Exit playmode.
    Make some change in an inspector (removing an element from an array, in my case, but I don't think it matters)
    Undo the change.

    And that's it. It breaks after undo, but if you enable and disable r-CSG again without re-entering playmode, undoing works fine and doesn't seem to interfere with the geo.

    (and to clarify if it isn't obvious from the screenshots, it appears that subtractive geo is ignored when it breaks, not sure if anything else is wrong)
     
  3. terrivellmann

    terrivellmann

    Joined:
    Mar 10, 2015
    Posts:
    23
    yeah for me its the same! subtractive geo seems to be ignored

    edit: I tried to reproduce it but now it doesn't seem to happen anymore, since I've recently updated to 1.503 , its possible that it got fixed. will report back if I spot it again
     
    Last edited: Nov 25, 2017
  4. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    I'll try updating and check the repro too.

    Still seems to work with my repro, at least when I'm deleting an array element and undoing that.
     
    Last edited: Nov 26, 2017
  5. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    Version 1.505 of realtime-CSG has been released!

    It has a new stepped mode for stairs generation (ping @terrivellmann)
    stepped_stairs.gif

    There are also some performance improvements and bug fixes, such as the ortho issue that @terrivellmann had

    I also decided to start adding stuff to the demo scene, since it was a bit simple, so this version also has a bit more geometry.
    newdemo.png

    As always, you can find the updates here until the latest version is accepted to the asset store.
     
    Petethegoat and tapawafo like this.
  6. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @terrivellmann , @Petethegoat strictly speaking when realtime-CSG is disabled .. it really should do disabled and do nothing .. I'm actually surprising it does something at all ;p

    I guess that might cause some workflow issues though, I'll take a look at it.
     
    Petethegoat likes this.
  7. terrivellmann

    terrivellmann

    Joined:
    Mar 10, 2015
    Posts:
    23
    logicalerror likes this.
  8. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    You're welcome!
     
  9. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
  10. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    I've been experimenting with the UV/surface tools, and there are a few issues that make them less usable than they should be.

    By far the biggest problem is the UV resetting sometimes when you select a surface. This is the same issue 188 - https://github.com/LogicalError/realtime-CSG-for-unity/issues/188
    As described there, it's really really annoying to properly UV any non-trivial geometry, as parts randomly seem to reset to their default generated UVs (which may be a visual thing only, but I'm not sure).

    If you have any troubles reproducing it in 1.500+ I can spend some time finding a new repro.

    Apart from that, the main feature which would be incredibly useful is a way to set a global (or per model) UV scale. In my current experiments I going through every surface and setting the UV scale to 0.5, so it'd be nice if I could just do that on the model and have it be used automatically.

    Final quibble is that some walls unexpectedly have UVs rotated by 90 degrees from what I would expect. I generally expect any vertical surface to have my UVs facing upwards, or have the top of my textures be pointing upwards, so to speak. Not a huge deal as it's easy enough to fix, but it'd be nice if the default was reliably orientated.
     
  11. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @Petethegoat if you could find a repro that would help a lot, I haven't actually seen it happen .. so maybe there's something different in your setup from mine that causes this bug to manifest

    A global UV scale sounds like a good idea, I made a ticket for that here #221

    The UV rotation is weird, it should already have UVs facing upwards by default, so something is messing with that.
    Next time you encounter this, could you check the transform of the brush? Maybe the brush is rotated?
     
  12. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    Sorry for spamming the forum, but I'm having a lot of fun messing around with a more interesting demo scene :)

    \ trainstation5.PNG trainstation3.PNG trainstation4.PNG trainstation2.PNG trainstation1.PNG

    Anyway, back to work!
     
    doq, 2dgame and Petethegoat like this.
  13. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    The UV rotation is because of the brush being rotated, so nevermind that one! Will have a talk with my collaborator and figure out how brushes are getting rotated. ;)

    Will get a repro for you on the main issue.

    Example scene looks gorgeous, by the way!
     
    LogicalError-Unity3D likes this.
  14. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Just curious, has anyone tried out Realtime CSG in the VR Editor? Idea came to me recently, just haven't tried it out yet since I can't use the EditorVR for my main project.

    In my mind, this kind of CSG modeling might be one of the best ways to model in VR, especially once symmetry is added. (Since CSG requires almost no data input, just manipulation of the brushes + some hotkeys)

    It might be worth looking into - the ability to model in scale, with amazing precision offered by VR hand tracking, plus the ability to change your own scale (to work on small and large details seamlessly) seems really fantastic. The key here, is, possibly, RTCSG may need very few changes in order to work in the VR editor, since it's object-oriented.

    Thoughts?
     
  15. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    Full repro- I'm pretty sure steps 1 through 4 aren't necessary, but for the sake of completeness here we go:
    1. New project on 2017.2.0p2
    2. Import 1.506 package in full
    3. New scene, create realtime csg model.
    4. Enable realtime csg, create a cylinder.
    5. Change one face, eg from wall to floor material, half UV scale, rotate UV. I'm making these changes in the surfaces window, rather than using the transform gizmos.
    6. Smear (g) to other faces.
    7. Now try individually selecting each face- some, apparently at random, will reset their UV (but not material) upon selection. In the surfaces window, their properties still appear to be correct, and making any change to the UVs will then display correctly. Disabling and reenabling RealtimeCSG doesn't fix them, and nor does entering or exiting playmode.
    Having said that, some combination of entering and exiting playmode, and then disabling and reenabling realtimeCSG does seem to regenerate them correctly. Not sure exactly what combination though.
    Making a change to any face on the brush (possibly in the whole model?) seems to regenerate the UVs correctly too.
    Here's a video showing the good part: https://dl.dropboxusercontent.com/s/anpqmp9dwgoco73/2017-11-29_14-31-15.mp4
    Though in the video it's odd or even faces that have the issue, that wasn't always the case. Sometimes it'd just be a couple of faces at random (so far as I can tell ;) )


    Also, possibly a related issue, you can see smearing 45 deg rotated UVs doesn't always line up properly- it's a little hard to describe exactly, but here's another video that shows some of the weirdness- https://dl.dropboxusercontent.com/s/a4bl2m4qmjhi77e/2017-11-29_14-28-03.mp4
     
  16. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    @Petethegoat your issue is fixed in 1.507! .. the texture coordinates where temporarily updated wrong on click, but stored correctly.
     
    Petethegoat likes this.
  17. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    Yes!
     
  18. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @matteumayo a VR editor probably makes sense eventually yeah :)
     
    Regularry and tapawafo like this.
  19. terrivellmann

    terrivellmann

    Joined:
    Mar 10, 2015
    Posts:
    23
    Ok, yeah I can confirm it still happens and I can reproduce it every time by doing this:
    - Disable RCSG
    - Run game, Stop game
    - Move a random transform
    - Hit Ctrl Z

    This makes all the subtractive brushes disabled until you enable RCSG again.
     
  20. Petethegoat

    Petethegoat

    Joined:
    Jun 12, 2013
    Posts:
    39
    Do you know of any issues with normal maps being inverted? Not sure if it's just a quirk with Unity's substance integration, but it appears correct in both the preview window and on a default quad.

    Here's a pic: quad above, csg below. Multiplying the normal by -1 instead of 1 in the material makes it appear correctly on the csg, but obviously then breaks the quad.

    And inverted: https://i.imgur.com/8cYhihA.png

    The surface has positive UV scale, not that that should matter?

    edit:
    Just tried exporting the normal from designer with a regular material, instead of using the substance integration, and it doesn't seem to make a difference. As far as I can tell, all surfaces (with any material) have inverted normals.

    I don't notice any difference based on if a face is created by subtraction or not.
     
    Last edited: Dec 7, 2017
  21. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @Petethegoat just as a sanity check, do you see the same problem on a unity box mesh? [update] Oh I missed the part where you added a quad to the scene, nvm. I'll take a look.

    @terrivellmann well .. realtime-CSG is disabled at that time ¯\_(ツ)_/¯.. not sure what options I have here since one of the reasons I added the ability to disable realtime-CSG is that it needs to do a lot of work in the background to simply detect changes in the scene, since Unity annoyingly doesn't provide another way to do that, which has a performance cost .. also, is there a reason why you disable it before playing a game?
     
    Last edited: Dec 12, 2017
  22. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @Petethegoat I checked, and on my end the normals are fine, it's the tangents that are rotated differently compared to the plane. If you rotate the texture 180 degrees it looks fine. I'll see what I can do to make it more consistent
     
  23. terrivellmann

    terrivellmann

    Joined:
    Mar 10, 2015
    Posts:
    23
    I'll sometimes disable it when placing and moving other gameobjects around the scene
    not really an issue in practice since re-enabling fixes it, just reporting that it happens!
     
  24. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    I just released version 1.509 here https://realtimecsg.com/updates/
    It has the following fixes:
    • Fixed generated meshes not having their static flags set correctly from the model, causing issues with lightmap generation
    • Fixed issue with clip-mode not updating the current mouse position visually when moving over the same surface
    • Fixed tooltip on edit mode window going in the wrong direction sometimes
    • Fixed inverted tangents, causing bump maps to look like they've been inverted (@Petethegoat !)
    • Fixed drag & dropping prefabs into hierarchy sometimes moving prefab in the hierarchy
    Also some improvements:
    • Improved line rendering so that it doesn't get large close to the camera
    • Improved line rendering performance
    • Rewrote some code that relied on Unity code which was, well, slow, and slowed editing down
    I'm also moving the example scene into separate packages (one for each unity version), this will be released a bit later
    As you can see at https://realtimecsg.com/updates/ (once you've logged in) the new version has a package for each unity version. I'm now generating these packages for each unity version to ensure that they work on those versions.

    Now, back to refactoring ;p
     
    tapawafo likes this.
  25. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    @terrivellmann thanks for letting me know though, since it tells me I probably need to go through those parts of realtime-csg at some point to make that work better for you :)
     
  26. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    I'm testing the evaluation version and I have a few questions about it:

    1) Is there a way to rotate an object while drawing it? For example stairs, I want to rotate them and then adjust the settings so they fit. But to rotate I have to "commit" the object it seems (and then I can't edit it anymore)

    2) Will there be a circular stairs generator? That's the only big feature I really want to add. Other than that RealtimeCSG is absolutely awesome so far!

    3) Is there a way to select all surfaces of a brush / multiple brushes? And what about "growing" the selection? By growing I mean like in ProBuilder, where you have a "grow selection" button + an angle, and when you press it it will simply add all adjacent surfaces to your selection (as long as their plane normal is less than the given angle)

    4) I have a really serious problem with the performance, there are huge lag spikes from the GC (1sec+) all the time. The good news is that it's most likely really easy to fix.

    I traced to where that's coming from, it seems to be snapping to the grid + OnShowGUI() (not sure, but maybe you're instantiating styles or something on every OnGUI?).

    https://i.imgur.com/bA6VQbC.png
    https://i.imgur.com/yoC4vI7.png

    The lag spikes can be reproduced by turning on snapping, grid and then going into mesh mode (with a few brushes in the scene of course) and then just flying around with the editor camera, or rapidly moving the cursor over the brushes.

    Sadly I always have to turn off the grid because the lag spikes are happening so often (literally every second or two) that it is impossible to do anything.


    5) Is there a way to export multiple models as one? The reason for this request is that the brushes "cut" everything they touch, but often I have brushes that are "details" (just like in the hammer editor). For example a pillar in a room shouldn't cut the floor and ceiling into tons of triangles. Even though that cutting is not perceptible, it still consumes memory/vertices.
    Or will everything work just fine when you have nested models and you export the outer most model? (so all child models will also be part of the main model but the two models won't cut each other)
     
    Last edited: Jan 1, 2018
  27. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Hello @logicalerror ,

    I've just come to the end of an incredibly strange troubleshooting session with a recompilation loop that occurred after I switched from 5.6 to Unity 2017.3 f3

    After testing around with all my assets in a fresh project I've come to find that after importing RealtimeCSG (1.5.6 and the newest version both tested) the editor will constantly recompile itself.

    Once I remove RealtimeCSG from the project, the issue stops.

    I see that you've tested .3 f2 with the newest version but unfortunately I can't seem to find an archive of that version of Unity to use instead - I would assume it works.

    Any solution would be greatly appreciated. Or, even better since I can't work on my main project while I have this issue, if anyone could PM me a link to Unity 2017.3f2 I would really appreciate it!
     
  28. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @matteumayo I'm not seeing the infinite recompile happening in Unity 2017.3 f3 .. could it be that this happens in combination with another asset? Have you tried this in a clean project with just realtime-CSG?

    @dadude123
    1. I'm working towards making the generators be separate gameobject/components, so then you'll be able to edit them forever. This is not done yet though
    2. Yes, a circular "spiral" stairs is in the planning, so are other generators like arches, cones
    3. Right now surface selection is a bit limited, this is probably what I'm going to work on after I'm done with the refactoring/runtime support/generators as components work. You can add to your selection by holding shift and dragging over the surfaces you want to select
    4. It's not the grid actually, although it may look like it, it's the ray casting to determine what brush is beneath the mouse cursor. This should be fixed in the next version
    5. I'm actually not sure what happens when you export multiple models together, It's been a while since I looked at that, I'd have to get back to you about this one
     
  29. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    Thanks for the answer!

    I just bought RealtimeCSG now. Seeing how easy it is to create large buildings with many many rooms, while still maintaining full control over the brushes, its an absolute godsend.

    I tried the same with ProBuilder before and it becomes an absolute nightmare in no time. Right tool for the job and all... :p

    4) It seems like the newer version (1.509) from your updates website strangely does not have those lags (or a lot reduced) so I guess its sorta fixed already??

    5) I just tested nesting CSGModels and exporting them; and it is broken unfortunately. It will keep creating [generated-mesh] objects and spam errors in the console and then eventually crash.

    As long as there's/will be some way to group brushes together so they don't cut each other the problem would be solved.

    edit: actually exporting any model to a unity mesh will just make it invisible.
     
  30. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,151
    Hi is 1.507 not on asset store yet? Seems it is still 1.504 and that has issues with UV-mapping - if I create a subtractive object then where it subtracts from another mesh the UVs are backwards which seems wrong.

    Also there is still no coordinate display for the cursor on the grid which would be useful (show the x,y,z of snapped cursor in the bottom bar).
    And can you not create an object at a specific x,y,z or move the grid or offset a brush's root position (say to a cube corner)?
     
  31. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @dadude123 Oh, I haven't heard about /seen any FBX crash/spam errors before? I didn't realize you where on an older version, yeah asset store is behind somewhat :) I'll look into the FBX issues.

    @andyz you can find the lastest version here: https://realtimecsg.com/updates/
    If by "root position" you mean the pivot of a brush, you can do that by selecting your brush(es), selecting rotation in the top left corner of unity, and going to object mode. You should be able to change the "pivot center" there manually or by moving the pivot in the scene. Is that what you meant?
     
  32. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,151
    I do mean the pivot and you can only change the rotation-centre pivot as you said, that does not set the local pivot position back in move (W) mode.
    I want to have a box centred on 1 corner say, instead of the brush's centre, so when brush placed at 0,0,0 only 1 corner is on 0,0,0
     
  33. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    @andyz unless something is not working the way it's supposed to .. or if I misunderstand .. but those should be the same thing?
     
  34. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    @logicalerror
    I have recorded a video that shows how nesting models doesn't work and breaks everything.

    Video 1/3: https://streamable.com/0mxnm

    There's another video that shows the problems that appear with exporting and I'll edit it into this post when its done uploading.

    Code (CSharp):
    1. MissingReferenceException: The object of type 'GeneratedMeshes' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. InternalRealtimeCSG.MeshInstanceManager.UpdateContainerFlags (InternalRealtimeCSG.GeneratedMeshes container) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Managers/MeshInstanceManager.cs:1498)
    4. InternalRealtimeCSG.MeshInstanceManager.UpdateHelperSurfaceVisibility (Boolean force) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Managers/MeshInstanceManager.cs:1096)
    5. RealtimeCSG.InternalCSGModelManager.UpdateMeshes (System.Text.StringBuilder text, Boolean forceUpdate) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Managers/InternalCSGModelManager.cs:3355)
    6. RealtimeCSG.InternalCSGModelManager.Refresh (Boolean forceHierarchyUpdate) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Managers/InternalCSGModelManager.cs:2383)
    7. RealtimeCSG.UpdateLoop.RunEditorUpdate () (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Managers/UpdateLoop.cs:219)
    8. UnityEngine.Debug:LogException(Exception)
    9. RealtimeCSG.UpdateLoop:RunEditorUpdate() (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Managers/UpdateLoop.cs:224)
    10. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    edit 1:
    Video 2/3 Trying to export the parent model: https://streamable.com/j46dn

    edit 2:
    Video 3/3 Trying to export the sub model: https://streamable.com/ap3th


    I wouldn't mind too much if nesting models is not supported in any way (merging / ignoring nested / exporting indivudal models at the same time).
    The reason I want to do that is to simply prevent object cutting each other when I know for certain that some things are just "detail" brushes.
     
    Last edited: Jan 3, 2018
  35. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    thanks, that helps me understand whats going wrong and what you’re expecting to see :)
    so the first video, with the exception of the missing reference thing, is by design. Models are, currently, a thing on their own and do not interact with other models. That’s something I plan to change though since models interacting with other models can be quite powerful for various reasons (you’re running into one)
    but i need to get some refactoring done before I can do this, this same refactoring will also allow me to improve a lot of other things

    the other videos clearly show that there are issues with models inside models, I’ll look into it
     
  36. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    I just released version 1.510

    This version has the following bug fixes
    • Fixed distance to line calculations not always initialized, causing hovering over lines not always working, which caused problems with rotations (#226)
    • Fixed error on build with exported model in scene (#228)
    • Fixed extrusion in inverted world would not use the correct csg operation (thanks @hunterhunted for the fix!)
    • Fixed performance issue with ray-casting (used when moving mouse over surfaces)
    And some improvements to the FBX exporter
    • FBX exporter now has option to determine how the generated fbx model is centered (#227)



    • FBX exporter can now export collider only models by toggling "export colliders" (requested by @HilariousCow)
     
  37. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,151
    ok you are right that it does work, however what was confusing me is the local pivot axis always appears in the middle of the brush in move (w) mode, yet I have the editor set to 'Pivot' which is no longer the middle.
    So is your code drawing it in the wrong place when "The tool handle is placed at the active object's pivot point." is toggled on?
     
  38. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
  39. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @andyz I suspect the pivot mode is set to center , I’m behind my mobile phone right now so I can’t make a screenshot, but it’s in the top left corner of unity
    (yeah the whole pivot thing needs some rework .. I know)
     
  40. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    In the new version (510) subtractive brushes are somehow treated as solid which interferes with placing new brushes:

    - Can't place brush because a subtract-brush is "blocking" the way: https://streamable.com/mrcb7
    - Same thing in Surface mode. You can no longer select the inside faces of things: https://streamable.com/s5l46
    - You also can't select subtractive brushes from the inside anymore (clicking a wall that was created by a subtractive brush, while the scene camera is inside that brush)
     
    Last edited: Jan 3, 2018
  41. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Thanks for the reply @logicalerror ,

    It seems to be an interaction between the newer versions of VRTK and RealtimeCSG. It's possible this has nothing to do with Unity version, since I upgraded VRTK only when I upgraded Unity.

    Is this kind of interaction something you've encountered before? If so, what in particular could cause this sort of thing? It seems bizarre to me. I'm also surprised I'm the only one who's run into this issue, since VRTK is so widespread.

    VRTK's a rather large collection, so it would be very time-consuming to try and find the issue with no direction to look in. Do you have any thoughts on what could cause this?

    Thanks.

    EDIT: Here's an editor.log if you want to take a look at it: http://www28.zippyshare.com/v/HjTvRhXy/file.html

    EDIT2: I've got a follow-up question if you don't mind: it's getting to the point where I really can't figure out what's going between these two assets; my question is, if I delete RealtimeCSG, and then install it again later, will my existing models in scenes and prefabs be restored? Because it seems I have to keep these two assets in separate projects from now on, unfortunately.

    Alternatively, is transferring models made in CSG as simple as sharing the scene/prefab files that contain the CSG models? Thanks.
     
    Last edited: Jan 4, 2018
  42. logicalerror

    logicalerror

    Joined:
    Jan 2, 2013
    Posts:
    207
    @matteumaya have you tried 1.510? I think that it might've been fixed there ...
    @dadude123 ah, damn, thanks for letting me know I'll take a look
     
  43. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    I just had Unity crash a few times, always when dealing with a cylinder, but now I'm unable to replicate it.
    Video: https://streamable.com/pl8w7

    Here's the only error in the log, but I don't think it is relevant as it also happens earlier but doesn't cause a crash directly:
    Code (csharp):
    1.  
    2. IndexOutOfRangeException: Array index is out of range.
    3.   at RealtimeCSG.EditModeMeshEdit.HandleEvents (Rect sceneRect) [0x007eb] in Assets\Plugins\RealtimeCSG\Editor\Scripts\EditorWindows\BrushTools\MeshEditBrushTool.cs:2176
    4.   at RealtimeCSG.EditModeManager.OnSceneGUI (UnityEditor.SceneView sceneView) [0x00086] in Assets\Plugins\RealtimeCSG\Editor\Scripts\EditorWindows\BrushEditorManager\CSGBrushEditorManager.cs:514
    5.   at RealtimeCSG.SceneViewEventHandler.OnScene (UnityEditor.SceneView sceneView) [0x00100] in Assets\Plugins\RealtimeCSG\Editor\Scripts\Managers\SceneViewEventHandler.cs:54
    6.   at (wrapper delegate-invoke) UnityEditor.SceneView/OnSceneFunc:invoke_void__this___SceneView (UnityEditor.SceneView)
    7.  
    8. (Filename: Assets/Plugins/RealtimeCSG/Editor/Scripts/EditorWindows/BrushTools/MeshEditBrushTool.cs Line: 2176)
    9.  
    The crash also happened when I pressed the "Delete Key" delete on a model after the message above appeared at least once.
    And it also happens when I double-clicked a line on a cylinder on accident (so it turns into a bezier curve).

    Here's a video that shows how to reproduce the error above (just the error, not the crash unforunately):
    https://streamable.com/17f5q
    It happens when you doubleclick to de-select the recently extruded object, and then select the cylinder.

    Any estimate when the next version will be released?
    If there's anything unclear let me know :)
     
  44. mountblanc

    mountblanc

    Joined:
    Sep 24, 2015
    Posts:
    93
    Anyone know of any (not to old) tutorials ? The official video's aren't helping for example the building video is way to fast even at 0,25 speed i can't keep track and get lost building the roof after the duplicating bit. Not to mention the video is for an out dated version one year ago. The asset seems to have great potential but I haven't got the time to try to figure everything out by trail and error myself. I really am looking for some tutorials that will save lots of time I just do not have.
     
  45. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    I think I could make some tutorials later on about the more advanced things. I have some experience working with CSG workflows (Hammer, Radiant, and now RealtimeCSG).

    The roof is made like this:
    - Draw 2D shape with freeform tool
    - Extrude
    - Copy the whole thing
    - Rotate the copy 90°
    - (This is where you got stuck, right?)
    - Group both of those things into a new operation
    At this point you should have a setup of one operation, which contains 2 more operations (which each contain multiple brushes making up that 2D shape)
    - Now you set the first sub-operation to Add
    - Set the second sub-operation to Intersect
    - Set the "parent" (container) operation to Add


    @logicalerror
    Bug Report: Extruding the surface of a subtractive brush creates a new additive block instead of a subtractive one (in 509, I had to revert because the selection bug is pretty bad, but then again not being able to rotate objects is bad as well :p)
     
  46. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
    Just released version 1.511 on the update site, it has the following fixes
    • Fixed issue with raycasting broken on subtractive surfaces
    • Fixed issue with putting models inside models creating duplicate generated meshes + errors
    • Fixed exporting model will now also include child-models
    you can find the latest version here: https://realtimecsg.com/updates/
     
  47. LogicalError-Unity3D

    LogicalError-Unity3D

    Unity Technologies

    Joined:
    Aug 7, 2015
    Posts:
    58
  48. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    Awesome, you're a beast man!
    Its incredible how much RealtimeCSG has improved my design workflow. Fantastic job, really!

    Btw I read somewhere in this thread (I think it was @matteumayo ?) about some recompiling issue. I think I figured that out (assuming its even the same problem).
    When you delete an older version of the plugin to install a newer one, Unity doesn't actually delete the folder for some reason. When you try to do it in the explorer it says Unity still has the file open so I guess its something about not being able to unload something. But you can simply delete it when Unity is closed and then restart it to import the new version.
     
  49. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Thanks for the reply @logicalerror .

    I've just tested with 1.511 and unfortunately the behavior is identical.
     
  50. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    I managed to find two crashes. The files are pretty large, so I assumed only the stacktrace at the very end is really useful. If you need the full log let me know and I'll upload it :)


    Code (CSharp):
    1.  
    2. ========== OUTPUTING STACK TRACE ==================
    3.  
    4. 0x000000007729F23C (ntdll) RtlAnsiStringToUnicodeString
    5. 0x0000000077051A0A (kernel32) HeapFree
    6.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A55CCC)
    7. 0x000007FED7A55CCC (RealtimeCSG[1.511]) (function-name not available)
    8.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A52C9A)
    9. 0x000007FED7A52C9A (RealtimeCSG[1.511]) (function-name not available)
    10.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A75B42)
    11. 0x000007FED7A75B42 (RealtimeCSG[1.511]) (function-name not available)
    12.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A714B5)
    13. 0x000007FED7A714B5 (RealtimeCSG[1.511]) (function-name not available)
    14.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A70BAB)
    15. 0x000007FED7A70BAB (RealtimeCSG[1.511]) (function-name not available)
    16.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A771F5)
    17. 0x000007FED7A771F5 (RealtimeCSG[1.511]) (function-name not available)
    18.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED7A7A443)
    19. 0x000007FED7A7A443 (RealtimeCSG[1.511]) (function-name not available)
    20. 0x000007FED7A89992 (RealtimeCSG[1.511]) ApplyAnyChanges
    21. 0x0000000041AFACA1 (Mono JIT Code) (wrapper managed-to-native) RealtimeCSG.NativeMethodBindings:ApplyAnyChanges ()
    22. 0x0000000041AFF881 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\Control\Managers\InternalCSGModelManager.cs:3208] RealtimeCSG.InternalCSGModelManager:UpdateMeshes (System.Text.StringBuilder,bool)
    23. 0x000000004233B907 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\Control\Managers\InternalCSGModelManager.cs:2370] RealtimeCSG.InternalCSGModelManager:Refresh (bool)
    24. 0x00000000423100C5 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\Control\Managers\UpdateLoop.cs:219] RealtimeCSG.UpdateLoop:RunEditorUpdate ()
    25. 0x000000003B2D1D74 (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    26. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    27. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    28. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    29. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    30. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    31. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    32. 0x000000003B2D1CBC (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    33. 0x000000003B455F19 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:127] UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    34. 0x00000000143011DE (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    35. 0x000007FED0FD64AF (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
    36. 0x000007FED0F28A19 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
    37. 0x00000001407EC7C9 (Unity) mono_runtime_invoke_profiled
    38. 0x0000000140A224BE (Unity) CallStaticMonoMethod
    39. 0x0000000140A225CF (Unity) CallStaticMonoMethod
    40. 0x0000000140A23641 (Unity) CallStaticMonoMethod
    41. 0x0000000141186763 (Unity) SceneTracker::Update
    42. 0x00000001411E9AEF (Unity) Application::TickTimer
    43. 0x000000014140EB0F (Unity) MainMessageLoop
    44. 0x00000001414103B5 (Unity) WinMain
    45. 0x0000000141E643A8 (Unity) __tmainCRTStartup
    46. 0x00000000770459CD (kernel32) BaseThreadInitThunk
    47. 0x000000007727A561 (ntdll) RtlUserThreadStart
    48.  
    49. ========== END OF STACKTRACE ===========
    50.  
    Code (CSharp):
    1.  
    2. ========== OUTPUTING STACK TRACE ==================
    3.  
    4. 0x000000007729F23C (ntdll) RtlAnsiStringToUnicodeString
    5. 0x0000000077051A0A (kernel32) HeapFree
    6.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED8A75CCC)
    7. 0x000007FED8A75CCC (RealtimeCSG[1.511]) (function-name not available)
    8.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED8A920DD)
    9. 0x000007FED8A920DD (RealtimeCSG[1.511]) (function-name not available)
    10.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED8A90B99)
    11. 0x000007FED8A90B99 (RealtimeCSG[1.511]) (function-name not available)
    12.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED8A971F5)
    13. 0x000007FED8A971F5 (RealtimeCSG[1.511]) (function-name not available)
    14.   ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 000007FED8A9A443)
    15. 0x000007FED8A9A443 (RealtimeCSG[1.511]) (function-name not available)
    16. 0x000007FED8AA9992 (RealtimeCSG[1.511]) ApplyAnyChanges
    17. 0x0000000046B5B061 (Mono JIT Code) (wrapper managed-to-native) RealtimeCSG.NativeMethodBindings:ApplyAnyChanges ()
    18. 0x0000000046B5E621 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\Control\Managers\InternalCSGModelManager.cs:3208] RealtimeCSG.InternalCSGModelManager:UpdateMeshes (System.Text.StringBuilder,bool)
    19. 0x0000000046AF4287 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\Control\Managers\InternalCSGModelManager.cs:2370] RealtimeCSG.InternalCSGModelManager:Refresh (bool)
    20. 0x000000001440FDCB (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\View\GUI\EditModeGUI\EditModes\EditMode.Clip.cs:706] RealtimeCSG.EditModeClip:UpdateTargetClipping (int)
    21. 0x000000001440BC08 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\View\GUI\EditModeGUI\EditModes\EditMode.Clip.cs:800] RealtimeCSG.EditModeClip:UpdateClipPlane ()
    22. 0x00000000143FCCEA (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\View\GUI\EditModeGUI\EditModes\EditMode.Clip.cs:1360] RealtimeCSG.EditModeClip:HandleCreatePointEvents (UnityEngine.Rect)
    23. 0x00000000143F9D47 (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\View\GUI\EditModeGUI\EditModes\EditMode.Clip.cs:999] RealtimeCSG.EditModeClip:HandleEvents (UnityEngine.Rect)
    24. 0x0000000046ADE3CA (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\View\GUI\EditModeGUI\EditModeManager.cs:514] RealtimeCSG.EditModeManager:OnSceneGUI (UnityEditor.SceneView)
    25. 0x0000000046ABAB7D (Mono JIT Code) [C:\Users\User\Documents\ProceduralTest\ProceduralTest\Assets\Plugins\RealtimeCSG\Editor\Scripts\Control\Managers\SceneViewEventHandler.cs:54] RealtimeCSG.SceneViewEventHandler:OnScene (UnityEditor.SceneView)
    26. 0x0000000045444CF4 (Mono JIT Code) (wrapper delegate-invoke) UnityEditor.SceneView/OnSceneFunc:invoke_void__this___SceneView (UnityEditor.SceneView)
    27. 0x0000000045444556 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\SceneView\SceneView.cs:2518] UnityEditor.SceneView:CallOnSceneGUI ()
    28. 0x0000000045441377 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\SceneView\SceneView.cs:1833] UnityEditor.SceneView:HandleSelectionAndOnSceneGUI ()
    29. 0x000000003A4B701C (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\SceneView\SceneView.cs:1663] UnityEditor.SceneView:OnGUI ()
    30. 0x0000000032E76CC2 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    31. 0x000007FED2DB64AF (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
    32. 0x000007FED2D08A19 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
    33. 0x000007FED2D0EF27 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:3838] mono_runtime_invoke_array
    34. 0x000007FED2CCD34F (mono) [c:\buildslave\mono\build\mono\metadata\icall.c:2750] ves_icall_InternalInvoke
    35. 0x0000000032E40367 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    36. 0x0000000032E3E4C2 (Mono JIT Code) [/Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    37. 0x0000000032ED2F2F (Mono JIT Code) [/Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
    38. 0x0000000038D3B755 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:295] UnityEditor.HostView:Invoke (string,object)
    39. 0x0000000038D3B5FA (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:288] UnityEditor.HostView:Invoke (string)
    40. 0x000000003A4B3F90 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:255] UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
    41. 0x000000003A4A8347 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:387] UnityEditor.DockArea:OldOnGUI ()
    42. 0x000000003A465578 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:179] UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event)
    43. 0x000000003A4647A8 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:333] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
    44. 0x0000000038D35C58 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:317] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent (UnityEngine.Experimental.UIElements.EventBase)
    45. 0x0000000038D15F20 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\EventDispatcher.cs:250] UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent (UnityEngine.Experimental.UIElements.EventBase,UnityEngine.Experimental.UIElements.IPanel)
    46. 0x000000003A43774F (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:251] UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel)
    47. 0x000000003A43721B (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:78] UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent (int,intptr)
    48. 0x000000003A436D3D (Mono JIT Code) [C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUIUtility.cs:175] UnityEngine.GUIUtility:ProcessEvent (int,intptr)
    49. 0x000000003A436EFE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
    50. 0x000007FED2DB64AF (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
    51. 0x000007FED2D08A19 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
    52. 0x0000000140A2EAEC (Unity) scripting_method_invoke
    53. 0x0000000140A2243A (Unity) ScriptingInvocation::Invoke
    54. 0x0000000140A234EA (Unity) ScriptingInvocation::Invoke<bool>
    55. 0x000000014028278E (Unity) IMGUIScriptingClasses::ProcessEvent
    56. 0x000000014112A2AF (Unity) GUIView::ProcessRetainedMode
    57. 0x00000001413F9748 (Unity) GUIView::OnInputEvent
    58. 0x000000014112A193 (Unity) GUIView::ProcessInputEvent
    59. 0x00000001413F1715 (Unity) GUIView::ProcessEventMessages
    60. 0x00000001413FB70A (Unity) GUIView::GUIViewWndProc
    61. 0x0000000077169BBD (USER32) TranslateMessageEx
    62. 0x00000000771698C2 (USER32) TranslateMessage
    63. 0x000000014140EAC7 (Unity) MainMessageLoop
    64. 0x00000001414103B5 (Unity) WinMain
    65. 0x0000000141E643A8 (Unity) __tmainCRTStartup
    66. 0x00000000770459CD (kernel32) BaseThreadInitThunk
    67. 0x000000007727A561 (ntdll) RtlUserThreadStart
    68.  
    69. ========== END OF STACKTRACE ===========
    70.  
    71. Crash in winutils::ProcessInternalCrash(PEXCEPTION_POINTERS pExInfo)