« first day (4963 days earlier)      last day (276 days later) » 

14:28
Hopefully this isn't a stupid question, but I understand that it's possible to take a 2D polygon and turn it into a 3d shape using CSGPolygon. All the tutorials I've found so far seem to use simple box and I want to use a very complex polygon to make my 2d shape.
Anyone know of a tutorial that can point me in the right direction?
not sure if that fullty fits, i have this github.com/sr4dev/Unity-SpriteAssist for making some simple 3D things out of 2D shapes
I'm trying to figure out how to do it in Godot. That example is from it working in Unity, but I am having issues with some of the code in porting it over
@AndyD273 Godot 3.x or Godot 4?
14:45
Godot 4
And just to check - are you trying to "dig out" sections from a region (which is what it looks like in the image above - like tunneling a maze sort of) or are you doing the opposite & trying to build together (like trying to build a land mass for a complex island)?
In the unity version I was building up the outside of the shape to make the maze system. In Godot what I'd actually like to do is use CSGPolygon to subtract and carve out the shape
A couple disclaimers - I've worked w/ Godot 3.x, but not 4 & I've used CSG in other systems, but haven't tried Godot's yet. Also, from what I understand, Godot CSG is mainly for prototyping. You might be able to make something w/ it, export it into some other form & then use it in production. But the general gist I get from the docs is it's not intended for production use as.
I think anyway. I'm still super new to the engine, so it's possible that I don't know enough to know what is and isn't a good idea.
15:00
Me either :) I just don't want to sell you on something that might not fit, esp since I'm not using it directly myself.
do you have the different regions stored somehow? My inclination would be to use subtraction mode to remove chunks to get the end result. Like overlapping cookie cutters.
I'm not 100% sure, but since the shape has 'islands' inside it, I don't think you can do it all at once w/ a CSGPolygon.
Because I don't think the polygon supports shapes that have inner & outer parts.
You might be able to do it by subtracting a CSGMesh though - that might actually be easier if you built it up in the Unity approach.
I can probably make sure there are no islands
What was the process you used in Unity to make it?
take a 2d array of size x, y and apply a randomizer to see if the cell is turned on or off. Then it averages out the areas to make larger rooms, and then makes sure that all the rooms are connected with each other.
Then it feeds that 2d array into another class to turn it into a bunch of vertexes, and then gives it all depth
When you generate a room, do you have a list of points that define its perimeter / outline?
15:18
Yes. I wrote it a while ago and I kind of need to go through all of it to remember how everything works
Assuming that you want to use CSG on this, I would trying it in a few steps:
- first get the poly outline for a single room only (this will be for a test & you'll build up from it later)
- use the outline from your proc gen to make a CSGPolygon3D
Yeah, I probably should start out fresh instead of trying to use what I had before, since it's a completely different process...
- use the CSGPolygon3D to "punch a room shaped a hole" into something shaped like a thin sheet cake (baking metaphors all the way I guess)
- if that works, repeat with multiple rooms
- then make CSGPolygon3D's for your connecting tunnels
- cut those out of the cake as well
Cool. I'll give that a shot
But I would research what sort of options you have after that. Like I said, I don't know Godot's CSG well enough to judge it, but the wording in the docs & in other places gives me pause to consider performance. If you're just mocking stuff up, go for it. But it might not be a long term solution - you may need to consider other ways to build out the desired mesh or export the CSG mesh into something more performant.
15:33
The one issue I guess I'll need to figure out is that I want to be able to make these on the fly. What might help is that the maps are all going to be pretty small.
Yes, esp, if it's at level load time or something like that.
If you need real time deformable terrain, well, that's harder & the built in CSG isn't likely to be a silver bullet solution.
It looks like they have an official CSG demo project - if you haven't checked that out yet, I'd give it a look.
If you need some leads other than CSG, they have this procedural geometry starter page - it's pretty light on details, but it has a "Which one should I use?" section & links to things you would need to use / skill up on.
Ok cool. That demo project looks like it could be helpful.
I'll read up on that stuff
Good luck! If you come up with something, consider asking & answering your own question about it - there's lot's of folks that seem to be migrating from Unity to Godot & might appreciate see how you solved your problem.
 
3 hours later…
18:40
I've considered releasing the Cognizer source code.
Not sure if I should; I mean it's almost 10 years old already.
the steam game?
19:03
steam/ios/android
yeah
though the android version is only available at my website
Google PLay has some requirements I can't live with

« first day (4963 days earlier)      last day (276 days later) »