Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - redbullmarky

Pages: [1]
1
Graphics / Re: Help with general approach
« on: December 29, 2024, 10:45:54 am »
That is exactly the kind of thing I'm after! Thank you so much for the term and particularly the examples!

As a follow-up - would I be right in thinking these would be useful for simple/symmetrical shapes, rather than perhaps an arbitrary shape passed in as a Vertex Array? Looking through the shape examples in the link above, most of them have a predictable distance calc due to the fixed nature of the shape.
But because generally the plan is to be stretching these things via PBD, I'd need control over the individual vertices that make up the shape.

The above techniques/examples you linked will certainly come into play for certain things I have planned though for sure!

Mark

2
Graphics / Help with general approach
« on: December 28, 2024, 08:02:19 pm »
Hey, all!
I'm hoping to get a little bit of help with *approach* to something. I'm pretty new to SFML (and more involved graphics programming/OpenGL/etc in general) though have been coding in various languages for ~30years.

To "simplify" my case, let's just say:

- I have two circle shapes, both filled with a colour, and with a 2px black "cartoon" border.
- When the two circles collide, I want them to join (based on an arbitrary distance constraint). I'm imagining some kind of inward curve that joins the two closest outer points of the circles on each side (like you might expect two droplets of liquid to merge when they get close). Any borders within the combined shape would cease to exist, but...there'd still be the overall outer border.
- These (with certain conditions) could be separated too back into their original shapes (but that's for more context, not sure it's relevant yet to the problem)

I'm thinking that I cannot use the regular SFML circle shapes. These circles will be soft-bodies. I'm thinking that maybe shaders come into play (which I have no experience with). I've also seen suggestions mentioning things like stencil buffers, etc - again, also alien to me!

It's the sort of thing that (with plotting individual pixels in code) I could probs work out, but as the shapes that combine are soft-bodies, I want to at least *approach* things in the right way so things don't choke.

I don't necessarily need code, but suggestions such as:

- "I would use xyz library / look into xyz to deal with the combining of shapes into a single mesh"
- "SFML definitely cannot do this out of the box"
- "You need a shader to outline the overall shape"
- "Here's a demo of two outlined objects combining and coming together in a squidgy mess" (in ANY language)

And so on. Because at least I can bark up the right trees on my quest to figure things out and ask better questions :)

Cheers & happy new year, all.
Mark


Pages: [1]
anything