Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

  • Days Won


Green_Baron last won the day on June 27

Green_Baron had the most liked content!

Community Reputation

87 Neutral

1 Follower

About Green_Baron

  • Rank

Personal Information

  • Role
    Amateur / Hobbyist
  • Interests


  • Github

Recent Profile Visitors

2394 profile views
  1. Well, software that just works will be found on Linux, but rather on Debian or Gentoo than Ubuntu or Mint. Too much bloatware and undocumented "free" software in the latter. And i just wouldn't run a graphical surface at all on a safety critical system. What for ? Also (to stay with the paraphrases of a sinking ship :-)), on such a system one might want to throw overboard the systemd and replace it with something more safe & sound, which pretty much excludes Ubuntu since, from what i have read, the integration is too strong. I admire your work, i wouldn't be able to do that or would die of old age over such a task. And, though i have not experienced the bad old days myself, i really think things (especially graphics drivers for Linux of the main vendors) have vastly improved in the past. I don't have AMD (yet), but an old intel HD 4400 in the notebook and GTX 660 and 970 in my pcs. The Notebook can "only" run OpenGL 4.5, but that's fine for me. Back in the day i would, as @_Silence_ said, install nvidia via the downloaded script, but now the drivers are in the repositories (418.74 for Debian) and thus seamlessly updated with the usual update cycle without manual interaction. It is, of course, a pity that the free nouveau driver is so bad, but if i am not mistaken that's mostly Nividias responsibility because they don't work together with the open source community. So those guys have to reverse engineer ... Am reading (and trying to understand🤔 ) "Real Time Rendering" by Akenine-Möller et.al. I think it really is a very rewarding and aspirational goal to completely implement even a subset of these completely from scratch, without building on the fundament of available APIs and drivers. One can just accomplish so much more using these fundaments. "Standing on the shoulders" and all that 🙂
  2. Rather recent drivers are in the repositories, if one allows non-free ...
  3. As a first step to generate height maps on my own i started incorporating the algorithms of libnoise (c) by Jason Bevins, under the LGPL v2.1 or higher. It has never been easier to get noisy. Mapping a texture to a sphere or near spherical body is trivial, But when it comes to 'Oumuamua shaped objects things get distorted: Surface normals computed in two different ways, geocentric vec3 centricSurfaceNormal( const vec3 pos ) { return normalize( pos ); } and geodetic vec3 geodeticSurfaceNormal( const vec3 pos ) { return normalize( pos * u_oneOverRadiiSquared ); } Normals combined vec3 normalG = geodeticSurfaceNormal( position ); vec3 normalC = centricSurfaceNormal( position ); vec3 normal = ( normalG + normalC ) / 2.0f; vec2 texCoord = computeTexCoord( normal ); and height values looked up from a spherical height map vec2 computeTexCoord( const vec3 normal ) { return vec2( atan( normal.y, normal.x ) * c_oneOverTwoPi + 0.5f, asin( normal.z ) * c_oneOverPi + 0.5f ); } and then float height = texture( s_texture, texCoord ).r * u_heightFactor; displacedPosition = position + ( normal * height ); Still, between the two methods, there are vast open plains, so to say, only the centre area and the east- and west-poles are noisy. I'll probably have to generate the height maps specifically for the assumed ellipsoidal shape of the bodies that will use it as clothing. And what about two- or multi-lobed objects ? 🤔 Tricky terrain ahead ...
  4. Green_Baron

    Weird circular orbit problem

    Correct. ~43 arcseconds/century are on the expense of spacetime curvature.
  5. Green_Baron

    Weird circular orbit problem

    <smartass> And that's why its orbit precesses because of Schwarzschild spacetime ... </smartass> 🙂
  6. I assume it is the Phong model (and its derivatives).
  7. Green_Baron

    Best choice of laptop for developer/casual gamer?

    Have a look at these (but they are in Germany): https://www.linux-onlineshop.de/en/Linux-Hardware/Linux-Notebooks/Mobile.tuxedo# For 1700,- you could get one really mighty thing. Gamer versions hang a little higher, but still in range. I own a super flat, super light long battery life version one. Nifty thing, matte display, aluminium brushed finish. And it comes completely without any software. Not.a.single.byte. Runs perfectly with Debian. Depending on which side of the pond you are it may not be worth the efforts ... idk.
  8. Green_Baron

    Centering a Ball on the Screen

    That's a different video than the one i reacted upon in my post. Is your problem solved ? Because it seems that it is the camera that stays in position in relation to the terrain and the ball moves around as the camera turns. I thought you wanted the camera moving around the ball. Seems i misunderstood ...
  9. Green_Baron

    Centering a Ball on the Screen

    For reference, code of a working orbiting camera. 1.) Initialize camera vectors on setup: m_target is the position of the ball, translated to for example 0/0/0 m_position is the initial camera position, set to for example m_target - vec3{0,0,5} glm::vec3 direction{ m_target - m_position }; m_distance = glm::length( m_target - m_position ); m_yaw = glm::degres( std::atan2( -direction.x, direction.z ) ); m_pitch = glm::degrees( std::atan2( direction.y, std::sqrt( ( direction.x * direction.x) + ( direction.y * direction.y ) ) ) ); I use degrees because intuitive and makes more sense on display. 2.) In your render loop, after having processed input: float yaw{ -glm::radians( m_yaw ) }; float pitch{ -glm::radians( m_pitch ) }; // Calculate the camera position on the sphere around the target m_position = glm::dvec3{ m_distance * std::sin( yaw ) * std::cos( pitch ), m_distance * std::sin( pitch ), -m_distance * std::cos( yaw ) * std::cos( pitch ) }; // Normalization not necessarily needed here. But later when buidling the frustum. m_front = glm::normalize( m_target - m_position ); // conversion to float because precision isn't needed here m_viewMatrix = glm::lookAt( glm::vec3{ m_position }, glm::vec3{ m_target }, m_up ); // Also re-calculate the right vector. Normalize for later use m_right = glm::normalize( glm::cross( m_front, m_up ) ); m_projectionViewMatrix = m_perspectiveProjectionMatrix * m_viewMatrix; Code for an orbiting camera. Projection matrix is only calculated when viewport or near/far planes change. If you want to change the distance for example with the mouse wheel, you must recalc it in the loop. You will want to use pitch and yaw from the ball, so that the camera is following it. Also, maybe you will want to limit camera movement to the y/z plane, which should be trivial now that you have read the linear algebra things 😉 No guarantee ;-). Edit: looks like you have deleted the video and thus invalidated my post. The camera in the video was still freely turning and not locked to the ball.
  10. Green_Baron

    Atomic shared pointer

    I have little experience with std::shared_ptr, only use it in very view places, but any info interests me. First, my question would be what is the exact problem with Gnollrunner's opinion on shared_ptr ? I have seen quite a few "home brews" of shared or reference counted pointers and that not only in ancient code. It would be nice, for the less experienced among us 😉 to know the reason, if it is technical. For my naive understanding the so called smart pointers are all about ownership, not about regulating access to their objects. It is application responsibility to ensure that no undefined behaviour happens, in this case to take care of possible race conditions, like one would do with any other object, except for the reference counter and object destruction, that's responsibility of the shared_ptr. Am i wrong ? Edit: but https://en.cppreference.com/w/cpp/memory/shared_ptr/atomic2
  11. Green_Baron

    Centering a Ball on the Screen

    ??? Element wise multiplication, results in a new vector. These are the very basics you must know, or any attempt to help you will fail. Sorry for being so blunt ... https://learnopengl.com/Getting-started/Transformations
  12. I am having difficulties with my imagination. Is it correct that a single, untessellated patch has the correct winding order all over its area ? Drawing normals can reveal that. If not, then the order of the indices comes into my mind (if you're drawing elements), otherwise the order of the vertices as they are listed in the array buffer. But if the switch happens in the tessellation stage, i would assume that there something gets out of order, but i need more info for a better guess ....
  13. Green_Baron

    How math is used in game development?

    Hmhm, it executes ... or not. Mine usuallly not on the first try ... 🤔
  14. Green_Baron

    Text rendering really slow

    The OpenGL SuperBible has an example of rendering quads and bitmaps, called "alienrain". The source is on github. Just for completeness, maybe it can be helpful .... 🙂
  15. Green_Baron

    How math is used in game development?

    All examples use some "math" somewhere. Do you mean puzzle games ? (like e.g. "2048") More game than math :-) Or something more complex ? More math than game ... Or something in between ? Some more specifications are welcome ...
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!