Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • frankiezafe 21:20 on 2017-07-30 Permalink | Reply
    Tags: , ,   

    Very interesting article about OpenGL Multi-Context (using the same textures, meshes, etc.) in multiple viewport, typically for multiple projections.
    OpenGL Multi-Context ‘Fact’ Sheet

     
  • frankiezafe 16:20 on 2017-07-19 Permalink | Reply
    Tags: gradient, java, , , sinus   

    The perfect halo function. 

    The halo is generated by making a linear blending between the sine on a sigmoided angle (sinus1) and a standard sine (sinus2 ).

    The sigmoided sine has the advantage of being powerful far from the center:

    +

    The main problem with this method is the very short blurred area, making it too sudden.

    The basic sine method has exactly the opposite problem, tiny white area but plenty of blur.

    To combine both in a smooth way, the code is slowly changing the weights of both process accordingly to the distance (pc).

    The java code (processing.org), looks like this:

    float pc = distance_to_center/256;
    float a = pow( pc, 1.5 ) – 0.3;
    float sig = 1 / ( 1 + exp( ( -8 + a * 16 ) ) );
    float sinus1 = ( 1 + sin( -HALF_PI + ( sig * PI ) ) ) * 0.5;
    float sinus2 = 1 – ( ( 1 + sin( -HALF_PI + ( pc * PI ) ) ) * 0.5 );
    d = 255 * ( sinus1 * (1-pc) + sinus2 * pc );

     
  • frankiezafe 11:41 on 2017-06-27 Permalink | Reply
    Tags: , , ,   

    MMO network library candidate for #TuningGame: RakNet

     
  • frankiezafe 21:13 on 2017-06-25 Permalink | Reply
    Tags: , , , , ,   

    Tutorial for shadow mapping: http://www.paulsprojects.net/tutorials/smt/smt.html

    Resources about shadow techniques:

     
  • frankiezafe 19:40 on 2017-06-17 Permalink | Reply
    Tags: , , ,   

    Working on a two passes material, the shadow pass being potentially added automatically in the material by enabling shadows.

    Here is how it looks:

    material two_pass_shadows
    {
      receive_shadows on

      technique
      {
        
        shadow_caster_material shadowscaster
        
        pass standard
        {
          ambient 0.0 0.0 0.0 1.0
          diffuse 0.8 0.8 0.8 1.0
          specular 0.0 0.0 0.0 1.0 0.0
          emissive 0.0 0.0 0.0 1.0
          alpha_to_coverage off
          colour_write on
          cull_hardware clockwise
          depth_check on
          depth_func less_equal
          depth_write on
          illumination_stage
          light_clip_planes off
          light_scissor off
          lighting on
          normalise_normals off
          polygon_mode solid
          scene_blend one zero
          scene_blend_op add
          shading gouraud
          transparent_sorting on
          
          // SUPER IMPORTANT TO AVOID FLICKERING
          depth_bias 0 -1
          
          texture_unit
          {
            texture rock.jpg
            tex_address_mode wrap
            scale 1 1
            colour_op modulate
          }
          
        }
        
        pass pssm
        {
          scene_blend add
          
          // SUPER IMPORTANT TO AVOID FLICKERING
          depth_bias 0 0
          
          vertex_program_ref ShadowsPssm_vert
          {
          }
          fragment_program_ref ShadowsPssm_pix
          {
          }
          texture_unit
          {
            content_type shadow
            tex_address_mode border
            tex_border_colour 1 1 1 1
          }
          texture_unit
          {
            content_type shadow
            tex_address_mode border
            tex_border_colour 1 1 1 1
          }
          texture_unit
          {
            content_type shadow
            tex_address_mode border
            tex_border_colour 1 1 1 1
          }
        }
        
      }
    }

    There is still issue with wireframe materials for instance ( polygon_mode wireframe ). Another issue is the poor definition of the shadows once the camera is a bit further.

    As shown in this image, there is a clear cut in definition when going from the near texture (green one, 2048) to the second one (red one, 1024). I guess I have to look much closer to the distance steps.

     
    • xuv 03:06 on 2017-06-19 Permalink | Reply

      Nice. We want moarrr screenshots :-D.
      Could you also make the last one work in realtime? Pleeez.

    • FdeCd 08:13 on 2017-06-19 Permalink | Reply

      cool!! And if you had blur that could be fix the definition problem… or not?
      Can’t wait to test it 😉

  • frankiezafe 19:26 on 2017-06-16 Permalink | Reply
    Tags: devporn, ,   

    Juste pour vos yeux, le dump d’un matériau Ogre:

     PMaterial:
        group: General
        name: shadows_pssm_cube
        receive shadows: 1
        transparency cast shadows: 0
        size: 3862
        techniques: 1
            technique[0]
                name:
                scheme: Default
                lod index: 0
        passes: 1
            pass[0]
                name: 0
            ** programs:
                vertex program: Shadows_pssm_vs
                fragment program: Shadows_pssm_ps
                compute program:
                shadow caster fragment program:
                shadow caster vertex program:
                tesselation domain program:
                tesselation hull program:
            ** colors:
                ambient: ColourValue( R:255, G:255, B:255, A:255 )
                diffuse: ColourValue( R:255, G:255, B:255, A:255 )
                emissive: ColourValue( R:0, G:0, B:0, A:255 )
                fog colour: ColourValue( R:255, G:255, B:255, A:255 )
                self illumination: ColourValue( R:0, G:0, B:0, A:255 )
                specular: ColourValue( R:0, G:0, B:0, A:255 )
            ** values:
                alpha reject value: 0
                depth bias constant: 0
                depth bias slope scale: 0
                fog density: 0.001
                fog end: 1
                fog start: 0
                hash: 0
                index: 0
                iteration depth bias: 0
                light count per iteration: 1
                light mask: -1
                max simultaneous lights: 8
                num shadow content textures: 3
                num texture unit states: 4
                pass iteration count: 1
                point attenuation constant: 1
                point attenuation linear: 0
                point attenuation quadratic: 0
                point max size: 0
                point min size: 0
                point size: 1
                shininess: 0
                start light: 0
            ** booleans:
                alpha coverage enabled: 0
                ambient light only: 0
                colour write enabled: 1
                depth check enabled: 1
                depth write enabled: 1
                fog override: 0
                iterate per light: 0
                light clip plane enabled: 0
                light scissoring enabled: 0
                lighting enabled: 1
                loaded: 1
                normalised normals: 0
                point attenuation enabled: 0
                point sprite enabled: 0
                polygon mode overrideable: 1
                programmable: 1
                run only for one light type: 0
                transparent: 0
                transparent sorting enabled: 1
                transparent sorting forced: 0
            ** enums:
                alpha reject function: CMPF_ALWAYS_PASS
                culling mode: CULL_CLOCKWISE
                depth function: CMPF_LESS_EQUAL
                dest blend factor: SBF_ZERO
                dest blend factor alpha: SBF_ZERO
                fog mode: FOG_NONE
                illumination stage: IS_UNKNOWN
                manual culling mode: MANUAL_CULL_BACK
                only light type: LT_POINT
                polygon mode: PM_SOLID
                scene blending operation: SBO_ADD
                scene blending operation alpha: SBO_ADD
                shading mode: SO_GOURAUD
                source blend factor: SBF_ONE
                source blend factor alpha: SBF_ONE
    TEXTURE UNIT COUNT = 4
    NUM TEXTURE UNIT STATES = 4
            textures: 4
                texture[0]
                    animation duration: 0
                    binding type: 0
                    colour blend fallback dest: 1
                    colour blend fallback src: 2
                    content type: 0
                    current frame: 0
                    desired format: 0
                    gamma: 1
                    alpha: 0
                    name: 0
                    num frames: 1
                    num mipmaps: -1
                    parent: 0x7f2a55d47a98
                    referenced MRT index: 18446463019639570529
                    texture anisotropy: 1
                    texture border colour: ColourValue(0, 0, 0, 1)
                    texture compare enabled: 0
                    texture compare function: 6
                    texture coord set: 0
                    texture mipmap bias: 0
                    texture name: cube.png
                    texture name alias: difftex
                    texture rotate: Radian(0)
                    texture transform: Matrix4( row0{1 0 0 0 } row1{0 1 0 0 } row2{0 0 1 0 } row3{0 0 0 1 })
                    texture type: 2
                    texture U scale: 1
                    texture U scroll: 0
                    texture V scale: 1
                    texture V scroll: 0
                texture[1]
                    animation duration: 0
                    binding type: 0
                    colour blend fallback dest: 1
                    colour blend fallback src: 2
                    content type: 1
                    current frame: 0
                    desired format: 0
                    gamma: 1
                    alpha: 0
                    name: 1
                    num frames: 0
                    num mipmaps: -1
                    parent: 0x7f2a55d47a98
                    referenced MRT index: 18446463019639570529
                    texture anisotropy: 1
                    texture border colour: ColourValue(1, 1, 1, 1)
                    texture compare enabled: 0
                    texture compare function: 6
                    texture coord set: 0
                    texture mipmap bias: 0
                    texture name:
                    texture name alias:
                    texture rotate: Radian(0)
                    texture transform: Matrix4( row0{1 0 0 0 } row1{0 1 0 0 } row2{0 0 1 0 } row3{0 0 0 1 })
                    texture type: 2
                    texture U scale: 1
                    texture U scroll: 0
                    texture V scale: 1
                    texture V scroll: 0
                texture[2]
                    animation duration: 0
                    binding type: 0
                    colour blend fallback dest: 1
                    colour blend fallback src: 2
                    content type: 1
                    current frame: 0
                    desired format: 0
                    gamma: 1
                    alpha: 0
                    name: 2
                    num frames: 0
                    num mipmaps: -1
                    parent: 0x7f2a55d47a98
                    referenced MRT index: 18446463019639570529
                    texture anisotropy: 1
                    texture border colour: ColourValue(1, 1, 1, 1)
                    texture compare enabled: 0
                    texture compare function: 6
                    texture coord set: 0
                    texture mipmap bias: 0
                    texture name:
                    texture name alias:
                    texture rotate: Radian(0)
                    texture transform: Matrix4( row0{1 0 0 0 } row1{0 1 0 0 } row2{0 0 1 0 } row3{0 0 0 1 })
                    texture type: 2
                    texture U scale: 1
                    texture U scroll: 0
                    texture V scale: 1
                    texture V scroll: 0
                texture[3]
                    animation duration: 0
                    binding type: 0
                    colour blend fallback dest: 1
                    colour blend fallback src: 2
                    content type: 1
                    current frame: 0
                    desired format: 0
                    gamma: 1
                    alpha: 0
                    name: 3
                    num frames: 0
                    num mipmaps: -1
                    parent: 0x7f2a55d47a98
                    referenced MRT index: 18446463019639570529
                    texture anisotropy: 1
                    texture border colour: ColourValue(1, 1, 1, 1)
                    texture compare enabled: 0
                    texture compare function: 6
                    texture coord set: 0
                    texture mipmap bias: 0
                    texture name:
                    texture name alias:
                    texture rotate: Radian(0)
                    texture transform: Matrix4( row0{1 0 0 0 } row1{0 1 0 0 } row2{0 0 1 0 } row3{0 0 0 1 })
                    texture type: 2
                    texture U scale: 1
                    texture U scroll: 0
                    texture V scale: 1
                    texture V scroll: 0

     
  • frankiezafe 15:29 on 2017-06-16 Permalink | Reply
    Tags: assets, , ,   

    Back to shadows problem, currently implementing a clean version of the Parallel-split shadow maps (pssm) in a way it could be packed nicely in the standard assets of the engine.

    , source: https://www.researchgate.net/publication/220805307_Parallel-split_shadow_maps_for_large-scale_virtual_environments

    End of the day

    PSSM shadows are applied “correctly” in the materials. Still a lot do to to be able to set the shadows from the xml…

     
  • frankiezafe 20:22 on 2017-06-14 Permalink | Reply
    Tags: , computational geometry, , ,   

    Straight skeleton C++ implementation 

    Long time no seen!

    Lot of things happens in may and june, that’s one of the reason of this long silence. The other is the library i’m working on to generate the maps of Disrupted Cities. Implementing a complex process in an efficient way is harsh. But it starts to works nicely.

    A small openframeworks demonstrates the part of the lib dedicated to shrink the 2D shapes, used later in the map to generate the block of houses.

    Shrink Demo on bitbucket.

    See you soon for more.

     
  • frankiezafe 19:45 on 2017-04-24 Permalink | Reply
    Tags: , , , ,   

    Long time no see, but polymorph engine development is back on track!

    The XML describing a polymorph’s project is now able to configure the Ogre’s compositor, understand the post-processing module.

    The first screenshot is using a custom compositor with this configuration:

    <workspace name="TuningScoreWS">
      <script group="General" workspace="CustomCompositor" />
      <colors>
        <color name="background_center" value="0,1,0" node="0" pass="1" index="4"/>
        <color name="background_border" value="1,0,0" node="0" pass="1" index="8"/>
      </colors>
      <variables>
        <variable name="centerx" value="0.5" node="0" pass="1" index="0"/>
        <variable name="centery" value="0.5" node="0" pass="1" index="1"/>
        <variable name="radius" value="0.9" node="0" pass="1" index="2"/>
        <variable name="ratio" value="1.777777778" node="0" pass="1" index="3"/>
      </variables>
    </workspace>
    

    The required files for this compositor (shaders & nodes) can be found in the samples example.compositor.

    The second screenshot is using a default compositor, where only the background color can be modified.

    <workspace name="Default">
      <colors>
        <color name="background" value="1,0,0"/>
      </colors>
    </workspace>
    

    The documentation about the XML is here: https://bitbucket.org/polymorphteam/pe.2.0/wiki/xml-specifications

     
  • frankiezafe 20:42 on 2017-04-17 Permalink | Reply
    Tags: , , , ,   

    To prepare the work session between Tomas Turine and Lisa Nelson, I prepared a OSC serialisation of all the objects available in the 3D world, including mouse and cameras, and built an interface in pd to visualise and use the data.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel