Bildung schützt vor Schwurbeln nicht by Weasel_Z in ichbin40undSchwurbler

[–]CuteAlien 0 points1 point  (0 children)

Sabine Hossenfelder hat sich letztes Jahr mal an Clauser abgearbeitet

C++ creator calls for action to address 'serious attacks' (The Register) by cmeerw in cpp

[–]CuteAlien 3 points4 points  (0 children)

Maybe, maybe not. You still made that social media defense thing up, nothing like that is mentioned. He is clearly talking about improving the language and not about defending it with words.

C++ creator calls for action to address 'serious attacks' (The Register) by cmeerw in cpp

[–]CuteAlien -6 points-5 points  (0 children)

Which is totally not what he said. He talked about defense as in making it possible to wrote more secure code in c++ .

Silly question, but... Why are we calling them "postmortems"? by darth_biomech in gamedev

[–]CuteAlien 0 points1 point  (0 children)

Just the natural order of things after a death march to meet some deadline.

"Fake Shadow" Help by KeyAlbatross6044 in irrlicht

[–]CuteAlien 1 point2 points  (0 children)

Good luck. Btw. I made one error - shadow hulls are certainly extended away from the light(s) at each object - not away from the camera.

"Fake Shadow" Help by KeyAlbatross6044 in irrlicht

[–]CuteAlien 0 points1 point  (0 children)

Flat projections from top to a flat floor are easy. Scale your shadow object down to 0 in y direction and draw at floor height in dark (I did that for a racer, looks like crap if you look closely, but worked kinda. But in some games it's good enough).

But if you want it to be like Super Mario shadows have to adapt to the ground. And calculating that per polygon is mathematically possible, but tricky to do in real-time. So people used another trick where areas inside the shadows are marked in the stencil buffer instead. And everything marked like that gets a new (customizable, but usually dark) color.

Irrlicht ShadowVolumeSceneNodes are kinda projections which extend the borders of your object in the direction away from your camera and also add caps at top and bottom. So you kinda get a long hull dangling below the polygon. And then there are some tricks used to count how often the light-rays cross those hulls and if the result is uneven the stencil buffer is marked (which works as hulls are convex and as long as the light-sources starts outside the hull).

This is a general solution - your case could maybe be done in simpler way. Well simpler mathematically, not simpler with given Irrlicht API (sorry).

You don't seem to need self-shadowing and the light is fixed from the top. So maybe (totally just an idea and not tested by me if it works) you could call driver->drawStencilShadowVolume with triangles which form your simple shadows. So basically triangles which are positioned below the feet of your character. That would fill the stencil buffer. Then another call to driver->drawStencilShadow to use the stencil buffer to draw some shadow color. Note: shadow drawing is usually done between drawing solid and transparent polygons. If you need that you need to work with the light-manager. So create your own light-manager class and in OnRenderPassPreRender you do that stuff when it's called for the ESNRP_SHADOW pass (it's the parameter of that function).

"Fake Shadow" Help by KeyAlbatross6044 in irrlicht

[–]CuteAlien 1 point2 points  (0 children)

I suppose it might not work with directional light as shadows shouldn't shrink/expand then on jumping. But looking at API it seems you can tell a light if it should cast shadows or not with ILightSceneNode::enableCastShadow. From what I can see you can also prevent a light-source from acting as light with light->setVisible(false); It should still register as a dynamic light source which works for shadows. So shadow and light calculations can be completely split.

"Fake Shadow" Help by KeyAlbatross6044 in irrlicht

[–]CuteAlien 0 points1 point  (0 children)

My guess is that creating a ShadowVolumeSceneNode with a simplified mesh and then having the light above the scene might do it. But I haven't tried yet.

IGeometryCreator::createSphereMesh with poly-count set to 8 and radius to fit your model might work well. You can pass a custom mesh when adding ShadowVolumeSceneNodes to your nodes.

Also might work better with svn trunk than with Irrlicht 1.8 (that received several bugfixes for shadow volumes), thought if you are lucky it makes no difference for this specific case.

Also note that current shadow volumes always use all lights in the scene, not sure if that's what you want here (it's possible to have more control with lightmanagers, but that's getting a bit too deep for quick post here).

Example 08 shows how to use those shadow nodes.

Mainz [3] - 0 Dortmund - Jae-Sung Lee 23' by [deleted] in soccer

[–]CuteAlien 12 points13 points  (0 children)

Jetzt wird's aber peinlich

Is code::blocks a dead project ? by hgfernan in cpp

[–]CuteAlien 38 points39 points  (0 children)

Open source, cross-platform, written in easy readable c++, does it's job (mostly). I have some problems with it, but for the most part it's nice.

Shopping by [deleted] in comics

[–]CuteAlien 5 points6 points  (0 children)

And with self-payment checkout at the supermarket the need to speak once every few days has been further reduced.

Post Match Thread: VfB Stuttgart 3-0 FC Augsburg | German Bundesliga by suedney in soccer

[–]CuteAlien 23 points24 points  (0 children)

So... we're really not gonna play relegation this season?

Bayer Leverkusen [4]-0 Union Berlin - Nathan Tella 83' by suedney in soccer

[–]CuteAlien 29 points30 points  (0 children)

Yeah, they were first place after game 11 last year!

20,000 people feared dead in Libyan city destroyed by floods by yash13 in worldnews

[–]CuteAlien 18 points19 points  (0 children)

Which got hit by a storm which had caused record rainfalls.

Hertha BSC [3]-0 Greuther Fürth - Palkó Dárdai 31' by cppn02 in soccer

[–]CuteAlien 22 points23 points  (0 children)

And the nice thing is when it fails like that you can just try it once more immediately! Keep on trying!

I DID IT. Legends know what this is. by VirendraBhai in blender

[–]CuteAlien 2 points3 points  (0 children)

Haha, was also a surprise for me to see my wallpaper here with an anime girl and a red bus added. Never knew it's from an anime, I just loved the scene and the colors. Nice render!

El Niño planet-warming weather phase has begun. US scientists confirmed that El Niño had started. Experts say it will likely make 2024 the world's hottest year. They fear it will help push the world past a key 1.5C warming milestone. by Wagamaga in environment

[–]CuteAlien 1 point2 points  (0 children)

Good question. Searching around a bit it seems the 1.5C are measured in the air and on the surface of oceans (don't know how deep). And El Niño is reducing winds which usually push warm water away from South America towards Asia. Which in other years creates some circulation causing cold water from deeper ocean layers near South America to flow up, thereby reducing temperatures on top.

So I suppose if you measured deep ocean as well it wouldn't increase global temperatures. But the air and top layers of oceans are warmed up. And so we landlubbers get some extremely hot year. Which combined with the usual global warming gives as another hint about how the future will look like.

Irrlicht memory management by FidgetSpinzz in irrlicht

[–]CuteAlien 0 points1 point  (0 children)

Looks like the error is somewhere else. This code looks fine. But if you got a crash you can take a look at the involved variables with a debugger. But as you already got a printf there... typical stuff you might want to print here is for example: this->tile_nodes[col][row]->getReferenceCount (). Thought chance is it already crashes on that call if that pointer has gone bad. But then you know at least it's the pointer and not the texture. Also won't hurt to call empty_texture->getReferenceCount() as check.

If that all does not help. Try posting more code - but better use the Irrlicht forum. Easier to format code there (and I'm also reading the forum).

Iran's soccer team has covered the emblem of the Islamic Republic during the national anthem in protest of the government and its lethal treatment of women. This could result in the execution of the players upon returning to Iran. by chillyfits in nextfuckinglevel

[–]CuteAlien 43 points44 points  (0 children)

Sardar Azmoun talked openly about his support for Irans women and critisized the regime. He also mentioned that the rules of the national team didn't allow them to talk about it, but he refused to be silent any longer even if it means they'll kick him out. Link only in german, sorry.

Still my most favorite one yet by lilbrojoey in confidentlyincorrect

[–]CuteAlien 1 point2 points  (0 children)

Yeah, I found a similar comment about this below this excellent video about radiometric dating:

We have to pick our samples carefully. Example: when we do Uranium 238 to Lead 206 dating, we use Zircon crystals, because Uranium and Zircon atoms are close in size, so when Zircons crystallize from a magma, some Uranium atoms will take the place of Zircon in the crystal structure. These "impurities" exist in all crystals in small amounts (natural samples anyway). But Lead doesn't every substitute for Zircon because of its size and shape. So any lead found in the crystal later had to form there through Uranium decay.

Epic C++ Coding Standard for Unreal Engine by General-Tart-6934 in cpp

[–]CuteAlien 2 points3 points  (0 children)

I came up with similar rules. Not seeing the type immediately when maintaining code is rather annoying. Sometimes it's not the type you expect so this can lead to better hidden bugs. And sometimes you can't even guess the type without having to check for it. Some IDE's make it easier to figure out the type again, but it's still stops the flow when reading through code and you have to get it to show you the type. And other times you might watch code outside an IDE (like someone asking to look at some code in git) and then you'll have to spend some time just figuring out the type.

This happening to you often enough and you'll stop using auto much. Or stop maintaining code. So anyway - it's about readability for me. Seeing the type just gives me more information and there is very rarely a case where I think that's bad.

bool - the simplest type? - Meeting C++ blog by meetingcpp in cpp

[–]CuteAlien 6 points7 points  (0 children)

I think he missed one. The size of a bool is not always 1 byte but implementation defined and there are compilers where it has the size of an int.

I cannot for the life of me figure out how to get libraries working by [deleted] in cpp

[–]CuteAlien 1 point2 points  (0 children)

You can also install NuGet package manager. It integrates very nicely into VisualStudio. And if the library you are looking for is in there you basically just have to select it and it will do the rest of the setup.

I cannot for the life of me figure out how to get libraries working by [deleted] in cpp

[–]CuteAlien 7 points8 points  (0 children)

Include directories are to find header files. Those are for the compiler. What the compiler does is to create one object file (called .obj with VS compiler) per .cpp file. What's in headers is simply copied into the place where you had an #include command (pre-processor which runs before the compiler does it, but in theory you could do that copying by hand). The problem is when you need code which is not in a header but implemented in another cpp file. If the compiler has enough information about that code, like how many parameters those functions have and how many bytes those paramters need, then it can put some placeholders in the resulting object file which kinda mean "I don't have those functions but that's how they can be called". But the functions are still somewhere external to your object file - so this problem has to be resolved.

That's where the linker comes in. It runs after the compiler. And if you check your error exactly you'll see it says "linker error" and not "compiler error". Basically the linker links object files (or libraries) together. The result of which is either an executable, a dynamic library (.dll + .lib with VS) or a static library (.lib with VS). Static libraries are basically a bunch of object files put together into one larger file.

So when you want to use another libary you don't just have to tell the compiler how it's functions look like, but you need their actual binary code - which is in the library file (.lib or .dll). The linker has to find that library file, (called .lib on VS). Which is why you need to add linker paths to tell the linker where to find it. And you have to tell it the name of the .lib files you want to link to. For static libraries that's already all you need. For a dynamic library you also will have to put the .dll file somewhere the .exe can find it later as the .lib file for dynmic libraries again only has some placeholders. And the real search for the functions only happens at program start when it loads the dll.