August 17th 2014

PermaLink Sunday 17:31 pm, by naman22 >>>MSGFORM<<<, 190 words, VIEWED 16 TIMES   English (US)
Categories: GSoC 2014

This post title is "State of shadows"

While both renderer deferred and pssm works great but their shadows doesn't seems to be working as they should. If we load a scene with deferred renderer enabled, it appears that everything works fine

deferredShadows

Until, you load point or spot light. Things begin to look weird.
When the light is close to the object it is casting shadow of things look fine.

Shadows

However, if light move away from the object, there is no shadows

noShadows

Same thing happens for point light.

Possible reason for this issue could be that the shadowmaps aren't rendered correctly but dump texture of shadowmap says otherwise.

halfShadows
shadowMap

Maybe its the hardware issue. I tried it on different hardware but still the issue persists.

Now the only possible reason for this issue to occur could be at the shader level.
shadow_depth.xml is responsible for mapping the shadows but nothing seems to be wrong there. Could be, the shader is taking slices into account which it shouldn't or coordinates from use_buffer.xml aren't sent right.

In addition to that pssm render manager is broken. It used to work earlier but now it doesn't exhibits shadows. weird!

pssm
Permalink BEFORESend feedbackAFTER • Trackback (0)
PermaLink Sunday 17:24 am, by naman22 >>>MSGFORM<<<, 317 words, VIEWED 14 TIMES   English (US)
Categories: GSoC 2014

This post title is "Working with lights"

There are several ways to enable lights in Crystal Space. One being from world file (XML). Following is the syntax to lit them in your environment.

1). Point light :-
<light name='Lamp'>
<center y='10' x='0' z='0'/>
<color blue='1.0' green='1.0' red='1.0'/>
<radius>100</radius>
<type>point</type>
<move>
<matrix>
<roty>0</roty>
<rotz>0</rotz>
<rotx>0</rotx>
</matrix>
</move>
</light>

PointLight

2). Directional light :- Same as point. rotate the matrix to change it's direction
<light name='Lamp'>
<center y='10' x='0' z='0'/>
<color blue='1.0' green='1.0' red='1.0'/>
<radius>100</radius>
<type>directional</type>
<move>
<matrix>
<roty>0</roty>
<rotz>0</rotz>
<rotx>-1.57</rotx>
</matrix>
</move>
</light>

DirectionalLight

3). Spot light :- requires some additional values
<light name='Lamp'>
<center y='10.00' x='0' z='0'/>
<color blue='1.0' green='1.0' red='1.0'/>
<radius>200</radius>
<type>spot</type>
<move>
<matrix>
<roty>0</roty>
<rotz>0</rotz>
<rotx>-1.57</rotx>
</matrix>
</move>
<spotlightfalloff outer="50" />
<attenuation>none</attenuation>
<halo>
<type>nova</type>
<seed>0</seed>
<numspokes>100</numspokes>
<roundness>0.5</roundness>
</halo>
</light>

SpotLight
Permalink BEFORESend feedbackAFTER • Trackback (0)

May 25th 2014

PermaLink Sunday 25:22 am, by naman22 >>>MSGFORM<<<, 10 words, VIEWED 36 TIMES   English (US)
Categories: GSoC 2014

This post title is "Shadows!"

Yet another GSoC, only this time its shadows.
Game on!

Permalink BEFORESend feedbackAFTER • Trackback (0)
PermaLink Sunday 25:00 am, by naman22 >>>MSGFORM<<<, 9 words, VIEWED 33 TIMES   English (US)
Categories: General GSoC 2012, GSoC 2013

This post title is "How water looks"

And that's how the CS water looks.
Youtube Link!

Permalink BEFORESend feedbackAFTER • Trackback (0)

September 26th 2013

PermaLink Thursday 26:12 am, by naman22 >>>MSGFORM<<<, 156 words, VIEWED 598 TIMES   English (US)
Categories: Weaver

