Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Geometry algorithms #12

Open
22 of 28 tasks
BasmanovDaniil opened this issue Jan 6, 2018 · 5 comments
Open
22 of 28 tasks

Add missing Geometry algorithms #12

BasmanovDaniil opened this issue Jan 6, 2018 · 5 comments

Comments

@BasmanovDaniil
Copy link
Member

BasmanovDaniil commented Jan 6, 2018

https://github.com/Syomus/ProceduralToolkit/wiki/Geometry-algorithms
http://www.realtimerendering.com/intersections.html

D - Distance
C - Closest point(s)
I - Intersection

2D Line Ray Segment Circle2
Point D, C, I D, C, I D, C, I D, C, I
Line D, C, I D, C, I D, C, I D, C, I
Ray D, C, I D, C, I D, C, I
Segment D, C, I D, C, I
Circle2 D, C, I
3D Line Ray Segment Sphere Circle3
Point D, C, I D, C, I D, C, I D, C, I -
Line I - - D, C, I -
Ray - - D, C, I -
Segment - D, C, I -
Sphere D, C, I -
Circle3 -
@MarcusElg
Copy link

can you explain what you the point of this is? How does it affect the generators?

@BasmanovDaniil
Copy link
Member Author

@MCrafterzz Some of the more advanced generators require robust geometric primitives and algorithms, a recent example of this is the roof generator. As of now it is possible to generate polygonal roofs, but that was not the case before the introduction of the geometry library. Or, say, you want to make a city generator and you need to find an intersection of two roads, Unity doesn't provide any tools to solve that problem, but with the new methods it is quite easy. 3D intersections are less useful, so while they can still be helpful for spawning and in some other cases, I would prefer to test and optimise the existing methods, rather than investing further in 3D. This page is here mostly for completness, it would be nice to be able to find a distance between 3D lines, but it is not a pressing issue. Ideally I would like to have a feature set similar to Physics, maybe the new API in 2018.3 will solve that.

@MarcusElg
Copy link

Intresting thx for the reply. A procedural city would defently be cool, is that something planned or is it just possible to use this library for it? The building generator looks very useful will probably use it in the future. What are the plans with this library, most issues are just these geometry things.

@BasmanovDaniil
Copy link
Member Author

@MCrafterzz, The current plan is to develop the building generator into something more useful and aplicable in real scenarios, and as a means to that I am playing around with city generation. Don't expect to see the city generator any time soon though. After that I intend to focus more on 2D generation such as dungeons, caves and floor plans, I already have working code for all of this, but it will require vigorous refactoring before the public release. I will try to move some of the tasks from my private tracker to github issues during this weekend so there will be something else besides "geometry things" 😄

@MarcusElg
Copy link

Please post your city generation progress here on github even though it isn't finished, would be cool to see!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Geometry
  
In progress
Development

No branches or pull requests

2 participants