• What Are You Working On? - August 2014
    1,181 replies, posted
From now on whenever anyone has a problem I'm going to tell them that they just did something wrong.
You wouldn't be wrong...
Nor would you download a car but low and behold there are some terrible people out there
[QUOTE=Map in a box;45779227]Nor would you download a car but low and behold there are some terrible people out there[/QUOTE] Wat? What the fuck are you on about? Anyone in their right mind would download a car!
My first 6 dimensional RRT in C++! It needs a better RNG but holy shit, it finally works! [IMG]http://www.plotshare.com/sessions/228239002/Plot1.png[/IMG] Also, turns out programming basic geometry while drunk is a REALLY bad idea.
Oh shit, those look like really good suburban streets.
relaxing meshes [vid]http://webm.zone/i/1sz.webm[/vid] there are 'percent' and 'iterations' parameters, 11s in the video = lots of iterations
[QUOTE=ECrownofFire;45778523]What specifically annoys you in the standard library?[/QUOTE] A) Weird obscure C++ functionality B) So heavily typed it makes my brain hurt, the types aren't uniform across this The best example I can think of is iteration using the find algorithm. If you're looking for something in a map, or a vector etc it will return map::end or vector::end. But if I want to do the same thing on a C++ string, which is essentially just a container ending in a null pointer, instead of returning string::end it returns string::npos. Another example is that each STL container has their own type to represent size and it annoys me that they aren't unsigned ints but I think there's probably a reason for that so I'm willing to let that one slide
So a little update on my hard-drive mapper. I decided to change its display format, because it ended up display absolutely huge swaths of void - regions in time where no files were made at all. I changed the display system to instead be as thus: - The vertical scale represents time-steps. Each time-step gets exactly one vertical element. - Bar width represents filesize. The larger the bar, the larger the file-step. All the bars in a given time-step are superimposed, with the largest bar (ergo, largest files) drawn farthest back. - Bar color represents file density. The brighter a bar is, the more files fit into that [time-step,file-step] bucket. So far, the results are [b]much[/b] cleaner to read, and there is far less void. However, the resulting images are [b]fucking huge[/b]. This was the result of scanning my user folder in Windows (C:/Users/<Account name>/). In total, 59,822 files were scanned. [t]http://a.pomf.se/kwcyld.png[/t] Scanning my entire C:/ yielded in 1,038,533 files being scanned. Java actually ran out of memory trying to write the image to file (though it seemed like it actually managed to [b]draw[/b] the image; it was the ImageIO.write that failed). But that's not necessarily a bad thing, because the image it would have drawn would have been [b]16515 x 84503[/b]. For comparison, the image I showed is only 1187 x 20810. I say "only" lightly. So, yeah. I think I need to consider a better way to represent the hard-drive map, and possibly find a better way to write the image. I also need a better way to represent file density, because over half of all the files scanned fit into the 0-8MB range on 2014-02-24, which resulted in a horrendously skewed density ratio and all the other bars being drawn black. I am thinking of some sort of logarithmic scale, but I am not yet certain on the details. :v:
With Unity [B]finally[/B] getting usable GUI tools, I decided to get familiar with the beta that was recently released. I've been looking forward to this for a very long time and have basically ignored all HUD work on my games because of both how painful it used to be, and how radically different it was going to be. For practice, I decided to try and recreate an Ace Combat style HUD. Even though there's a lack of documentation right now, it was still very easy to set up. The HUD has working numerical readouts, a scrolling tape for the heading, an accurate pitch ladder, a flight path marker, and working target boxes. I'm really happy with how good this looks after only a half day's work. [vid]https://dl.dropboxusercontent.com/u/15133164/UnityGeneral/Unity%202014-08-23%2021-06-27-70.webm[/vid]
[QUOTE=Why485;45782293][vid]https://dl.dropboxusercontent.com/u/15133164/UnityGeneral/Unity%202014-08-23%2021-06-27-70.webm[/vid][/QUOTE] Oh shit that was you posting in the AGDG thread. Nice work man!
Minor update. Revised the graphic system some more. Made it so the bars are a fixed width, and each timestamp interpolates between the minimum and maximum bar widths, using that timestamp's filesize bounds as the range. Here is my entire C:/ mapped out. [t]http://a.pomf.se/sggrty.png[/t] Now I just need to put the colors on some sort of logarithmic scale, to get some more color in there than just black with the occasional sprinkle of color.
[QUOTE=killerteacup;45781314]A) Weird obscure C++ functionality B) So heavily typed it makes my brain hurt, the types aren't uniform across this The best example I can think of is iteration using the find algorithm. If you're looking for something in a map, or a vector etc it will return map::end or vector::end. But if I want to do the same thing on a C++ string, which is essentially just a container ending in a null pointer, instead of returning string::end it returns string::npos. Another example is that each STL container has their own type to represent size and it annoys me that they aren't unsigned ints but I think there's probably a reason for that so I'm willing to let that one slide[/QUOTE] Obscure like what? And what do you mean by heavily typed? And really that's because std::string is not a normal container. It's basically just a dumb wrapper around a C-string. It's a legacy holdover from when before the STL was added to the standard. This is best illustrated by the fact that all of its methods take positions and not iterators. There's also the option to use the "std" namespace versions of find, begin, end, etc. instead of the methods, which always return iterators. Modern C++ has a slight tendency towards this sort of "type class" style (as seen in Haskell, Scala, and others) where you use outside templates and specializations, rather than methods (this will become a very integral part of the language once we get concepts). Mostly because finding a value in a container is not something unique to any container, it is generic functionality that works across [I]every[/I] kind of container. The size thing is left implementation-defined both for optimization purposes and because it's more generic. Also it's kind of a moot point with C++11 now that we have "auto", which solves this problem very neatly. Does it really matter to the user what the size type is? Not really, so we use auto. Just remember that, in practice, all of the major C++ implementations use size_t for all container sizes.
[QUOTE=ECrownofFire;45783372]Obscure like what? And what do you mean by heavily typed? And really that's because std::string is not a normal container. It's basically just a dumb wrapper around a C-string. It's a legacy holdover from when before the STL was added to the standard. This is best illustrated by the fact that all of its methods take positions and not iterators. There's also the option to use the "std" namespace versions of find, begin, end, etc. instead of the methods, which always return iterators. Modern C++ has a slight tendency towards this sort of "type class" style (as seen in Haskell, Scala, and others) where you use outside templates and specializations, rather than methods (this will become a very integral part of the language once we get concepts). Mostly because finding a value in a container is not something unique to any container, it is generic functionality that works across [I]every[/I] kind of container. The size thing is left implementation-defined both for optimization purposes and because it's more generic. Also it's kind of a moot point with C++11 now that we have "auto", which solves this problem very neatly. Does it really matter to the user what the size type is? Not really, so we use auto. Just remember that, in practice, all of the major C++ implementations use size_t for all container sizes.[/QUOTE] The size_t is a C thing that C++ seems to still be using. It's good though, that is what SHOULD be used for anything to do with sizes, be that buffer sizes or whatever. One such reason to use size_t instead of unsigned integers can be seen here: [url]http://en.cppreference.com/w/c/types/size_t[/url]
[QUOTE=mastersrp;45784167]The size_t is a C thing that C++ seems to still be using. It's good though, that is what SHOULD be used for anything to do with sizes, be that buffer sizes or whatever. One such reason to use size_t instead of unsigned integers can be seen here: [url]http://en.cppreference.com/w/c/types/size_t[/url][/QUOTE] i knew there was a reason for this, thank you
[QUOTE=mastersrp;45784167]The size_t is a C thing that C++ seems to still be using. It's good though, that is what SHOULD be used for anything to do with sizes, be that buffer sizes or whatever. One such reason to use size_t instead of unsigned integers can be seen here: [url]http://en.cppreference.com/w/c/types/size_t[/url][/QUOTE] I was speaking more to the point that C and C++ are written to a very generic "abstract machine" that can be run on [I]any[/I] weird platform that could possibly exist. Hell, there's even a macro for the number of bits in a byte (CHAR_BIT). Like theoretically maybe there's a platform that has two types of memory, one is optimized for contiguous access and one is optimized for random access, and they're different sizes. So you [I]could[/I] have different sizes for std::list and std::vector. Though realistically the implementation would probably just set it to the max of the two. [editline]24th August 2014[/editline] Also Map in a box, what do you disagree with on my post? You can't just rate a relatively large post like that with a a disagree and leave :(
-snip wrong thread-
[QUOTE=TheEyes;45785604]-snip wrong thread-[/QUOTE] It was a fun story though. Remember, if you're accused of hacking, it's really a compliment of how good you are (unless you're actually hacking, in which case GTFO) EDIT: Anyway, on thread topic. About to add skin support to my custom deferred rendering engine for Unity. Learned a neat trick: [B]Standard Lambert[/B] max( dot( n, l ), 0 ); // used in basically everything // does not look good on skin [IMG]http://i.imgur.com/C2A93hS.png[/IMG] [B]Diffuse Wrap[/B] dot( n, l ) * 0.5 + 0.5; // used in HL2 // looks better, but not very realistic. too much scattering. need a way to control the amount of diffuse wrap [IMG]http://i.imgur.com/xgvkHtt.png[/IMG] [B]Controlled Diffuse Wrap[/B] ( dot( n, l ) + w ) / ( 1 + w ); // w is amount of wrap from 0 to 1 // still not physically plausible / energy conserving // how to make it energy conserving? // consider a sphere. At w = 0, we have standard lambert. At w = 1, we have HL2-style diffuse wrap - where the light covers twice the sphere. If it covers twice the sphere, in an energy conserving scenario it should logically be half as bright. [IMG]http://i.imgur.com/R3J5cJT.png[/IMG] [B]Energy Conserving Controlled Diffuse Wrap[/B] ( dot( n, l ) + w ) / ( ( 1 + w ) * ( 1 + w ) ); [IMG]http://i.imgur.com/2W5dvUt.png[/IMG] // well, this isn't really skin shading is it? No, but guess what? // if we only do this to the red channel, and leave the blue+green channels as standard lambert, it suddenly looks like skin shading. If you think about it, we're basically using diffuse wrap to simulate subsurface scattering, and then for skin we only scatter the red channel and leave blue+green unaffected :) [IMG]http://i.imgur.com/S3mgNcW.png[/IMG] The browser seems to be kind of screwing up the colors, the blueish color wasn't there nearly as much before I uploaded them.
Could you show some images of the different types? It sounds interesting.
That's actually quite neat. Here's a set of images I made to show the difference; Without [img]http://i.imgur.com/YIOwRvA.png[/img] With ( w = 0.2 ) [img]http://i.imgur.com/FtK1HaK.png[/img] Could do with a bit better tweaking I guess.
And one thing you can do with this is let your artist specify scattering amount in a texture (as different parts of the skin scatter more or less - for instance, ears are thin and scatter much more than, say, the top of the guy's head) EDIT: Speaking of, I've been looking for that model. I had it at one point, and seem to have subsequently lost it. Any idea where I can download it from?
[QUOTE=KillaMaaki;45785877]EDIT: Speaking of, I've been looking for that model. I had it at one point, and seem to have subsequently lost it. Any idea where I can download it from?[/QUOTE] You can find it on this page: [url]http://graphics.cs.williams.edu/data/meshes.xml[/url]
Any suggestions for a Unity tutorial/introduction that's aimed at programmers? I'd like to add Unity to my set of skills since it seems great for making ideas into games quickly but I lose motivation as soon as I open up the environment. I'd love to be able to write code and use Unity as an API as much as possible.
[QUOTE=Darwin226;45785985]Any suggestions for a Unity tutorial/introduction that's aimed at programmers? I'd like to add Unity to my set of skills since it seems great for making ideas into games quickly but I lose motivation as soon as I open up the environment. I'd love to be able to write code and use Unity as an API as much as possible.[/QUOTE] I had the same thought going in, but you'll be struggling for no real reason when you're trying to use Unity as -just- an API. Learn to work with the editor and the environment, it will save you a lot of hassle in the long run.
Alright, so I've been considering getting "The C Programming Language (Second Edition)" aka K&R. However, I am already wondering what tips and tricks you guys have on what books would be called "essential" to purchase? Price is not a (current) issue, but it would be preferable to keep the per-book price below $100.
[QUOTE=mastersrp;45786774]Alright, so I've been considering getting "The C Programming Language (Second Edition)" aka K&R. However, I am already wondering what tips and tricks you guys have on what books would be called "essential" to purchase? Price is not a (current) issue, but it would be preferable to keep the per-book price below $100.[/QUOTE] Google: "book name book author filetype:pdf" and look over the book to see if you like it before investing in a physical copy. I've heard a lot of good things about the one you named, you should definitely look into it
Got skin shading integrated. Without: [IMG]http://i.imgur.com/FlUvJTW.png[/IMG] With: [IMG]http://i.imgur.com/gRBXDgz.png[/IMG]
Finaly started playing with entities! And uhm raytracing. [video=youtube;QN_LG6I9gpk]http://www.youtube.com/watch?v=QN_LG6I9gpk[/video] [img]https://dl.dropboxusercontent.com/u/6696045/Gifs/woo.gif[/img] But there is one problem, i do not have an art style :S, was thinking of going like rollercoaster tycoon. Ain't sure anymore... what do you guys think?
I want to learn C# and make a 3d mapping program like Sledge. What libraries should I be learning to use?
[QUOTE=Ott;45787091]I want to learn C# and make a 3d mapping program like Sledge. What libraries should I be learning to use?[/QUOTE] OpenTK for rendering with OpenGL and general utility (Vector structures etc). Other than that, just the general winforms stuff should do.
Sorry, you need to Log In to post a reply to this thread.