Search Unity

PrimitivesPro [RELEASED]

Discussion in 'Assets and Asset Store' started by reindeer-games, Mar 11, 2013.

  1. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
  2. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    242
    I suggested some more features for a sphere long time ago. Is there any chance that this feature will come? This is the only feature I am really missing from this great asset.
     
  3. dl_studios

    dl_studios

    Joined:
    Oct 14, 2012
    Posts:
    76
    Hi, just wondering if you've been able to make any headway with the mesh collider trigger issue?
     
    Last edited: Aug 18, 2014
  4. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    I think I did found a solution, it wasn't really about vertices ordering as I thought. It looks like Unity accepts mesh on mesh collision only if both meshes are convex. After setting "convex" to true in MeshCollider option (inspector or code) it works as expected.

    Regards.
     
  5. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Yes, I will be adding this as well as other new features for version 2.0.
     
  6. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi guys,

    it's been a while since I released first version of this package (almost one year and half). First of all thank you all for your feedback. I decided to revamp the package a bit and make more new features for version 2.0. The plan is not to make more primitives, but to create more general mesh editing system.

    The initial plan is:

    * keep the primitives and mesh cutter
    * add mesh editing
    - select and manipulate face/vertex/edge
    - face extrusion
    - split to submeshes/merge/etc
    - mesh subdivision/refining
    * GUI, toolbar with icons to feel more like a modeling system

    If you have more ideas and/or suggestions, feel free to reply here.

    Regards.
     
  7. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    I think the most powerful feature of this package is being about to update the mesh and generate it at runtime. If you are looking for new features I would suggest perhaps implementing a level of detail system where the primitives automatically adjust their detail based on have far from the camera they are. You could also perhaps add a procedural noise or detail layer to the surface of a primitive. For example suppose I wanted to create a liquid metal effect on a sphere or other primitive where the surface rippled. It would be far better doing that procedurally than having to animate a baked bump map for example. It would also load faster if done procedurally. Imagine if at certain points you need to look at one of those spheres very closely, if it was done with a texture and baked polygons at a certain point it would look blocky but if it was done procedurally with a level of detail system it would never become blocky and when you walked away from the sphere you wouldn't have to worry about a high polly count because the level of detail system would just lower its detail.
     
  8. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    242
    Tested the latest version and it seems that the sphere has a tiny bug:
    When you use the normals type 'Face' it only works as expected when you set a tiny amount of the hemisphere factor. As full sphere it looks like vertex normals.
     
  9. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Latest release appears bugged.

    Code (csharp):
    1. Assets/PrimitivesPro/Scripts/MeshCutting/Polygon.cs(137,38): error CS0246: The type or namespace name `ThirdParty' could not be found. Are you missing a using directive or an assembly reference?
    For now I've had to completely gut the cutting plane feature to avoid this error.
     
  10. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    Please try the new version 1.8.5, I have changed namespace of 3rd party library Poly2Tri.dll to PrimitivesPro.ThirdParty.P2T, also renamed the Poly2Tri.dll to P2T.dll.

    The new version should work, I have tested it on windows/android/webplayer platform without any problems.

    If you still see the error, make sure that you have deleted the old DLL file Poly2Tri.dll, from now there is only one dll called "P2T.dll".

    Regards.
     
  11. cchute

    cchute

    Joined:
    Aug 10, 2014
    Posts:
    8
    Hi I noticed a bug with the BOX script. If I have more than one box in a scene, and I change the dimensions of one box, it changes the dimensions for all boxes in the scene. Has this been fixed or am I doing something wrong? Thanks
     
  12. cchute

    cchute

    Joined:
    Aug 10, 2014
    Posts:
    8
    Another note; this only happens when I create the boxes by duplicating another box in the scene. If I create fresh boxes from the GameObject->Create Other menu they act independent from the others.
     
  13. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hello,

    yes, I know about this, if you want to duplicate a primitive, don't use the standard Unity function, but the "Duplicate" button in the primitive inspector.

    Regards.
     
  14. cchute

    cchute

    Joined:
    Aug 10, 2014
    Posts:
    8
    How can I instantiate a BoxPro prefab and then modify it at runtime? For some reason hitting the 'create prefab' does not attach a Box script and hence I cannot edit the box once it has been instantiated. The documentation does not provide information on prefabs Thanks
     
  15. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    sorry for the missing documentation. Please try the new version 1.8.6, I added another option for creating prefab with the script. Now there are 2 buttons "Create static prefab", which creates prefab with exported mesh and material, and another button which creates prefab with material and generation script.

    Regards.
     
  16. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    a new version 2.0 is already on asset store:

    main features:

    Toolbar - activate from Window->PrimitivesPro
    Mesh editor:
    • polygon - vertex - edge editing
    • export to mesh, prefab, OBJ
    • undo/redo
    version2.png

    Any feedback is welcome.

    More mesh-editing features will come in time (extrusion, deletion, submeshes are already on my list).

    Regards,
    RG.
     
  17. Jiraiya

    Jiraiya

    Joined:
    May 16, 2013
    Posts:
    12
    Hi,
    I get the following 2 errors with version 2
    Assets/PrimitivesPro/Scripts/Demo/Demo.cs(115,35): error CS0117: `Box' does not contain a definition for `Create'
    Assets/PrimitivesPro/Scripts/Demo/Demo.cs(508,32): error CS0030: Cannot convert type `PrimitivesPro.GameObjects.BaseObject' to `Box'
     
  18. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    242
    Wow! The new Editor is really cool!
    It's always a pleasure to see how this asset is getting better and better.

    Perhaps it could be useful to have some tooltips in the editor. (Most of the icons are self-explaining, but primitives like the cube/rounded cube are looking very similar.)
     
  19. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    242
    I also have sometimes problems with this. It's mostly a problem of other Assets code when the don't use Namespaces. I guess you have a second Box class somewhere in your project that collides with Primitive Pro. One solution is that you delete the demo scripts from Primitive Pro. Or you can search with your code-editor for the word 'Box' in your project and change the other class code.
     
  20. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, yes, the problem is in the naming collision. You probably have some class or namespace called Box in your code and it collides with Box from Demo. Anyway, I will remove the 'using' keyword from the demo and use the full path, it should help.
     
  21. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    81
    Hi,
    Is it possible to make the UV 's editable: scale, move, rotate ?
     
  22. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, UV editing is in my TODO list, but I cannot promise when it will be done.
     
  23. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    I just created a new update 2.1 with a grid and snapping in mesh-editing mode.
     
  24. dharms

    dharms

    Joined:
    Nov 10, 2012
    Posts:
    26
    Hey reindeer games,

    I have the same issue as above - I'm using whydoidoit's Unity Serializer which has conflicts with the Box namespace. It would take me a while to sift through all his scripts to see if there'd be issues with changing it on his end, but I'll give it a try.

    Is there some workaround for this? I'd really like to use PrimitivesPro as soon as possible, it looks like a great product!
     
    Last edited: Nov 5, 2014
  25. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    please update to the latest version 2.1a, I have just made an update with fixed namespaces in Demo class.

    Enjoy :).
     
  26. alanbattersby

    alanbattersby

    Joined:
    Nov 11, 2014
    Posts:
    2
    Hi,
    I have dynamically created a torus and I want to change its radius using a value input from a slider. The UI part is all working but when I move the slider I get an error.

    Type IDragHandler expected Slider received. i:0. The given key was not present in the dictionary.
    UnityEngine.EventSystems.EventSystem:Update()


    Looking for this on the forums seems to indicate that it occurs when adding a monobehaviour more than once to a gameobject. My slider eventually call this function

    private void UpdateTorusRadius(WheelRec r)
    {
    Debug.Log("Updating torus " + r.ID + " radius: " + r.Radius);
    Torus t = WheelMap[r];
    t.GenerateGeometry(r.Radius,0.5f, 40, 20, 0.0f, NormalsType.Vertex, PivotPosition.Center);
    }

    So is using GenerateGeometry like this the way to do it? Have you experienced this problem?

    Alan
     
  27. alanbattersby

    alanbattersby

    Joined:
    Nov 11, 2014
    Posts:
    2
    I have found the problem which was with my code not with PrimitivesPro, sorry still new to the unity way of working.

    Alan
     
  28. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Great!
     
  29. SuHwanK

    SuHwanK

    Joined:
    Dec 30, 2014
    Posts:
    43
    Hi, I have a question.
    Is it possible to create the Cone according to the light of Spotlight?
    If possible, Can make it a partial Cone access like wall?
    Sorry my bad English.
    so, I upload a png file.
    image2.png
     
  30. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, not sure if I understand you correctly, but you can make a truncated cone like this just by adjusting the cone parameters:

    Cone.png

    If you want to have cone truncated by plane which is not parallel to cone base you would have to use the mesh cutter, create a cone first and then apply the mesh cutter.
     
  31. CplMulder

    CplMulder

    Joined:
    May 12, 2014
    Posts:
    51
    Was about to purchase this asset and the Unity store warned me that it might not work with Unity 5.... could you confirm Unity 5 support?
     
  32. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    I just re-upload with Unity 5, you should not see any warnings anymore. Let me know if you have more problems.

    Regards.
     
  33. CplMulder

    CplMulder

    Joined:
    May 12, 2014
    Posts:
    51
    Thanks reindeer games - I havenow purchased successfully.
     
  34. Scott-Curtin

    Scott-Curtin

    Joined:
    Mar 19, 2013
    Posts:
    14
    Hello- Is there a way to vertex snap while using the Mesh Editor in PrimitivesPro?
     
  35. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, sorry, there is no vertex snapping at the moment, but I will make one, I understand this can be painful while editing, there is only a grid snapping in current version.
     
  36. Scott-Curtin

    Scott-Curtin

    Joined:
    Mar 19, 2013
    Posts:
    14
    Thanks! It's a very powerful tool and I believe it would really help polish-up its feature-set and tremendously boost its usefulness for a lot of developers.
     
  37. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    A little problem.

    I bought this for cutting trees. But... You can try it by yourself.

    Take an original Terrain Asset, "Palm". Cut it.

    It will mix up materials.

    When you get that to work. This is must for RTS game makers ;)
     
  38. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Sorry for problems, I'll check it asap.
     
    JOKaija likes this.
  39. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Thank you.

    I'm using U5.1.1.f1

    Btw. The boolean cutter works just fine. Fine enough, that it shouldn't be disabled by default.
    Only reasonable EASY and FAST way at the moment to cut door and window holes to building meshes (from 3rd).

    Oh. You should rename "Demo" variable/class to DemoX, DemoPrimitive or something, since
    this "Demo" is used so f*cking other demos. These kind of namings will grow a gray hairs for old
    man like I ;)
     
    Last edited: Jul 2, 2015
  40. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Any progress?
     
  41. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Yes, I fixed the material problem, I added option for specifying UV portion of the original texture. Currently it takes the whole texture and map it on the cut piece so it might look wrong. But before I update the asset I need to add the vertex snapping and another bugfix. Should be finished by the end of the weekend.
     
    chelnok and JOKaija like this.
  42. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    the new version is already on the store, it contains option for setting UV for cut face after using mesh cutter and improvements of the mesh editor (settings window, vertex snapping and more options).
     
    chelnok likes this.
  43. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    Mmmm. That Palm cutting seems not to work yet?
     
  44. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi, you have to specify the cross section UV of the material in the cutter option, by default it is (0, 0, 1, 1) which is a whole texture, which is mapped on the cut pice and it looks wrong. Specify just the part of the texture, for example (0.5, 0.5, 0.6, 0.6) and it will use only a part of the texture on the cut polygons.

    Let me know if it fixed your problem.
     
  45. JOKaija

    JOKaija

    Joined:
    Feb 8, 2015
    Posts:
    161
    That palm (and other trees on unity) doesn't use atlas texture only. (btw, I hate it, atlas I mean. Slow
    to edit, slow to create, confusing most of the time. And where is the WORKING unity editor for atlases).
    Those trees uses several independent materials + atlas for leafs.
     
    Last edited: Jul 10, 2015
  46. Weebeez

    Weebeez

    Joined:
    Oct 29, 2014
    Posts:
    9
    When I go to instantiate a Prefab, that I created with object's from Primitive Pro, during run time it is missing all the Primitive Pro objects.

    I see that I can go through and save static objects, but that is per piece. What would be the best way to save objects as a whole to instantiate them during run time?
     
  47. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Hi,

    if you need to instantiate PrimitivesPro object in runtime, don't use prefab and just create it directly in runtime, for example:

    Code (CSharp):
    1.   // create a box primitive in runtime
    2.   var box = Box.Create(1f, 1f, 1f, 1, 1, 1, false, PivotPosition.Botttom);
    3.  
    4.   // create a sphere primitive in runtime
    5.   var sphere = Sphere.Create(1f, 4, 0, 0, NormalsType.Vertex, PivotPosition.Botttom);
    6.  
    7.   // create a torus in runtime
    8.   var torus = TorusKnot.Create(0.5f, 0.3f, 10, 4, 2, 3, NormalsType.Vertex, PivotPosition.Botttom);
     
  48. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    7,258
    What's the purpose of the two create prefab buttons if I can't instantiate the prefabs? I'm hitting the same issue as WeeBeez.

    edit: Looks like I should be using Create Prefab Static instead
     
    Last edited: Jan 22, 2016
  49. reindeer-games

    reindeer-games

    Joined:
    Mar 5, 2013
    Posts:
    547
    Yes, the static prefab button generates a static prefab - geometry + collider, you can freely instantiate it. The other prefab is a prefab that you can use for runtime generation of the mesh.
     
  50. futurewavecs

    futurewavecs

    Joined:
    Jul 26, 2012
    Posts:
    66
    I've read the forum here and looked at the documentation. I haven't actually dug into the code.

    I see you have cube map for setting essentially a different portion of a texture for each side of a cube. How difficult would it be for you to add support for specifying a texture number on a Texture Atlas created using PackTextures?

    I've messed with voxel cubes a lot and have done this myself a half dozen times now. I am looking at your package though and it could potentially make it so I never have to do that again.

    In my voxel implementations of cubes I could specify which texture from the atlas appeared on any of the 6 sides of the cubes. I had other things as well, but cubes were good enough for most needs.

    It'd be really nice if ANY of your primitives could reference coordinates on an atlas to use for their texture. I'm thinking this might not be too difficult to implement if you haven't done so already and I just didn't see it. If you haven't done it and you need some examples or assistance let me know.

    This is very useful for reducing draw calls by having most of the textures needed atlased, and it is especially useful for those of us that actually generate the atlases at runtime.


    Great product by the way!
     
unityunity