Jump to content
  • Advertisement

Vilem Otte

GDNet+
  • Content Count

    840
  • Joined

  • Last visited

  • Days Won

    3

Vilem Otte last won the day on August 23

Vilem Otte had the most liked content!

Community Reputation

3088 Excellent

5 Followers

About Vilem Otte

  • Rank
    Crossbones+

Personal Information

Social

  • Twitter
    VilemOtte
  • Github
    Zgragselus
  • Steam
    Zgragselus

Recent Profile Visitors

28254 profile views
  1. Not really - the only way to write/read/copy buffers between host and device are: clEnqueueCopyBuffer - one cl_mem buffer to another cl_mem buffer (e.g. copy on device) clEnqueueReadBuffer - device cl_mem buffer to host memory (e.g. device -> host) clEnqueueWriteBuffer - host memory to cl_mem buffer (e.g. host -> device) clEnqueueCopyImageToBuffer - image object into cl_mem buffer object clEnqueueCopyBufferToImage - cl_mem buffer object to image object clEnqueueCopyImage - image object to image object clEnqueueReadImage - image object to host memory clEnqueueWriteImage - host memory to image object These are the commands that enqueue read/write/copy operations into command queue. Additionally you can: clEnqueueMapBuffer - maps region of cl_mem buffer object to host memory clEnqueueMapImage - ditto for image object clEnqueueUnmapMemObject - unmaps previously mapped object (either cl_mem or image object) Compared to CUDA you will however have to pass in pointers as kernel arguments (their memory can be initialized in advance of course). Kernel arguments don't usually hold too much data (mostly just few variables, and pointers to memory that is going to be used). Out of curiosity (as not many people use OpenCL) - if you can share - what are you trying to do?
  2. In OpenCL you have 4 address spaces (OpenCL 1.1): __private - for every work item __local - for all work items inside work group __global - for all work items inside whole NDRange __constant - for global read-only variables In addition OpenCL 2.0 (pass in -cl-std=CL2.0 into clBuildProgram), which allows for variable in program scope and static variables to be declared in __global address space. They may be initialized with constant expressions only in code.
  3. Let me quickly explain what is the difference between these 2. Both are just numerical method of determining ray vs. heightfield intersection. So the situation is like following (black is your heightfield, red is your camera ray, red start is point you want to find): POM goes the most naive approach of finding numerical intersection between those 2 - first you take the interesting part of the ray (bounded by 0 and 1 (multiplied by 'height factor')), then you split the line into N same intervals and go from the first point to the last. For each point you detect whether it is below or above from the height field - if above, you continue with next point. If below you terminate computation because result is calculated from last 2 points. The following image illustrates it (with N = 4) steps: The green horizontal lines represent upper and lower boundaries in search - 4 green dots represent 4 samples to test, you go along the direction of ray - from upper left, to lower right. First 2 points are above, third point is below - at this point you can terminate search and calculate result (therefore it is marked with yellow star), last point is drawn only for the sake of completeness of the image. Relief mapping actually performs a second binary search, I will sketch that zoomed in: E.g. that after you find an interval where intersection is, you split that interval into half and determine in which half intersection is (and continue splitting for M binary steps in the one where intersection is). The resulting point is the result. This of course means that relief mapping can be more precise than POM, although requiring 2 searches and therefore more samples. You can also calculate using last 2 points in relief mapping (like in POM way), giving you additional precision. Edit: In short - your implementation is correct, POM doesn't work well under grazing angles without enough samples. None of parallax-mapping algorithms performs well under grazing angles (maybe with exception of Quadtree Displacement Mapping) - they're just faking the effect in the end. If it is just subtle - it is hard to recognize and increases image quality, but for any larger displacement, only tessellation and actual displacement mapping will save you.
  4. Which may not be as straight forward as you think. In which case you're looking at triangulation of boundary (general - e.g. can be concave). In 2D the solution exists with sweep-line algorithm, let's assume you have a generic N-gon (representing your boundary), like: Now from top you go with sweeping line, stopping at each point, like: Each time you start with inner loop (a hole) you slice from last vertex to this upper point. And each time you finish a loop, then you slice to next vertex to the lower point - this will de-compose your N-gon to multiple N-gons without holes, like: Then you do the sweeping line for each of the resulting N-gons, first (dark blue) decomposing to convex polygons only. And then 2nd time to triangulate the convex polygons (which is straight forward - as you can always slice to the last-right or last-left (depending whether you're on the left or right) vertex. Like: and This actually works very well in 2D, because you can triangulate any N-gon without too many problems. It can be transitioned into 3D to some extent - e.g. you project your points along specific direction and then you're pretty much working in 2D - and then you push your points back (there will be some scenarios for terrain where this may fail - but those would require overhanging cliff for example). What you would need for this to work is to have ordered set of points forming a boundary, and a direction of projection (which is a bit problematic). Edit: If I'm not mistaken this also is called sweep plane algorithm for boundary triangulation. This may be one of the easiest way to solve your problem - it will though ignore all the inner points of your geometry which will cause the terrain look quite ugly (it will look plannar-ish - most likely for the direction of projection you choose). This assumes you want to only keep the boundary and ignore all the inner vertices! If you want to keep ANY your inner vertices than the approach has to be different (or you could insert the most important ones as holes ... and then also triangulate those holes ~ the problem then would be, how to select the most important vertices in the center)!
  5. Delaunay triangulation will always triangulate ALL points you put into the algorithm. In case of geometry to have LOD/like triangulation you need to take out points and re-triangulate mesh from subset of original set of points. Which points to remove though? This is a tricky one - multiple heuristics exists (F.e.remove one from closest points until you reach the amount required, or based on the normals of original triangles that contain the point, or ...). Also make sure to not remove the ones on the boundary. To retain borders, as you know which points are on borders from delaunay triangulation of whole set, you just assign those points infinity value for your heuristics - therefore they will never get picked. Interesting approach would be using neural nets to determine which point to remove will cause the least impact in the mesh (given F.e. distance to closest points, normals of triangles that have the point, etc. ... as inputs). This way you could let neural net learn which points to remove (not sure if anyone tried it so far). This could result in very good heuristics to optimize delaunay-triangulated mesh.
  6. This whole hammers down to one problem - what you want to store in your voxel data. I did some research, measured performance of various approaches - and the most stupid way, of storing directly results of lighting in voxel data, and as 3D textures, were the winner. Although to be said, the game is using only dynamic lighting and lots of dynamic objects (be it physics or animated) - for this scenario storing normal and color (and injecting light) is a too heavy hit in performance (and doesn't bring in any advantage), as you will need to do it for many (if not all) lights. SVO may be an option - but due to previous, light bricks would need to be re-built constantly. If OP wants difference comparison for lambert vs. oren-nayar vs. disney diffuse F.e. inside VXGI, I can provide those - although probably not earlier than tomorrow. Sadly, I'm way too busy today.
  7. @JoeJ I've implemented several variants - with octree and without octree. Currently I do use version without octree in production - while octree uses less memory (it's not that much less, considering that you still need to store 'bricks' in 3D texture to get hardware filtering), creating it or updating it takes simply too much time. For performance reasons (and due to requiring support for physics heavy scenes - e.g. lots of dynamic objects) I was even more aggressive, and at current point I don't even store anything apart from resulting direct diffuse color in 3D texture for VXGI/reflections. It is just single bounce GI then, yet good enough for most cases - and fast enough to run on laptops with integrated GPUs.
  8. For which I can clearly state that it's possible to get a work in industry without having a degree. I've done some business (and software development) for Israeli-based corporation. Their developer was from Ukraine and didn't have a degree. It will always boil down to individuals, their skills, experience, will to work, etc.
  9. While I do agree with you @L. Spiro ... sigh ... I have to be perfectionist now. Isaac Newton studied on The Kings School in Grantham (1655 - 1660), then Trinity College in Cambridge (1661 - 1665, where he finished BA, and school was closed due to Great Plague), and later in 1667 he returned to Cambridge to finish MA (which he finished in 1669). Note: To be fair though, unless you're interested in physics and history, this is not really a common knowledge.
  10. @Fulcrum.013 University isn't the only way how to get knowledge. The main purpose of university is to keep students motivated to learn and to help them access the knowledge (or research) they have (which universities, at least in Europe, have publicly available to general public, not just students). In the areas which are my hobbies I never finished a degree (yet I've had numerous lectures in the areas, as it was possible to take them while on university ... also, bonus credits!). Yet I don't work in those industries, and I'm just a hobbyist. I may although join one at one point - as I'd like to start a company in that area too. From experience, I have to disagree with @Oberon_Command - universities often tend to participate in research, and be as state of the art as possible. This will of course fluctuate based on quality of the university and of course professors and assistants themselves (on university where I studied this fluctuated a lot - some subjects were really state of the art, while some were quite outdated). University projects were sometimes quite large though, yet only voluntary. I spent quite a time in graphics laboratory there - there were just few people regularly visiting (3 or 4). Worked on state of the art GPU path tracers in there (these were under contract in the end - so it also helped me financially, and I was working in a team - very good experience), also some image processing effects, etc. In addition most of the people who did master's (or beyond) actually worked either for some company, or had contracts which required them to actually work with the code - most of them work either in the software industry now, or started their own company in software industry. The ones that weren't coding in addition (to help them solve problems, to earn some money on side or to get more experience ... whatever was the motivation), they simply don't work in the industry at all. This was truth for EVERY branch (be it computer graphics, artificial intelligence, etc.) that was on the university.
  11. Vilem Otte

    How do you build your learning roadmap?

    I would suggest joining a Gamedev.net challenges (as @jbadams surely wanted to suggest ūüėĀ sorry I had to). As per suggestion, pick a project and work on it. I often also make a quick roadmap/notes for what needs to be done (Wunderlist or Todoist - or even a TODO list in spreadsheet are good). Where you can track your progress. You can even go for source control along with it (gitlab/github support issue tracking, or gogs if you want something lightweight). I'm mostly building an MVP - Minimal Viable Product - as fast as possible it should contain everything what final game, without art, animations, etc. But already playable. Then I focus on each area separately and improve. So far this approach pushed me even to finish multiple game jams (like Ludum Dare), which have a strict time constraint added to build full game. It depends, if it is something brand new - then papers (sometimes you can do your own research), for well known things mainly books. Sometimes interesting articles on web. Game programming doesn't really differ from programming in general (at least from my point of view), it maybe incorporates more hacks and workarounds (or at least you see them more often) - which are unacceptable in other areas. Therefore game programmer should be able to solve most problems other programmers can.
  12. From the second part of barricade - I do have master's degree (in computer graphics and image processing) from university ... still considering whether to go for PhD or not (I've finished just 2 years back or so). In the end it is up to you, a master's degree in such area is going to take a lot of time and effort - and it's not an easy task to do (less than half dozen students finished with me that year, although hundreds started the study program). Compared to others I had huge advantage of not having to pay for university (just indirectly through taxes), and a supportive family (all of my siblings and both parents have master's degree either in informatics or pedagogy - so not going to university wasn't really an option) ... these things are also important to consider, because it will cost you. Having a degree helped me a lot when starting the company, especially when getting contracts (and yes, published research is considered a big plus in your portfolio). Yet again I have majority of my work experience in research, some in actual software development (majority is actually unrelated to game industry). Although the main decision point for other businessmen is to show them portfolio - some finished products that are successful, and ability to rapid prototype what they need. Last note, compared to other people here on the forum, I've never actually worked in the office in "normal day-to-day job".
  13. Vilem Otte

    Intellectual Property and Clone Games

    I personally don't think frogger game mechanics is the problem, the name 'Frogger' on the other hand may be. Also, as soon as you have your own art - there is no problem in that. If everything goes well (with my time management mainly), I will have the game for Frogger completed too - although I took a bit different approach to the game than you (I'm not even trying to make a clone - just to satisfy the rules).
  14. Vilem Otte

    Working on Materials - Lava Based

    What are you making materials with?
  15. Vilem Otte

    Use orbiting planets in 4x game?

    @1024 I get what you mean, exactly - and that is road straight to hell - let me point you back to the note that moving ships between the planets is necessary (as stated above in the topic), and I guarantee you that without physics you CAN'T make a believable motion of the spaceship in an easy way (the math required for the computation of the path is way too complex). With anything more simple there will always be problems of: Going through or too close to other planets Don't flying between the circles for orbiting planets Going through stars etc. Not to mention multi-star systems - that will make even more mess when you try to move ship around. That is why I pointed out that physics is necessary, as it makes these things easier.
  • Advertisement
√ó

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!