• What are you working on? v66 - February 2017
    558 replies, posted
[QUOTE=Ziks;51780681]I've got a web server that extracts the data from the game files when requested, and sends it back as json (with vertex data etc compressed).[/QUOTE] and then you use that data in three.js or something? But then how are you going to handle texture data are you going to write some VTF-reader in three.js(or whatever you are using) or are you going to convert it to jpg's or some other format. And are you loading the map as a whole or streaming some chunk of the map? and are you rendering only the visible part? sorry I ask so many questions, but I don't know mutch about WebRendering.
[QUOTE=frietje2008;51780699]and then you use that data in three.js or something?[/QUOTE] I started out just using it with threejs, but I had to handle rendering the map myself with WebGL calls to get the performance to be acceptable. [QUOTE]But then how are you going to handle texture data are you going to write some VTF-reader in three.js(or whatever you are using) or are you going to convert it to jpg's or some other format.[/QUOTE] I've already got VMT / VTF reading done, at the moment it converts VTFs to a PNG at the LoD level you request. I might try just sending the raw DXT data to the graphics card though. [QUOTE]And are you loading the map as a whole or streaming some chunk of the map? and are you rendering only the visible part?[/QUOTE] It's streaming it at the moment, yeah with only the visible part being rendered. When the client first connects it downloads the bsp tree for the map, which it can use to work out which leaf the camera is currently in. Then it can download the PVS for that leaf (if it doesn't have it already), which just references the other leaves visible from the current one. Then for any leaves that it doesn't have face data for, it downloads that data from the server. [QUOTE]sorry I ask so many questions, but I don't know mutch about WebRendering.[/QUOTE] No problem!
Well I have some free time the upcoming weeks so if you need any help or want me to test anything, don't hassle to contact me. I would love to help develop this project of yours.
[QUOTE=Ziks;51780573][img]http://files.facepunch.com/ziks/2017/February/05/chrome_2017-02-05_19-14-41.png[/img] I still don't know if there's a proper way to find that value.[/QUOTE] Vertex offsets both on the mesh structures and the model inside the MDL file. You have to match them up with the ones in the VTX file. [editline]5th February 2017[/editline] Oh and one value is in bytes and the other in vertex count due to Reasons.
I started working on my planet renderer after a small break, I added networking support, residual and vectorial data, skeleton based animation and particle system. Here's the [URL="https://hiredk.com/2017/02/05/modern-planet-rendering-networking-roads-and-particles/"]article[/URL] and a video to showcase the new features. [video=youtube;uAZ09uhO7JM]http://www.youtube.com/watch?v=uAZ09uhO7JM[/video]
This definitely isn't top quality but It's still something I feel would be handy for anyone who has a Roku. Since top browsers like Google Chrome or Firefox don't natively detect Roku as a castable device. I've decided to make my own workaround using the API it provides. [URL]https://gist.github.com/mrpotatofactory/fe5dc83590ad0c6607dbef0306b763d5[/URL] Part 2 is me to stop using app inventor and try learning Java
Just got back my first batch of data from my plugin, after I bang out the rest of my documentation, it's going in for review! Pretty excited. Here are some quick, rough, and not at all professional representations of some of the data I got back from bigQuery [quote] Distribution of the number of times people shared the app on social media vs their win rate. [quote] Y axis; Winrate X axis; Social shares (distributed by density) Red line; visualized X axis (because the data group has value) [/quote] [t]http://i.imgur.com/arU68an.png?1[/t] Distribution of the number of ad impressions vs player level (sum, not average) [quote] X axis; Level Y axis; # ad impressions [/quote] [t]http://i.imgur.com/jPEvjMm.png[/t] Player win rate vs how many sprinkles they have (sprinkles are an in-game currency) [quote] X axis; # sprinkles (dist by density) Y axis; Winrate [/quote] [t]http://i.imgur.com/Wk2mdKv.png[/t] [/quote] Edit: I realize this probably isn't as exciting to everyone else, but as it stands, there aren't really any big data solutions for Unity, this means I would be a first mover into the market which is pretty great.
Hi all, last time I poked in here I was real proud of my CPU-based Marching Cubes implementation. Almost immediately I realized that wasn't going to cut it (15 FPS in VR is surprisingly uncomfortable!) so I learned a bit about compute shaders and GPGPU programming and fixed things up a bit: [media]https://www.youtube.com/watch?v=VN4yYeb9Xm4[/media] Updating a 16^3 voxel volume every 0.05 seconds doesn't quite consistently hit 90 FPS on my i5 2500k / GTX 980, but SteamVR reprojection masks the small delay perfectly and it still comes out looking buttery smooth. Need to optimize more and play with the update rate some so that we're not totally relying on reprojection to keep people from throwing up, but it's a pretty massive improvement over the CPU version, and my first time doing any proper GPU programming! It scales up incredibly well too, a 32^3 volume runs just about the same, whereas on CPU it was pretty much unplayable. [editline]6th February 2017[/editline] [QUOTE=HiredK;51780904]I started working on my planet renderer after a small break, I added networking support, residual and vectorial data, skeleton based animation and particle system. Here's the [URL="https://hiredk.com/2017/02/05/modern-planet-rendering-networking-roads-and-particles/"]article[/URL] and a video to showcase the new features. - awesome planet rendering and great music -[/QUOTE] What is the music in this video? Bonobo or something?
[QUOTE=srobins;51782820]Hi all, last time I poked in here I was real proud of my CPU-based Marching Cubes implementation. Almost immediately I realized that wasn't going to cut it (15 FPS in VR is surprisingly uncomfortable!) so I learned a bit about compute shaders and GPGPU programming and fixed things up a bit: [media]https://www.youtube.com/watch?v=VN4yYeb9Xm4[/media] Updating a 16^3 voxel volume every 0.05 seconds doesn't quite consistently hit 90 FPS on my i5 2500k / GTX 980, but SteamVR reprojection masks the small delay perfectly and it still comes out looking buttery smooth. Need to optimize more and play with the update rate some so that we're not totally relying on reprojection to keep people from throwing up, but it's a pretty massive improvement over the CPU version, and my first time doing any proper GPU programming! It scales up incredibly well too, a 32^3 volume runs just about the same, whereas on CPU it was pretty much unplayable. [/QUOTE] 16^3 =4096, multiply with FPS = 4096*20 = 81920 Sounds like CPU should handle that easily. I think you have some horrible inefficiency in your code.. And mesh uploading isn't problem, I could update mesh of dynamic water on my 4 years old phone easily with no FPS hit. [editline]6th February 2017[/editline] Also, I don't want to be just a downer, it looks great tho.
[QUOTE=Fourier;51783693]16^3 =4096, multiply with FPS = 4096*20 = 81920 Sounds like CPU should handle that easily. I think you have some horrible inefficiency in your code.. And mesh uploading isn't problem, I could update mesh of dynamic water on my 4 years old phone easily with no FPS hit. [editline]6th February 2017[/editline] Also, bravo! Looks great! Don't want to be just a downer to you.[/QUOTE] Yeah, I think the main thing to watch out for is how much is being allocated each time you regenerate the mesh. Ideally you should be able to preallocate the buffers you write vertices / indices to, with no allocations at all during generation. [editline]6th February 2017[/editline] Like here's a quick one I made a couple of weeks ago running on the CPU, 32x32x24 and solid 60 FPS. [vid]http://files.facepunch.com/ziks/2017/February/06/2017-02-06-1024-20.mp4[/vid]
[QUOTE=Fourier;51783693]16^3 =4096, multiply with FPS = 4096*20 = 81920 Sounds like CPU should handle that easily. I think you have some horrible inefficiency in your code.. And mesh uploading isn't problem, I could update mesh of dynamic water on my 4 years old phone easily with no FPS hit. [editline]6th February 2017[/editline] Also, I don't want to be just a downer, it looks great tho.[/QUOTE] Hm, I wonder what I'm doing wrong? If anyone is interested in taking a look and giving me some pointers I'd appreciate it. My implementation is pretty much a direct translation of a public domain example by Cory Bloyd. When it was CPU bound it had a noticable bottleneck in my trilinear interpolation math function, I'm using an array of density values rather than a density function.
[QUOTE=srobins;51785165]Hm, I wonder what I'm doing wrong? If anyone is interested in taking a look and giving me some pointers I'd appreciate it. My implementation is pretty much a direct translation of a public domain example by Cory Bloyd. When it was CPU bound it had a noticable bottleneck in my trilinear interpolation math function, I'm using an array of density values rather than a density function.[/QUOTE] Sure, I could see if I can spot the cause. If interpolation was the bottleneck you could just send that.
I've started working on my speech synthesizer again, and I have promising results. It still sounds robotic, but the quality is improving. Within the last two days, I have implemented a rough prototype for a vowel transition system (enabling diphthongs), as well as rudimentary vocal tract length adjustment and rhotacization (R-coloring). Pretty soon I will start researching how I can generate filter parameters for different classes of consonants, and then I'll be integrating that system with the vowel generator. My first major goal is to synthesize a simple 1- or 2-syllable word; any suggestions for what it should be? I'd prefer it to contain rhotacization (American English "R" sound), one diphthong, and one or two different types of consonants (e.g. a fricative and a stop).
Ok I guess the username is the last thing I use to identify people because my thought process just went: - Look at avatar: Uh ok who is this dude? Maybe new here? - Read first sentence of post: Oh it's Berkin ok
but his avatar is like year old or more [editline]7th February 2017[/editline] [QUOTE=Berkin;51786108]I've started working on my speech synthesizer again, and I have promising results. It still sounds robotic, but the quality is improving. Within the last two days, I have implemented a rough prototype for a vowel transition system (enabling diphthongs), as well as rudimentary vocal tract length adjustment and rhotacization (R-coloring). Pretty soon I will start researching how I can generate filter parameters for different classes of consonants, and then I'll be integrating that system with the vowel generator. My first major goal is to synthesize a simple 1- or 2-syllable word; any suggestions for what it should be? I'd prefer it to contain rhotacization (American English "R" sound), one diphthong, and one or two different types of consonants (e.g. a fricative and a stop).[/QUOTE] Maybe this can help you: :)? [url]https://deepmind.com/blog/wavenet-generative-model-raw-audio/[/url]
[QUOTE=Fourier;51786571]but his avatar is like year old or more[/QUOTE] for me it was still the pickle, I don't come here often enough
[QUOTE=Berkin;51786108]My first major goal is to synthesize a simple 1- or 2-syllable word; any suggestions for what it should be? I'd prefer it to contain rhotacization (American English "R" sound), one diphthong, and one or two different types of consonants (e.g. a fricative and a stop).[/QUOTE] Playground.
[IMG]https://dl.dropboxusercontent.com/u/9317774/thisisnotright.PNG[/IMG] Ew [IMG]https://dl.dropboxusercontent.com/u/9317774/nope3.PNG[/IMG] Ew [IMG]https://dl.dropboxusercontent.com/u/9317774/thiscouldwork.PNG[/IMG] Ugh [IMG]https://dl.dropboxusercontent.com/u/9317774/iuuh.PNG[/IMG] ??? [IMG]https://dl.dropboxusercontent.com/u/9317774/terrain2.PNG[/IMG] Ooh [IMG]https://dl.dropboxusercontent.com/u/9317774/nothideous.PNG[/IMG] Hmm [IMG]https://dl.dropboxusercontent.com/u/9317774/ooohyes.PNG[/IMG] That seems to work (for delineating paths from non paths, the lighting makes it somewhat hard to tell) I tried modifying the random terrain function into a clickable mouse function so I could use it to perturb the ground and use the variation in normals to make a path. It... kind of works. With a bit of cleanup, some smoothing, and maybe a higher res (or even dynamically sized kill me) mesh, maybe the last example could work. I might have to resort to marching cubes which is the opposite of what I want to do today. I may also try making this a purely normal based method, it set all normals to a fixed/random angle/offset for more uniform lighting I've had to implement various kinds of painting/map editing stuff for this, only to immediately throw away a whole day of work for each one after deciding its crap, which has been a good laugh. But realistically to get the detail I need, I'm going to have to implement normal mapping probably, and then simulate a higher res mesh
Any C++ magicians remember/know why std::future::then had so many issues with sequencing/order of evaluation? I always see it as an argument for the strengthened sequencing spec introduced in C++11.
What does a gluLookAt look like when rotating around pitch? I am trying to get a mouselook type of camera. I have yaw working around the center vector, but I can't for the life of me figure out pitch. Should I even be thinking of yaw pitch and roll when using gluLookAt functions? Sorry if this doesn't make sense. I've been awake all night and my brain is mush. I also don't know the opengl terminology very well.
Hey guys, I came from a C++ background for like 2 - 3 years. And I actually started learning C# 2 days ago. Its been great, I've actually already written an engine in C# in like 7 hours, (got terrain loading, etc.) and I'm currently working on the FPS camera. In my opinion, honestly C# is wayyyy easier than C++ (not saying C++ was hard, it was just... to put it kindly... quite weird). It's safe to say I've done way more in C# then I would've gotten done in C++. I'll post some pics of my engine when I get more stuff done. I'm currently using OpenTK to write it. Its so much easier then C++'s OpenGL (imho). ^ What I said above may have seemed stupid. But I have an opinion to support it. Honestly, upgrading from using OpenGL 1.x to 4.x is one of the hardest learning curves there is. OpenTK, as far as I've seen, uses an OpenGL 1.x esque syntax. That's why I think it's easier.
still working on my shitty mspaint-based forum simulator [video=youtube;ttEyCNPOyL4]https://www.youtube.com/watch?v=ttEyCNPOyL4[/video]
[QUOTE=false prophet;51788931]What does a gluLookAt look like when rotating around pitch? I am trying to get a mouselook type of camera. I have yaw working around the center vector, but I can't for the life of me figure out pitch. Should I even be thinking of yaw pitch and roll when using gluLookAt functions? Sorry if this doesn't make sense. I've been awake all night and my brain is mush. I also don't know the opengl terminology very well.[/QUOTE] You can use a lookAt matrix for a mouselook camera by rotating the focal point around the camera origin using yaw and pitch values and also translating it when you translate the camera.
[QUOTE=Hekefit;51788981]Hey guys, I came from a C++ background for like 2 - 3 years. And I actually started learning C# 2 days ago. Its been great, I've actually already written an engine in C# in like 7 hours, (got terrain loading, etc.) and I'm currently working on the FPS camera. In my opinion, honestly C# is wayyyy easier than C++ (not saying C++ was hard, it was just... to put it kindly... quite weird). It's safe to say I've done way more in C# then I would've gotten done in C++. I'll post some pics of my engine when I get more stuff done. I'm currently using OpenTK to write it. Its so much easier then C++'s OpenGL (imho). ^ What I said above may have seemed stupid. But I have an opinion to support it. Honestly, upgrading from using OpenGL 1.x to 4.x is one of the hardest learning curves there is. OpenTK, as far as I've seen, uses an OpenGL 1.x esque syntax. That's why I think it's easier.[/QUOTE] C++ was my first language and it almost killed my interest in programming (then I taught myself C# and that renewed my interest). Don't Repeat Yourself, you say? Why don't I write a header file where I repeat myself? On another note, in c# how would you write a regex to split "10+20" into tokens/string arrays?
[QUOTE=DoctorSalt;51789476]C++ was my first language and it almost killed my interest in programming (then I taught myself C# and that renewed my interest). Don't Repeat Yourself, you say? Why don't I write a header file where I repeat myself? On another note, in c# how would you write a regex to split "10+20" into tokens/string arrays?[/QUOTE] C was my first language, then I went to C++ after a couple of years (of not really doing much) I super like C++ myself. All the other languages I've used run into a severe functionality/expressiveness problem (eg no template equivalent, or not good generics, or poor operator overloading), or performance issues that mean you have to overcomplicate your code (garbage). C++ (for me) runs at a slightly higher baseline complexity all the time, but it doesn't tend to vary that much from there, which is I think why I like it. In other languages its easy easy easy easy incredo hacky workaround for missing 'too complex/TBA' feature xyz Unless you want to get into super template generic magic. Then you should run for the hills
[QUOTE=Hekefit;51788981]Hey guys, I came from a C++ background for like 2 - 3 years. And I actually started learning C# 2 days ago. Its been great, I've actually already written an engine in C# in like 7 hours, (got terrain loading, etc.) and I'm currently working on the FPS camera. In my opinion, honestly C# is wayyyy easier than C++ (not saying C++ was hard, it was just... to put it kindly... quite weird). It's safe to say I've done way more in C# then I would've gotten done in C++. I'll post some pics of my engine when I get more stuff done. I'm currently using OpenTK to write it. Its so much easier then C++'s OpenGL (imho). ^ What I said above may have seemed stupid. But I have an opinion to support it. Honestly, upgrading from using OpenGL 1.x to 4.x is one of the hardest learning curves there is. OpenTK, as far as I've seen, uses an OpenGL 1.x esque syntax. That's why I think it's easier.[/QUOTE] OpenGL's non-immediate mode stuff can be hard to grasp at first, but its totally worth the effort. Shaders are extremely powerful, and working with VAOs, VBOs, and EBOs is far easier than the old style of sending mesh data. I like C++ and OpenGL together, tbh. Learning to use constexpr a ton with OpenGL stuff has helped me fix a lot of errors (well, after it created a bunch of new errors lol) because there's quite a bit of stuff in OpenGL that's compile-time constant. And constexpr methods actually with non-constexpr stuff too, which is a bit odd. This came up a lot in MGG when people would say "I'm doing xyz thing to make music, it feels less legitimate, but I'm actually making music" and then worry about what they were doing. Its often more important that you use tools that work for you and allow you to actually do projects than it is to use what the "best" toolset seems to be, or what the most "legitimate" toolset is. C# works for you, cool. (although I think advice on this would differ if you were trying to seek a position in a game studio or something) [QUOTE=Icedshot;51789642]C was my first language, then I went to C++ after a couple of years (of not really doing much) I super like C++ myself. All the other languages I've used run into a severe functionality/expressiveness problem (eg no template equivalent, or not good generics, or poor operator overloading), or performance issues that mean you have to overcomplicate your code (garbage). C++ (for me) runs at a slightly higher baseline complexity all the time, but it doesn't tend to vary that much from there, which is I think why I like it. [B]In other languages its easy easy easy easy incredo hacky workaround for missing 'too complex/TBA' feature xyz[/B] Unless you want to get into super template generic magic. Then you should run for the hills[/QUOTE] This was my experience with Python. It was great being able to rapidly churn out scripts, and I think Python was a natural fit for the type of rapid R&D I was doing over the summer, but it fell apart quickly when I tried to make a larger application using Python. Things snowballed out of control very quickly. Python was also good at getting me thinking about OOP ideas, higher-level abstraction, and practicing my programming after a long break. I appreciate C's lightweight and performance-friendly aspects, and in the applications I used it in (embedded systems, satellite/robot firmware) its pretty critical to have explicit control over memory management and the like. C++ is great though. I've started to love it for much of the same reasons you've identified, and it just feels like there's so much more to learn. I haven't learned much about template metaprogramming yet, and there are whole aspects of the language I haven't really touched, but I'm still able to use C++ to develop an application fairly well. I'm applying for an internship with Microsoft, and I'm not sure what my chances are, but I think it'd be really cool to work on the VS team - especially the team related to Visual C++ stuff. I can't imagine how much I'd learn working for a team like that. And, my aunt works there too so hopefully I'd get to see her more. So, as neat as Boost is, holy hell is it murder on my compile times. Despite not using it everywhere, I just stuck most of the stuff I use (or plan to use) in my precompiled header so that my compile times are only sometimes murderous. Also, its kinda irritating that I can't just choose one module and include only those headers - they end up having dependencies. Is there some way to install just a certain module + dependencies to a given folder? I couldn't figure that out. Took me long enough to figure out I had to use a command with b2 to build for x64 too :v [editline]edit[/editline] I feel like I haven't posted in ages. I installed a bunch of games and have been playing those - which is kind of a problem. I find equal enjoyment in working on my projects, but its harder to get going on them when the option of playing games exists. Even if the long-term satisfaction is much higher. I justified it at first as "inspiration" and "getting ideas", but tbh I just end up burning too much time. X3AP with Litcube's Universe is pretty much the worst for me, I've stayed up playing it until 2am several nights in a row, so rip sleep [editline]7th February 2017[/editline] [QUOTE=Ziks;51780573]Thanks! I've got a few ideas, like maybe an interactive smoke grenade throw browser (which shouldn't be too hard), or as an unobtainable goal I could try making a replay viewer. RAM seems to be fine atm, and I've been trying to offload as much as possible to OpenGL so it shouldn't be CPU bound. I'm not even really batching draw calls much at the moment, so performance could get even better. [editline]5th February 2017[/editline] Yeah I'm really not a fan of the MDL format. My loader works for pretty much every model, except I think like a door used in cs_office. It wasn't working at all for any meshes with multiple materials, until I added: [img]http://files.facepunch.com/ziks/2017/February/05/chrome_2017-02-05_19-14-41.png[/img] I still don't know if there's a proper way to find that value.[/QUOTE] Getting into a stupid long post now, but if you think mdl is bad the STL mesh format a look. Does not store much information at all - but, it's the main format used for 3D printing. AMF isn't catching on. So, I have to build a shitload of data for each model after importing them, when better formats would have that data already stored.
[QUOTE=paindoc;51790052]Getting into a stupid long post now, but if you think mdl is bad the STL mesh format a look. Does not store much information at all - but, it's the main format used for 3D printing. AMF isn't catching on. So, I have to build a shitload of data for each model after importing them, when better formats would have that data already stored.[/QUOTE] I'm fairly sure MDL is far, [i]far[/i] worse (though it might be a bit less code to load). If you include animations into this you just end up left wondering if the whole thing is a prank.
Working on [url=https://marketplace.tf/apidocs]a proper API for Marketplace.tf[/url]. Every API Endpoint is self-describing; they provide all information about themselves, including a list of parameters (and the attributes of them, including validation functions that do basic sanity checking before the endpoint is actually executed). Pretty pleased with how modular it is.
[QUOTE=Verideth;51788981]Hey guys, I came from a C++ background for like 2 - 3 years. And I actually started learning C# 2 days ago. Its been great, I've actually already written an engine in C# in like 7 hours, (got terrain loading, etc.) and I'm currently working on the FPS camera. In my opinion, honestly C# is wayyyy easier than C++ (not saying C++ was hard, it was just... to put it kindly... quite weird). It's safe to say I've done way more in C# then I would've gotten done in C++. I'll post some pics of my engine when I get more stuff done. I'm currently using OpenTK to write it. Its so much easier then C++'s OpenGL (imho). ^ What I said above may have seemed stupid. But I have an opinion to support it. Honestly, upgrading from using OpenGL 1.x to 4.x is one of the hardest learning curves there is. OpenTK, as far as I've seen, uses an OpenGL 1.x esque syntax. That's why I think it's easier.[/QUOTE] If you have any questions about shaders, just ask me. I've made a pretty extensive C# OpenGL shader integration a while back, and even though that's incomplete (due to having to manually copy the whole documentation) I think I have a fairly good grasp on it now (including most relatively modern parts, I think). [url=PS: I almost refrained from doing this, but praising one of your banned alts goes a bit far and confirmed my suspicions. Consider being more subtle.][/url]
[QUOTE=Tobba;51790180]I'm fairly sure MDL is far, [i]far[/i] worse (though it might be a bit less code to load). If you include animations into this you just end up left wondering if the whole thing is a prank.[/QUOTE] I looked more at that format and - oh good god. Its the opposite of the STL format, its far too complex D: Also, if we're doing the "discussing C++" thing, I enjoyed this article that was in /r/cpp recently and it feels relevant: [url]http://www.bfilipek.com/2017/02/how-to-stay-sane-with-modern-c.html[/url] I was also going to link [URL="https://eklitzke.org/in-defense-of-c++"]this article[/URL], but then I saw STL [URL="https://www.reddit.com/r/cpp/comments/5sfuvw/in_defense_of_c/ddet9q5/"]pretty much tore it to pieces[/URL]. I agree with the end at least - I enjoy C++ because its a nice mix of the stuff that got me started in programming (low level firmware work) and the stuff I like to do now, like vidya gaems/tech demos I never finish, SIMD stuff, and general performance optimizations.
Sorry, you need to Log In to post a reply to this thread.