Ekki Ekki ter wang plop
Ramblings of
Alex Lovett
RSS
Twitter
Tumblr
Youtube
LinkedIn

Y2013-Mo08-GameDesign

Navigation:

Up a Level - error_log

Documents:

Unity5 - Reality_2.0 - Math_Art - error_log - Lilly - Drawing - GameDesign - Inspiration - XFactor - Valideus - Food - WheelReview - GKN - Lumen - WishList - RoundTree - Painting_with_Light - House - Website - Fridge
Older

Newer

Current

Tags: - Programming - Games - Unity - Shadowood
Show comments

Ah so simple, yet so not so simple.

I have a lovely fluid solution after many hours, and it renders all onto a flat 2D plane. Now I hadn't really thought much about how the rest of the 3D scene will sit with this fluid. I can't just have it all float over the top of it nor hide underneath it, I need it to merge with the fluid, and as It's a 2D plane by default objects just stick thru it with hard edges ruining the illusion of the 3D for example:



It is quite jarring where the cube suddenly enters the fluid. So I need to mask the fluid away based on the proximity of the cubes or the depth they sit at... simple.. I thought. Nope requires editing shaders which is never simple. But alas I finally prevailed and figured it out, the effect is almost unnoticeable, which is good because it is meant to be something you do not notice, versus clearly noticing how bad the above images is. Also the particles will fade out gently around the cubes not just suddenly get clipped by them.

So it looks better like this


Done with help from this site here:

Link: chrismflynn.wordpress.com --- fun-with-shaders-and-the-depth-buffer



Or even betterer like this:




Wonderful, job done ( aside from figuring out how to vertex color particles within the shader now )

Except none of it runs on the actual iOS device DOES IT!!!!!!

So back to the drawing board, and to find a way to capture camera depth that works in iOS and PRAYING all the shader jiggery I am doing will continue to work.

And how nice do a few cubes look ( only after 200 hours in Unity too! )



Phew redid pretty much everything from scratch and got it working on iPad

:-P



And Just had the idea to have the fluid depth take into account the brightness of the fluid, so brighter fluid is closer to the camera, to help break up the linear fog, works quite well

Now to just got get particle depth working again, and tidy things up ( remove all the fudge and hack )



Just added Velocity Texture support

Can now do kickass never seen beforeness such as but not limited to: suck in fluid like a crazy blackhole upon hitting a cube, spurt out red jets of fury if you miss a box... and other such nonsense

As it just instances / splats a texture directly into the velocity field such as:



The colours represent the angle to direct the fluid. Hurt my brain working out how to draw such an image in Photoshop but tadda



The above is basically pushing fluid out in allow directions uniformly

FINALLY got the fluid simulation working with none square area... took 17 hours of docking about poking in the dark and fumbling about banging my head

>_<



FluidAspectWorking



The way I see it you have normal programming like JavaScript lets say that's difficulty 1, then twice as hard as that is doing it really well with proper abstraction and organisation with good performant code being twice as difficult at level 2, then you have writing graphics shaders at level 3, implementing a fluid sim with a shader level 4, writing the formulas used for the fluid sim level 5, and understanding that fucking picture at level 10

But I do keep surprising myself, after sticking with a few 'impossible' tasks for a while, they become... understandable. Most of what makes things look so scary or beyond your capacity is not understanding the language something is written in. When new things use a different vocabulary it creates the impression that it is forever beyond comprehension. Time and time again I have felt this way despite knowing full well I can learn new languages and then suddenly the impossible becomes simple.

I am probably the only human being that has both the persistence and ability to get down and nerdy with a simulation like this, and still possess enough artistic ability and eye for detail to make it look good too... hell I might even be sensible enough to make something people would enjoy playing on top of that... but lets not get too carried away

Most normal people are scared off by how complicated adding feature to a fluid sim are, I am clearly immune to the normal healthy desire to run away screaming

even though this was a side embellishment to a boring whack a mole game, I'm thinking I need to make something that uses this fluid sim as the key gameplay mechanic

hubris aside though... I spent 17 hours just trying to fix the aspect ratio / render in a none square area

:-/



Oh and then I checked the performance increase of rendering less pixels / cells in the fluid sim with this fantastic optimisation:



Yup, around 1ms at best..... FFS

On the iPhone the increase is probably a bit higher, but even still.... premature optimisation strikes again

Testing with higher resolution simulation and the result is:



Ooh 2 more frames per second

:-/



Well at least it is making a difference... glass half full.. and it is saving some memory... *sigh*






Show comments for 'Foggy Fluid'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Finally gave in after being driven up the wall by MonoDevelop for the last time... Moved to Microsoft VisualStudio on Windows, ah now everything just works-ish

Took forever to get communication working between VisualStudio on Windows and Unity on the Mac, so that you can double click debug logs entries and files in Unity and have it jump to the right Project / File and Line Number in Visual Studio running in a Virtual machine on the Mac. Had to write my own PC EXE acting as a bridge and all kinds of funky stuff... But I just couldn't stand MonoDevelop or Xamarin anymore, they are such junk.

Between that, and upgrading to the new Unity... then upgrading to another new Unity, then upgrading the heart of the FluidSim code from JavaScript to C# version, and moving to iOS 7, and a new iPad.... eaten all my time! No game work done!

And I'm really fretting and struggling around the concept / design / look and feel. I need to nail it down now, but it is impossible to draw or even photoshop mockup any of the themes I have in my head.

Maybe better approach is to have a few visual ideas / concepts and start playing around in Unity bringing them to life, then in a serendipitous manner discover and stumble upon something I like that I may never have thought of otherwise. Just get the wheels moving instead of being stuck in planning limbo.





Show comments for 'Visual Studio Huzzah'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Toying around with various visual concepts in this mockup, I have since abandoned this concept:


Playing around with the idea of using DOF / Spherical Aberrations or 'Bokeh' effects




Show comments for 'Squishy Concepts'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Coming Soon...


Show comments for 'Epoch'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Well better late than never, I have been working on my first game, first real project in Unity and this is the first time I have bothered to write about any of it!

What it looks like right now, countless hours bring you a very exciting logo and some cubes and particles

:-P

:


That and eveeeeerything behind the scenes you cannot see or arguably even care about... took... forever! seriously.. for---ever - your mind could not even accept how long even if it could comprehend it.

If you wish to make an apple pie from scratch, you must first invent the universe -- Carl Sagan

I don't even want to contemplate what the work would be like without Unity making a good start on that Apple Pie for me

If I have seen further it is only by standing on the shoulders of giants -- Isaac Newton

I am writing a few articles for things in the past on some of the hurdles so save me explaining the ordeal here, go read those and you should get the picture

---

Totally easy to follow nesting of loops.. *hangs head*




Show comments for 'Six Impossible Things'
You have reached the end of this page - But there's more! Click Older for more
Older

Newer

Current

Subscribe to my News Feed.. or screw you then!
Some people's minds are like cement: all mixed up and permanently set
Copyright © 2006 - 2024 - Alex Lovett
Site and content designed, built and massaged by
Alex Lovett
( HD6 / HeliosDoubleSix )
contact me by email:
Page Rendered in: 0.006 seconds, like a boss