This post title is "Shader Weaver"

Hello,

Shader weavers are intimidating at first mainly because it is difficult to debug them and connections are quite confusing.
The basic idea of weaver can be learned from here. However, the code written in it is outdated... better to go with code.

Following are some weaver debugging techniques that I learned.
1. Debugging by altering the output color. ex

if(something_happens) 
        bug=1.0;
 op_col.r+=bug;

2. CS flag to Disable shader cache : -cfgset=Video.ShaderManager.EnableShaderCache=false

3. CS flag to Dump shader program at %temp%\shader : -cfgfile=/config/shader-debug.cfg

4. Dump textures at %temp%\textures

   a. CS flag : -plugin=bugplug
   b. ctrl+d
   c. ctrl+shift+t

5. Switching between CG/GLSL

   a. simplest way is to delete the shader plugin that isn't needed.
   b. Disable GLSL only : 
      -cfgset=Video.OpenGL.UseExtension.GL_ARB_shader_objects=false
   c. remove/edit the GLSL/CG technique in main entry weaver. 

6. CS flag to check syntax error: -verbose

-Naman

Permalink BEFORESend feedbackAFTER • Trackback (0)
PermaLink Thursday 26:30 am, by naman22 >>>MSGFORM<<<, 35 words, VIEWED 263 TIMES   English (US)
Categories: GSoC 2013

This post title is "Concluding GSoC 2013"

Hi,
Entire water's shader code has been ported to weaver which will enable to add post effects easily. Plus heightmaps to generate natural water waves and larger ocean size.
Now it looks like this...

pertub
LargeWater

-Naman

Permalink BEFORESend feedbackAFTER • Trackback (0)

July 22nd 2013

PermaLink Monday 22:07 pm, by naman22 >>>MSGFORM<<<, 258 words, VIEWED 1588 TIMES   English (US)
Categories: GSoC 2013

This post title is "Update GSoC 2013"

Howdy folks!,

So I had prepared couple of thing that had to be done before actually starting with interactivity.

1). Porting XmlShaders to ShaderWeaver.
2). Mismatching of texturemaps.
3). Large Size of Oceans
4). FFT in oceans
5). miscellaneous

As for 1). I tried to port the code, but I'm kinda still struggling to get it right. Thanks to res, Rlydontknow and Sueastside I'm able to understand them quite well but still weird errors priest.

The Mismatching actually didn't existed in temporary weaver code. so I guess the complete weavers should fix this issue.

The values of CELL_WID, CELL_LEN and MAX_OCEAN_DISTANCE are increased to spread the ocean even wider. but they increased the pre-computation of LODs thus the "gran" (vertex per tile) had to altered accordingly. gran = pow(2.0,LOD_type)/64.0f;

FFT needed VS texture mapping, but weavers weren't complete at the moment. So I decided to give it a shot in old shaders. If you look at the FFT implementation then you'll find that FFT is essentially creats a complex "texture". FFT calculations are very heavy. Thus it would rather be easier to just take a heightmap and use for ocean waves. It actually gives pretty decent result.

Heightmap

Along the way I found that the ocean water move along the camera which shouldn't happen because in a game water usually stays at one particular position. It does that due to LOD calculations. So along with taking waves parameters from the world file, the plugin will also take position and radius to which the user wants it to extend.

-Naman

Permalink BEFORESend feedbackAFTER • Trackback (0)

June 7th 2013

PermaLink Friday 7:04 pm, by naman22 >>>MSGFORM<<<, 39 words, VIEWED 641 TIMES   English (US)
Categories: GSoC 2013

This post title is "GSoC 2013"

Hi,
This Summer is going to be really exciting. I'm gonna beat the heat by mutating the CS water system. Thanks to CS community for considering my proposal on water simulation. Watch out for Wet CS!
starting with shaders. ;)

Permalink BEFORESend feedbackAFTER • Trackback (0)

August 20th 2012

