Updates from frankiezafe Toggle Comment Threads | Keyboard Shortcuts

  • frankiezafe 17:46 on 2017-03-18 Permalink | Reply
    Tags: , , , , random,   

    Reviewing the road generation system.

    • generation of normal and tangent for each segment (cyan & purple vectors): they can be used easily to generate a new road starting from any point;
    • a million better random selection, based on the formula: X1 = a*X0 + b % m;

    This random generation merits a bit of attention.

    Until now, i was randomly picking a new start point from an existing road to create a new road. The process is consuming, and there is no guarantee to avoid picking several time the same point on the same road.

    With the formula above, found in the great numberphile channel (see below), I attribute once and for all a random to each road’s dot. The particularity of this random generation is that it will NEVER repeat two times the same value in one sequence. Once generated, my dots have a number in the range [0,1], with a linear distribution.

    For instance, in a line having 10 dots (and therefore 9 segments), each dot will have a random number between 0 and 1. If you order the list of dots by random values, and compare the gap between each sorted values, the average gap will be 0.1!

    The way to use this random number is straight forward. If you want to generate a secondary road on 50% of the dot of the first one, you just have to loop over these number and check wherever the random value of the dot is < 0.5. If the distribution was not linear, doing this would not guarantee to create on sub-road every two dots. As it is, you can just specify the percentage, all random calculation has already been done, and in a more controlled way then ofRandomuf() does it.

    This formula requires big prime numbers (>10000) to be placed at a and b. Here is the source i used: list of primes.

  • frankiezafe 00:12 on 2017-03-16 Permalink | Reply
    Tags: , ,   

    too look at closely:

  • frankiezafe 20:34 on 2017-03-11 Permalink | Reply
    Tags: , , , , ,   

    flat network (no Z)

    slight Z curvature

    strong Z curvature

    strong Z curvature

    strong Z curvature

    After a bit of struggle with the management of a 3d grid, the advantage is there: it’s now easy to generate a road network in 3D, with automatic connection of the streets while generating them. It’s a simple brute force & unsupervised generation algorithm, but it is memory efficient and error less.

    Just to explain a bit the images above: the cubes are the cells of the road grid. Only the required one are created during road generation. There are connected to each other to speed up the proximity tests once a now road segment is added. I’ll measure the generation time soon, but it’s already quite fast regarding to the first test made several days ago in processing.

  • frankiezafe 17:45 on 2017-03-11 Permalink | Reply
    Tags: , , ,   

    Generation of a 3d grid of cells, each one of the cells knows who are the surrounding ones. This to speed up searching around the current cell.

    To generate a unique id for each one of the surrounding cell, and quickly find the current cell in the surrounding cell, i used a python that generates a list of enum and a map of opposition. Therefore, when I create a new cell in the grid, its very fast to register it into all the existing ones.

  • frankiezafe 18:25 on 2017-03-05 Permalink | Reply
    Tags: , ,   

    A bit of sight seeing:

    Inside buidling:

    super low resolution far buidlings:

    Orange atmosphere (bg + fog + texture color adapted):

  • frankiezafe 22:42 on 2017-03-03 Permalink | Reply
    Tags: clipping, , , , navigation   

    End of the week video. with a navigation through 2 isles, generated with different configuration:

    • first one have thin and spaced towers;
    • second one have fatty towers.

    The clipping is clashy, and i think i’ll leave it like that.

    • FdeCd 23:03 on 2017-03-04 Permalink | Reply


      • frankiezafe 11:21 on 2017-03-05 Permalink | Reply

        merci – je suis en train de faire des recherches sur la génération de réseaux routiers: passionnant 🙂

  • frankiezafe 14:04 on 2017-03-03 Permalink | Reply
    Tags: , ,   

    Buildings generation is on its way.

    A texture controlling the border of the building has been tuned via a python script. Based on a source image:

    the script generate this:

    The brightness is changing gradually and is controlled by the source image pixels. This avoids the basic gradient.

  • frankiezafe 16:15 on 2017-02-28 Permalink | Reply
    Tags: , , , ,   

    It’s holidays in schools this week in belgium, a good occasion for me to pull out of the grave an old project: disrupted cities.

    4 years ago, the scenes have been generated within blender: city maps, meshes and uvs. I was certain it wouldn’t be too hard to port in real-time, and that’s what i’ve started this morning! The planes are generated at runtime inside the engine, the uvs also, and after a rather long loading, everything runs nice and smooth (see the 2 screenshots above). A huge batch of highres textures, scans of a monotype, are necessary for the visual quality of the rendering.

    The background is not full white, leaving some room for bright events.

    The whole project is about wandering in an abstract city.

    As it is holidays for students, i’ll spend mine working on this, thanks to the devs made since the beginning of the year.

    • xuv 17:54 on 2017-02-28 Permalink | Reply

      Nice. Though RT? WTF? Isn’t it PE? Maybe TMA.

    • frankiezafe 19:11 on 2017-02-28 Permalink | Reply

      Video is rendered with blender, but it will be done in real-time with polymorph engine in several days!!! 🙂 – currently generating the levels of the towers.

  • frankiezafe 11:39 on 2017-02-25 Permalink | Reply
    Tags: citation, philosophie, stiegler, theory   

    Un peu de philo ce matin:

    “La soumission des technologies de l’esprit aux seuls critères du marché les maintient dans une fonction de technologies de contrôle, au service de “sociétés de contrôle”[…]. Cette fonction, qui a pour but de systématiser le développement des applications et des usages des moyens de calcul, de communication et d’information au seul service d’une massification des comportements de production et de consommation dans le sens des intérêts financiers investis à très court terme et à très forts rendements financiers dans les entreprises industrielles, bloque l’accès à ces technologies pour une toute autre finalité. Et en particulier, elle interdit et obstrue systématiquement le développement des pratiques sociales nouvelles et inédites que non seulement elle permettent, mais par lesquelles seulement, là est notre thèse, ces technologies pourront devenir la base d’une nouvelle époque de la civilisation […].”
    Bernard Stiegler, Ars Industrialis, Flammarion, 2006, p. 28

    Cette manière de penser la technologie, en la découplant de ses applications mercantiles, est une des raisons d’être de polymorph. Le code source d’outils complexes et le matériel pour l’exécuter sont accessibles facilement. Ne “reste” qu’à acquérir les connaissances nécessaires et à les mettre au service d’autres enjeux!


  • frankiezafe 21:10 on 2017-02-22 Permalink | Reply
    Tags: , , ,   

    Several hours of work later, the class PMaterial is fully integrated to PNode. This part has been tricky: materials and textures are shared objects, managed by managers below the objects.

    The approach is to create PMaterial on demand, when you call pnode.getMaterial, for instance. Once created, it stays in the pnode until you destroy it or overwrite the material with another.

    This limits the memory consumption and force the coder to always retrieve the material pointer from the pnode, and not to store it.

    Another cool feature of the pnode.getMaterial is that the material can be created RT if the mesh doesn’t specify one.

    On the PMaterial level, it is becoming very easy to add the methods to access the different layers of the Ogre material.

    For instance, here is the code used to create the 2 materials applied on the balls in the image above:

    pmat_even.create( "Test", "Nice material" );
    pmat_even.diffuse( 1, 0, 0 );
    // activation of fog
    pmat_even.fogMode( Ogre::FOG_EXP );
    pmat_even.fogDensity( 0.1 );
    pmat_even.fogDistance( 10, 15 );
    pmat_even.fogColor( 0.4, 0.4, 0.4 ); // same as background
    // cloning pmat_even in pmat_odd
    pmat_odd.clone( &pmat_even );
    pmat_odd.fogColor( 0.8, 0.8, 0.8 );
    pmat_odd.shading( Ogre::SO_FLAT );
    // adding a pass on the material
    // there are now 2 passes in technique 0 of this material
    uint tid = 0;
    uint pid = 1;
    pmat_odd.emissive( 1,0,1, tid,pid );
    pmat_odd.shading( Ogre::SO_FLAT, tid,pid );
    pmat_odd.polygon( Ogre::PM_WIREFRAME, tid,pid );

    It’s super easy to clone a material, at creation or via the clone method. The second pass of the odd material have to be set manually. Passes are not cloneable (yet?).

    As you may notice, mentioning the technique or pass to attack is optional. If your material has only one technique and one pass, the call is very short. Once you beginning to build a more complex material, adding 2 uint at the end of your arguments should not be too difficult…

    The material of the cube is also created manually:

    PMaterial pmat2( pmat_even );
    // disabling the fog
    pmat2.fogMode( Ogre::FOG_NONE );
    pmat2.diffuse( 1, 1, 1 );
    // checking the number of textures
    if ( pmat2.getTextureUnitCount( ) == 0 ) {
    	// adding one 
    	pmat2.addTexture( "General", "child-computer.jpg" );
    } else {
    	// modifying the first one
    	pmat2.setTexture( "General", "child-computer.jpg" );
    cube.material( &pmat2, true );

    More, soon!

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc