KatsBits Community

Game Editing => General Content Creation => Topic started by: kat on December 13, 2009, 07:23:17 AM

Title: Technical WIP
Post by: kat on December 13, 2009, 07:23:17 AM
A WIP topic for those of the left brained inclination (coders).

Screen shots and images should be kept to a maximum for 800 pixels width/height. Also consider providing information about what you're showing so readers know what's what.
Title: Re: Technical WIP topic
Post by: carnage on January 21, 2010, 01:24:07 PM
Hi guys, been a while but I have been pretty busy lately. Thought I would show of some of the latest work on my thesis. Its a real time colour deficiency simulator implemented using high level shader language.

http://www.youtube.com/watch?v=kR99nzWr8mc (http://www.youtube.com/watch?v=kR99nzWr8mc)
Cant work out how to emebed the video into this post...

Should have some more to show soon simulating other visual deficncies such as cateracts and macular degeneration.
Title: Re: Technical WIP topic
Post by: kat on January 21, 2010, 02:30:16 PM
That was interesting, not what I would have expected based on what you've experimented with in the past. What made you decide to focus on this? And yeah, you have to 'link' to YouTube vids because the < embed > is html, which is turned off.
Title: Re: Technical WIP topic
Post by: carnage on January 21, 2010, 03:08:38 PM
Well I was trying to get a project in procedural generation but after some initial tests and looking around for literature it dint seem to really be working out. I have fairly reasonable game development skills but game development doesn't really translate well into a serious academic exercise for a thesis.

One of my tutors was looking into this subject for a possible PhD and had an interested in game technologies and wondered if they could be applied to solve this problem so it seem like a project that was tailored to my skillet and had a serious academic background.

Currently the system is only using 2D image but soon I will be implementing depth based impairments like far and short sightedness and will require some kind of 3D environment. Since the project is not based on 3D design there is no restrictions about using other people work, so expect some begging for 3D assets in the near future  ;)
Title: Re: Technical WIP topic
Post by: silicone_milk on January 21, 2010, 06:09:37 PM
Wow that really was interesting. As Kat said, not expected. But still pretty neat.
Title: Re: Technical WIP topic
Post by: ratty redemption on January 22, 2010, 01:42:01 PM
agreed, interesting and very clean looking interface.

in my late teens I developed a cateract in my right eye which I eventually had operated on about 5 years ago, so I went many years with decreasing vision in that eye. not only was my vision getting very blurred but I was also seeing double in that eye and light was scattering across the lens.

not sure how you'd simulate all that but I can give you feedback if it would help.
Title: Re: Technical WIP topic
Post by: carnage on January 22, 2010, 02:23:24 PM
Ratty cateracts is one my to do list of impairments to simulate so feedback from someone who has expereinced the effects first hand would be very useful. If your willing it would also really help support the results in my thesis.

Your description of the symptons is very useful and gives me some clues about how I would implement it. If I were to make some quick mock ups of the effect in photoshop could you give me some feedback on how they could be improved to match the effect.

I am also particualry interested in how the effect progressed over time as one key goal of my thesis is simulating impairments with variable severity so they can be customized to simulate a given individuals impairments and give them an idea of how they could change over time. So they can make more informed desions when cosnidering corrective surgery
Title: Re: Technical WIP topic
Post by: carnage on January 26, 2010, 05:09:23 AM
Another little bit of progress. Over the weekend I have been playing with different methods of creating a blur shader. I think I have got something that gives the required visuals with an acceptable performance cost. Although not much use as a visual impairment on its own, this will form the basis for many of the visual impairments I have still yet to implement.

http://www.youtube.com/watch?v=_FjhLPWFwr8 (http://www.youtube.com/watch?v=_FjhLPWFwr8)

It does look a bit block and tends to snap between levels a blurriness in the video, luckily this is just a feature of the video compression on youtube the real thing is fairly smooth
Title: Re: Technical WIP topic
Post by: carnage on April 09, 2010, 02:55:44 PM
Hi guys haven't really been posting much here lately. Thought I would share some of the work that has gone on the past few weeks. Thrown together a simple office scene in blender to get a 3D environment to work with. Did actually prove to be very difficult because unlike working with a nice game engine XNA doesn't have any scene composition tools, or lighitng solutions etc. So had to manually unwrap all object to light-maps (the blender unwrap light-map tool doesn't really give good results) and bake from blender.

Original I was going to have textures and more interesting solutions. However this simple scene took a long time to get working mainly because every little change caused a large amount of work having to manually bake light-maps and reimport each asset and texture into XNA framework.

Here is the office scene as it stands. Will try get a video recorded later of walking around in the scene with impairments acting on it

(https://www.katsbits.com/community/proxy.php?request=http%3A%2F%2Fimg532.imageshack.us%2Fimg532%2F1024%2Fofficespace.jpg&hash=316c210cb7d900616ba9c6b2adc920c48f308994)
Title: Re: Technical WIP topic
Post by: ratty redemption on April 09, 2010, 03:10:28 PM
@ carnage, I like your approach with this project, but sorry to hear of the workflow issues. hopefully your find enough workarounds to keep using these tools.

also I can still give you some feedback on the visual impairments if you ever need me. and feel free to pm or email me when the time comes if I don't appear to of seen your updates to this topic.
Title: Re: Technical WIP topic
Post by: carnage on April 26, 2010, 06:13:20 PM
Hi, finaly got around to making some of thoes promised videos to tie off this thread. These is in on wednesday so been a bit all hands on. Luckly had a review today and apart from a couply of changes and additions it seems to be in a pretty good state... yay  ;D

Cateracts is the only simulation video I have at the moment, it looks like in the near future it will be going though a bit of an optimisation stage so probably be able to demonstrate some better videos then, sorry for the framerate but I cant find a system that has is capable of screen capping while running the sumulator

[youtube]http://www.youtube.com/watch?v=onVtxYFMeUw&feature=channel[/youtube]
Title: Re: Technical WIP topic
Post by: kat on April 27, 2010, 02:50:50 PM
Very well done carnage! Capture rates will depend on your PC rather than the tools necessarily but try CamStudio (http://camstudio.org/) (I use that for the tutorials) or for what you're doing you might be better buying a full license for FRAPS (http://www.fraps.com/). Failing that just point a video camcorder at your screen!

On the subject of cataracts... I was watching a program online the other week that spoke about the intense colours and visual experience people can see when they have the lenses removed as a result of certain type of surgery, Monet's paintings from later life after he had cataract problems being the most acute example of that.
Title: Re: Technical WIP topic
Post by: Shaderman on April 27, 2010, 07:00:54 PM
Very nice carnage!
Title: Re: Technical WIP topic
Post by: ratty redemption on April 27, 2010, 11:39:44 PM
agreed and I've given carnage some feed back in pm's but there wasn't much that needed improving imo *thumbs up*
Title: Re: Technical WIP
Post by: carnage on September 17, 2010, 09:27:20 AM
Im doing a bit of portfolio work at the moment, aiming for a technical artist position. So some code, shaders and modelling. Plan is to put together a small scene with some models from blender and write a few shaders to render them. Im imagining something like a fish tank, lots of opportunity for interesting shaders and models.

To start off I have ported and old piece of code that simulates ripples on liquid surface over to the GPU. Its was quite CPU intensive, one simple operation that runs for each pixel in the map. Obviously the GPU being able to process the pixels in parallel really speeds this up.

Work so far
[youtube]http://www.youtube.com/watch?v=Aspf47XqMBI[/youtube]

As you can see it is currently simulating a rain falling in a puddle. The code should allow more complex interactions but I need to code the mouse pointer to cause ripples first. More updates on this soon.

Title: Re: Technical WIP
Post by: kat on September 17, 2010, 04:42:20 PM
In of itself that's quite fascinating to just sit and watch.
Title: Re: Technical WIP
Post by: ratty redemption on September 17, 2010, 08:33:27 PM
@carnage, are you saying your nornalmap there will be able to update itself in real time? if so that sounds very cool, and have we seen this before in game engines or is that too gpu intensive?
Title: Re: Technical WIP
Post by: carnage on September 18, 2010, 10:22:57 AM
@ratty. The simulation actual uses a height map that requires one draw pass to update it. I am then using a second pass to convert the height map into a normal map witch is more useful for rendering a watery surface, as its more about the reflecting light.

To control the map you simple paint onto the current frame with any colour greater than black, then over the next frames these areas will form ripples. The algorithm even supports effects like waves bouncing of solid surface (although there are notany in that video)

And its actually very GPU efficient. The algorithm is quite cheap as its doesn't use any trigonometry, and lends itself to the parallel nature of GPU. It also has a constant performance regardless of how many ripples are in the system. As a final bonus, the height map texture is scaled up 8 times as part of the algorithm, so for this 1024^2 pool, a 128^2 source height map is required

@kat. I am probably spending too much time watching it when I should be programming it
Title: Re: Technical WIP
Post by: ratty redemption on September 18, 2010, 07:47:45 PM
@ carnage, understood all that i think all well done *thumbs up*
Title: Re: Technical WIP
Post by: silicone_milk on September 22, 2010, 01:46:47 AM
Did you write this with GLSL? You might be interested in checking out OpenCL. We talked about it a little bit before :)

It feels pretty damn close to writing in C.

Good stuff btw. Lets see those ripple effects re-purposed for flowing blood down walls  8)
Title: Re: Technical WIP
Post by: carnage on September 22, 2010, 09:31:57 AM
unfortunately the algorithm only simulated horizontal surfaces so no blood. I wrote it in HLSL and that's pretty close to C anyway. I have looked at CUDA and other GPGPU but they are not all-ways optimal for graphics stuff
Title: Re: Technical WIP
Post by: silicone_milk on September 22, 2010, 02:17:30 PM
Aw :( Rotate it 90 degrees then we can have some gore! :)

Haven't looked in to CUDA much only because it was highly restricting (only working on NVIDIA cards). OpenCL, however, was developed as a kind of "sister language" to OpenGL and they mesh quite well together.

Really, the main thing I like about it (and the reason why I keep pushing it on you) is that you only write a single set of almost-identical-to-c code and tell it which platform to target. The compiler creates the binaries for the platform(s) you want to use so you don't have to worry about writing multiple slightly different copies of the program.

Not to mention, it's cross-platform. Runs on OSX (Snow Leopard), Linux, and Windows. Can be compiled to execute on multiple CPUs, GPUs, and DSPs (Digital Signal Processors) or a combination of. There's also rumors that PhysX chips will be added to the list as well :)