PermaLink Monday 20:24 pm, by Sam Devlin, 248 words, VIEWED 2580 TIMES   English (EU)
Categories: GSoC 2012

This post title is "Final Update Of The Summer"

Hello CrystalSpace,
Since my blog post on Friday, it has been brought to my attention that behaviours and the behaviour layer have been deprecated. Several of the apps I have worked on this summer, and in 2009, use these methods. In particular they are: bttest, pathfindingtest, questtest and steering. An example of how to remove this dependence from them can be found in Jorrit's revision 4958. There is not enough time left to make similar changes myself before the end of GSoC to all the apps I have worked on, but I have begun the removal of them from the life sim demo (Please see revision 4972.)

I have also, since the summarising post at the end of last week, kept myself busy trying to create a navmesh for the island level used in the life sim demo. Unfortunately, during construction an assertion fails in celNavMeshBuilder::GetSectorData. More specifically the problem seems to be in the line polyVerts[0] = csVector3(xbase, cell->GetHeight(x,y), ybase); and occurs because at this time csTerrainCell::heightmap is empty.

This will be my last update for the summer as the hard deadline set by google is today. However, I do hope this will not be my last involvement with CrystalSpace/CEL. I will continue to keep an eye on the mailing list and occasionally lurk in the irc channel. Thank you all again for having me for another summer and I hope the code continues to be of use to the community.

Kind regards,
Sam.

Permalink BEFORESend feedbackAFTER • Trackback (0)

August 17th 2012

PermaLink Friday 17:58 am, by Sam Devlin, 1244 words, VIEWED 8832 TIMES   English (EU)
Categories: GSoC 2012

This post title is "The End of GSoC 2012"

Hello CrystalSpace,
With the hard GsoC deadline rapidly approaching, I thought it suitable to wrap up what I have achieved this summer and my ideas for future development that could be done in the areas I have been working.

Event Driven Behaviour Trees.
Behaviour trees have been updated to an event driven design using a wider, more expressive set of termination statuses (See BTStatus in tools/behaviourtree.h.) Instead of evaluating the whole tree every frame, the new trees only expand a set number of nodes each frame. The number of these can be set using the property "Update Rate." These changes will improve the ability to handle large trees or applications with large numbers of characters.

Furthermore, I have implemented the behaviour tree as a propclass allowing a tree to be assigned to an entity. Because of this change trees are now executed by performing the action "BT Start" as opposed to the previous method of executing the root node. Examples of this can be found in appbttest and the Frankie's in lifesimdemo.

The manual coding of trees, however, has remained largely the same - with nodes constructed and children added using the same methods. Therefore, existing implementations only need to replace the previous execution of the root node with the initiation of the propclass celPcBehaviourTree and starting it by the action "BT Start."

Alternatively, behaviour trees can now be designed in and loaded from XML thanks to plgaddon_behaviourtreeload.

Other methods have also been added, most notably the ability to name a node by SetName allowing for clearer debug messages when a node raises an unexpected error and allowing loop decorators to loop infinitely.

Examples of how to load a behaviour tree from xml are available in appbttest and the life sim demo. Appbttest also has an example of constructing a behaviour tree in code and a related tutorial in the cel user manual.

Future work that may be helpful for the further development of these tools include a save to XML method (for outputting trees either coded or loaded and then manipulated at run time), the continued development of additional decorators (expanding the capabilities of the trees) and the incorporation of behaviour trees into csEditor and/or AresEd. I think the latter may be the key to wide spread adoption of this method in future applications and so am very keen to assist with this where I can post-GSoC.

Recast and Detour (R&D) Update.
The R&D plugin has been updated to revision 345 (the currently latest available) and the construction of NavMeshes is now performed in parallel.

I have also fixed a large number of issues left over from the pre-existing implementation of this plugin that required app developers to handle the deletion of variables initialised within the R&D plugin.

Appnavmeshtest and apppathfinding both demonstrate how to construct, display and use navmeshes.

Due to the unexpected discovery of the bugs mentioned above, I did not get time to get around to a number of deliverables that were considered lower priority but would be significant improvements to the R&D plugin. Namely they are the better handling of portals and the partial loading of NavMeshes. The first I think is a key improvement and should be addressed asap as the current method hardly/doesn't work and effectively limits users to only path finding within a sector, not across sectors.

Other issues noted with the creation of NavMeshes that could do with further attention have been noted in the outside sector of the bias level and the interior sector of the castle level.

--
Bias Level: Outside Sector.
When constructing a navmesh for this sector, the process seems to never stop. However, I predict it would given a very long time. The delay is in the double for loops on lines 2343-2345 of celNavMesh.cpp in the function celNavMeshBuilder::BuildNavMesh. Normally tw and th take values approximately in the range 1-20 but for outside they are both over 600. I think this is because the outside sector is huge, but also because it is a very uniform, flat surface. However, the latter should make it very simple to cover.

Castle: Interior Sector.
The navmesh constructed for the interior sector appears to be made up of multiple overlapping (and slightly different) navmeshes. There should be only one. I think this may be related to the handling of portals, because if you generate the navmesh for this sector alone or even with only one other sector it does not occur. As soon as navmeshes are generated for this sector and two others the overlapping occurs. I think that focussed efforts on a new method of handling portals will fix this incorrect behaviour. This problem is less severe than the above, however, as the path finding still works correctly in this sector despite the overlapping meshes.
--

Finally, I have also added methods to PcSteer for adding a HNavStruct if available and then using this when seeking to find a path rather than the bespoke path finding solution previously used. For an example of this use please see appsteering.

The work I have done on PcSteer could be improved by allowing pursue, flee and wander to also use the HnavStruct but I think a more significant change should be made to this plugin.

I propose that the plpfsteer is deprecated and the functionality of pcSteer merged into pcPathFinder. If the merged propclass is given a HNavStruct it can use that to move between sectors and pathfind within (with HNavStruct eventually being updated to have improved functionality between sectors) or alternatively it is given a celGraph to move between sectors and uses it's naeve move directly towards goal position pathfinding within them. It would also then allow methods such as FollowCyclicPath or FollowTwoWayPath to be used with R&D as well.

The new pcPathFinder would then include all methods for moving agents in an environment with the possibility of using either the celGraph or the recast plugin. Rather than the current convoluted architecture where pcPathFinder uses celGraph and pcSteer which may or may not use the R&D plugin.

Conclusion.
In closing, I think this has been a very succesful summer. I feel this year I have learnt a lot more about the architecture of CEL as a whole and the experience of fixing memory management bugs in other people's code I'm sure will be priceless in the future (despite how frustrating it was at the time!)

Last GSoC I hoped to continue working on CS/CEL after the summer alongside my PhD, this never happened because I understimated how much of my life would become my PhD. After this GSoC I will be writing my thesis and trying to secure a job, so I will not make any promises for how much code I will be able to commit but I do hope to still be a part of the community and assist where I can with getting this code merged back into trunk and used more in future games and applications.

Finally I would like to thank everyone that has made this summer so productive and enjoyable. In particular: Anthony for being my mentor, Christian for his input and advice throughout, Matthieu Kraus for some key comments/suggestions regarding R&D and Jorrit, Vincent Knecht & Anders Reggestad for checking out my branch and testing/trying the apps I've worked on. Thank you all.

Kind Regards,
Sam.

Permalink BEFORESend feedbackAFTER • Trackback (0)

<<>> OLDER STUFF>>

Blog All Title

This is the long description for the blog named 'Blog All'.

This blog (blog #1) is actually a very special blog! It automatically aggregates all posts from all other blogs. This allows you to easily track everything that is posted on this system. You can hide this blog from the public by unchecking 'Include in public blog list' in the blogs admin.

| Next >

August 2014
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 245

powered by
b2evolution