Updates from October, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • Pablo 12:37 AM on 25 October 2012 Permalink | Reply  

    A* Pathfinding in simple words 

    When you think in pathfinding, without knowing anything, the most simple algorithm you can think of to find a path form point A to point B from within a net of connected nodes is to walk every possible path until eventually you hit the destination, and then build the final path walking backwards.

    The A* algorithm does exactly that BUT it adds a layer of selective picking on top of that. How? By assigning a value to each node it gets and constantly analizing only the nodes with the smallest values first. This, eventually, produces the finding of the path without actually analizing the entire possible map, just the nodes most likely to be the correct ones.

    You feed this algorithm with two nodes, the origin and the destination. At this point, the algorithm is not aware of the entire map, there could be millions of nodes, but at this point we only know one: the origin.

    The cost of this node is cero, obviously, we are there. From this point, we start collecting nodes, starting with all the nodes connected with the origin node (it’s neighbours), and while doing that we assign a value to each node and add them to a list of “nodes to check”, removing the origin node form this list since we already checked it, and move on to the next node in the list which now has new nodes added. Now, before selecting another node from the list, we first sort it, from the least to the highest node’s vales. And then pick the node with the smallest value and repeat the process basically.

    So if you removed that “value assigning and sorting” part, what the algorithm does is picking nodes, and adding it’s neighbours to a list, and repeating until there’s no more neighbours or the target was found. This is how you step by step cover the entire map of nodes.

    The key of the algorithm is the selective picking on top of that simple process, which makes it find the closest paths. If you always pick the most likely to be the closest node, you will end up finding the path faster, and even before analizing the entire map of nodes!

    For more info read this tutorial which i think it’s the best one arround: http://www.policyalmanac.org/games/aStarTutorial.htm

  • Pablo 10:22 PM on 22 October 2012 Permalink | Reply  

    Room Test Demo 

    Ok, so following David Jone’s suggestion 😉 i decided to build a little demo of the room.

    It’s modeled in Blender 2.63 and textures are from the game Return To Castle Wolfenstein.

    Lights are baked into the textures. I removed the smoothing intentionally to give it an old-school / playstation 1 kind of look (good times…)

    And yes, it’s a little dark… it’s suposed to be that way to generate a “scary” feel…

    WARNING: no preloader, the file is about 2.5MB in size. Wait for it to load. Click below to open.

    Click to open demo – Flash Player 11 required.

  • Pablo 12:21 PM on 20 October 2012 Permalink | Reply  

    Blender to Alternativa3D note 

    When you scale/rotate an object in Blender (not inside edit mode), before exporting you should click CTRL+A to “reset” the object’s transformation and making it the “default” transformation. Also, when you do that, also reset the object’s normal, by selecting all the faces and CTRL+N.

    If you dont do this, you MIGHT notice issues like faces looking in the wrong direction or the object being distorted in weird ways.

    So in resume, when you get your object ready to export:

    1. CTRL+A reset transformation: Rotation & Scale.
    2. CTRL+N: inside edit mode, select all the faces, and click this to recalculate all the normals.

    And that should do the trick.

  • Pablo 9:30 PM on 19 October 2012 Permalink | Reply  

    Room Test 

    Here is a screenshot of the room of a level i plan to do for an Alternativa3d Game. It’s based on the game Return to castle wolfenstein, i took the textures from that game and based this scene in the first room of the game with some additions.

    This is a simple render, without any shadows which will make it look better.

    I dont know if i will finish this proyect at all, but it’s a good learning experience for sure.

    • David Jones 7:41 PM on 22 October 2012 Permalink | Reply

      nice it looks cool, you should throw up a little demo or something

      • Pablo 10:24 PM on 22 October 2012 Permalink | Reply

        Done, check out my last entry. I was giving up on that room, if it wasn’t for your comment i would probably never had ported it into Alternativa3d ;D

  • Pablo 10:57 AM on 13 October 2012 Permalink | Reply  

    Alternativa3d 8 Forest (work in progress) 

    I’m trying to make a forest in alternativa3d with los polygon techniques. So far i created 1 type of tree and multiplied several times changing position and rotation. I will have to do 2 or 3 more types of trees and several other objects until i finish, but so far is looking decent…

    The only 3d body is the trunk, the rest are planes with textures with opacityMaps (the branches). I think that after i finish with the modeling, the addition of normal maps will make the forest look much better.


  • Pablo 11:08 AM on 12 October 2012 Permalink | Reply  

    Nvidia Normal Map Plugin for Photoshop! 

    This plugin allows you to create normal maps from photoshop! It’s very cool:

    Download it from this url: http://developer.nvidia.com/content/nvidia-texture-tools-adobe-photoshop

    Video tutorial: http://www.youtube.com/watch?v=KG3pTxgZdsI

  • Pablo 6:08 PM on 8 October 2012 Permalink | Reply  

    Alternativa3d 8 Fog! 

    Today David Jones posted a tutorial on how to create a fog effect in alternativa. This is apparently under development, so it’s not “official” and im guessing it can change at any time, but, for the moment, this gets the job done at the cost of editing a few lines of code of the engine’s sourcecode (but nothing too serious, just un-commenting lines)

    More details here: http://davidejones.com/blog/1631-fog-alternativa3d-8/

    This is the result i got (editing the example code called “demo example” that comes with alternativa )

    • David Jones 6:27 PM on 8 October 2012 Permalink | Reply

      Nice! Using the demo examples looks much better than mine, I think the simple geometry and colours I used in my demo didn’t really work well.

      I’ve been looking at a post processing fog effect too which i might get working at somepoint.

      • Pablo 6:01 PM on 10 October 2012 Permalink | Reply

        i saw Papervision3D fog examples where they use Sprite3Ds and they looked very cool… but i think that Alternativa3D has some kind of bug with Sprite3Ds, it draws them even if they are not in screen view…

  • Pablo 3:55 PM on 8 October 2012 Permalink | Reply  

    Importing COLLADA (*.dae) from Blender 2.63 to Alternativa3d 8 

    When you export from Blender 2.63 to Alternativa3d 8 you wont be able to load the model at first try, you will need to add a “name” attribute in the DAE file in order to Alternativa3d to find the objects.

    You must open the DAE with a text editor (it will be an XML file) then add a “name” attribute with the same value as the “id” attribute of each NODE element in this root:

    %XMLROOT% -> library_visual_scenes -> visual_scene -> node

    There you will see something like:

    <node id=”level” type=”NODE”>

    and you must change it to:

    <node id=”level” type=”NODE” name=”level”>

    To do this automatically, pre-parse the XML before passing it to the ParserCollada to add this attributes:

    			var colladaXML:XML = XML(new LevelModel());
    			var ns:Namespace = colladaXML.namespace();
    			var xmlCount:Number = colladaXML.ns::library_visual_scenes.ns::visual_scene.ns::node.length();
    			for(var i=0; i<xmlCount; i++)
    				var nodeName:String = colladaXML.ns::library_visual_scenes.ns::visual_scene.ns::node[i].attribute("name");
    				var nodeID:String = colladaXML.ns::library_visual_scenes.ns::visual_scene.ns::node[i].attribute("id");
    				if(nodeName == "")
    					colladaXML.ns::library_visual_scenes.ns::visual_scene.ns::node[i].@name = nodeID;

    Solution provided by user matsuse at http://forum.alternativaplatform.com/posts/list/3452.page (4th post)

  • Pablo 12:37 PM on 7 October 2012 Permalink | Reply
    Tags: Alternativa3d   

    Alternativa3d 8 Decal object. 

    The Decal object is a special kind of object in Alternativa3d 8 that always wins the Z-Sorting against other non-Decal object. What does this means? that if you place for example a normal cube and then you create a Decal object with the same geometry as the cube and place it in the very same position, then the Decal object will be drawed on top of the other object.  If you placed 2 normal cubes in the same place, you would see weird depth swapping results, and it will result in an ugly visual effect…

    On the left, 2 normal cubes, in the same place. On the right, 1 normal cube and one Decal cube in the same place (Decal wins)

    To create a Decal object you:

    1. Instanciate a Decal object.
    2. Set the geometry that the Decal object will use, a reference to a Geometry object. Because the point of using decal objects is to place them over another geometry, this will have the shape of the surface on which it will be placed. Generally a plane, but can be any shape…
    3. Then, based on the geometry, you create the surfaces for the object to be able to map a texture onto it.
    4. Place the Decal object in the scene, at the same position of the desired suface.

    The common use of this type of object is to create visual effects over a surface without changing the texture of the original surface on which it is being applied.

  • Pablo 12:14 AM on 4 October 2012 Permalink | Reply  

    Exporting animated models from Blender 2.63 to Alternativa3d 8 

    Trying to learn the workflow from creating to using a model in Alternativa3D 8 i ran into a lot of issues, but now, i think i have everything in order. Things to consider: When exporting a model from Blender 2.63 it must have it’s UV mapping set, an at least a material assigned to the model.

    Then, if you use IK bones, you must bake the animation  ( the option in blender is called “Bake Action”, i found it pressing SPACE and typing it )

    See: http://www.youtube.com/watch?v=GTlmmd13J1w


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