For me, the major downside is the lack of recursion :(
Title: Re: Technical WIP
Post by: carnage on September 23, 2010, 12:30:21 AM
I do like the idea that CL is platform independent and can fall back to CPU. However in my case of writing really only graphics shaders CPU fall-back isn't an option anyway. I understand that CL remove a lot of the limits of HLSL or GLSL making it easier to do non graphics processing without having a limited number of memory reads etc.

But again if im writing a real time shader if I have reached these limits is probably already too expensive. I could potentialy see myself using it for trying to optimise some programs like the terrain generation tool etc, but that will probably come after the algorithm is locked down on CPU, then port it over to GPU. Kind of like your q3map3 project
Title: Re: Technical WIP
Post by: silicone_milk on March 28, 2012, 10:18:37 AM
Been about a year and a half since an update? Whoa.

Still getting stuff done slowly but surely. q3map3 is still in the works. Programming articles are being typed up for facebook, opencl, and random tidbits over at my guineacode site.

My current project I started today which I'm trying to have a working prototype of by this weekend is a Google Docs type of thing similar to the Word clone they have.

Except this will be designed around the concept of branching. It will reflect the thought process I find to be pretty common - going off on tangents when one idea suddenly inspires another.

The idea is to have a web-based text-editing app that lets you branch off in mid-paragraph by declaring an anchor and a new document (or 'thread') will branch off letting you elaborate on a new idea and treating it as an object you'll be able to move around, show/hide, clone, further branch, etc...

One of the main parts to facilitate this is an idea I had tonight where you can select a portion of text and make a reference to it. This is almost identical to copy-pasting to a new document. However, every section you paste the reference to will automatically update itself whenever the original text gets changed.

I intend for this to be multi-user like google docs so multiple people can edit at the same time which will make this branching thing all the better so people can non-destructively build and add on to an idea somebody else is writing on to.
Title: Re: Technical WIP
Post by: kat on March 28, 2012, 03:33:01 PM
That sounds like an interesting [project]. Web or client based? Where do you securely store users generated files and such and/or how are you allowing secure connections between users and/or into the app itself?
Title: Re: Technical WIP
Post by: silicone_milk on March 29, 2012, 07:04:27 PM
web-based. Since this is just a little experimental project documents will be stored server-side for now.

Connections - I was originally looking at an AJAX based approach to multi-connection editing on a document but my attention shifted last night to WebSockets with node.js and socket-io
Title: Re: Technical WIP
Post by: silicone_milk on April 05, 2012, 04:11:56 AM
Have client-side word-like rich text editing going on now. Just need to find some time to set aside to get multi-user editing happening.
Title: Re: Technical WIP
Post by: carnage on April 13, 2012, 02:49:39 PM
Hi guys, haven't been posting on here for some time. The PhD is taking up most of my time. I have implemented another version of the fluid simulation video I posted on here some time ago. Its a horrible recording of the screen, but I cant get any screen capture software to work on this system at the moment. Enjoy.

http://www.youtube.com/watch?v=VQMaPoJiywA&feature=colike

Also, I tend to more on Twitter these days so if anyone else is posting work on there add me @Milkybkid
Title: Re: Technical WIP
Post by: kat on April 13, 2012, 04:37:31 PM
Looks interesting but yeah, capture makes it difficult to see what's really going on. If you can't install Fraps (http://www.fraps.com/) (best) or CamStudio (http://camstudio.org/)(slower capture) try and prop the camera on or against something solid like a thick book (don't hold it in your hand) and then angle the screen so it can be seen clearly (or visa-verse).
Title: Re: Technical WIP
Post by: carnage on April 14, 2012, 03:58:00 PM
Update, better video

http://youtu.be/wyEUaKHSGSg
Title: Re: Technical WIP
Post by: kat on April 14, 2012, 08:44:40 PM
That's much better. OK, so aside from a fluid simulation what is it we're seeing here exactly? Is it simply about using XNA to do that sort of thing or is there something else 'special' going on?
Title: Re: Technical WIP
Post by: ratty redemption on April 16, 2012, 12:34:36 AM
cool, and i agree your second video is much easier to watch carnage. did fraps slow your computer down at all?
Title: Re: Technical WIP
Post by: carnage on April 18, 2012, 12:27:50 AM
@Ratty, didn't get any slowdown with fraps, but I was only recording at 720p.

@Kat, no its just about making fluid simulation demos, XNA is really just a convenient wrapper for DirectX when you get down to it. Mainly just about trying to get something interesting portfolio wise.
Title: Re: Technical WIP
Post by: silicone_milk on November 20, 2012, 12:54:08 AM
Work stuff. Got close to 3k hits on the article I wrote within a few days of being posted :)

http://www.codeproject.com/Articles/488213/RESTful-Programming-With-Your-Voyager-Pro-UC
Title: Re: Technical WIP
Post by: kat on November 20, 2012, 02:35:11 AM
Interesting. There's definitely mileage in devices that can augment control mechanisms. You'll have to get in touch with the military *cough*