AI Libraries for Panda3D

Return to Panda Features in Development

Postby NNair » Wed Mar 24, 2010 9:12 am

It is a threaded process and there isn't any control to do that for now.

It looks like you are on the right path. Let me know if you run into problems or if you get it working.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Chia_Pet » Sat Mar 27, 2010 12:29 pm

So is there any plans to do this dynamically ingame or by adding a way to generate from a heightmap for geomipterrain users?

If i understood the csv better i probable could hand build the csv info so i could use this. any chance we could find out more about the csv and what each line is in relation to the others?

(heck if i understood this part better i could probable build a python script that takes your ingame geomipterrain and builds the csv if this would work for the code)
__________________________________
(Plants for the Including of Soft Shadows 'n Panda) Piss'd

We want soft shadows included natively!!
When do we want it?
SOON!!
User avatar
Chia_Pet
 
Posts: 76
Joined: Sat Oct 31, 2009 8:06 pm

Postby JohnKol » Sat Mar 27, 2010 5:00 pm

So is there any plans to do this dynamically ingame or by adding a way to generate from a heightmap for geomipterrain users?


Currently we do not have any plans to do this because of the amount of time commitment required.

If i understood the csv better i probable could hand build the csv info so i could use this. any chance we could find out more about the csv and what each line is in relation to the others?


If you look at page 2 in this post, towards the end there are details about what the csv data is. If you need further information let us know.

Hope this helps. Thank you!
John Kolencheryl

Project PandAI
Entertainment Technology Center
Carnegie Mellon
JohnKol
 
Posts: 35
Joined: Thu Aug 27, 2009 3:40 pm
Location: ETC, Carnegie Mellon University

Postby Chia_Pet » Sat Mar 27, 2010 6:42 pm

ok so i found this:

Grid Size - size of the mesh.

NULL - specifies if a node exists or not.
0 - exists
1 - does not exist.

Node Type - specifies if it is the main node or the neighbor node.
0 - main node.
1 - neighbor node.

GridX - row index
GridY - col index

Length - length of each cell.
Width - width of each cell.
Height - currently overwritten as 0 since height info is not used.

PosX, PosY, PosZ - position of the node in the cell.


and it tells me a little about the Navmesh.csv in the fact theatim assuming it gives all info but things i dont understand are:
1. ordering (does it care what order the information is in?)
2. what does the position of the node do?
3. shouldnt most of the length/widths of the cells be the same as squares are generally used?
4.does the info start at the bottom left or does it matter?
5. if a node does not exist does this mean not at all? if so why did we record it??
6. I see in the static ob demo we can make things marked as not traverable is there an easy way to setup a csv to use my terrain as completely traverable then I can mark the stuff off i need? (I use a 1024X1024 terrain for now and i would like the map to use the same size if possible)

this is just some basic info that is nice to know course some of it really dosnt matter but i think it will help since i will probable have to build my mesh by hand. (Bascally im trying to come up with a way to use your system to hand write a csv but this will be time consuming and i need to know alot of what the system does without being able to read c++ so maybe a simple tutorial on writing the csv would suffice instead of answering all this)(the plan is to use this to write a python code to write a csv it may take time but its a tool so it dosnt need to be fast)

I hope that i didnt bother you too much and thank you in advance for any help you can provide!

Edit: Course I could just need to understand NavMeshes better myself I will be researching this subject to see if I can get a better understanding and with that hopefully be able to work with navmeshes with heightmaps.

Edit 2: I think i have found a round about way to make a navmesh. I use a heightmap in blender to make the terrain export it to egg this allows me to have my terrain info so that i can use it with PandaAI. If you wish to know how to do this go to: http://en.wikibooks.org/wiki/Blender_3D ... heightmaps
the only downside is that the ratio in blender and Panda are not exactly the same so you may have to work with Panda or blender a bit to get it working properly for you.
__________________________________
(Plants for the Including of Soft Shadows 'n Panda) Piss'd

We want soft shadows included natively!!
When do we want it?
SOON!!
User avatar
Chia_Pet
 
Posts: 76
Joined: Sat Oct 31, 2009 8:06 pm

Postby Hypnos » Sun Mar 28, 2010 4:47 pm

this should probably be changed:
Code: Select all
Pursue::Pursue(AICharacter *ai_ch, NodePath target_object, float pursue_wt) {
   _ai_char = ai_ch;

   _pursue_target = target_object;
   _pursue_weight = pursue_wt;
// i think this should be added
   _pursue_direction = LVecBase3f(0.0, 0.0, 0.0);

   _pursue_done = false;
}
Hypnos
 
Posts: 585
Joined: Sat Sep 11, 2004 8:07 am
Location: Zürich, Switzerland

Postby Hypnos » Sun Mar 28, 2010 4:57 pm

another thing, the completion of the seek and pursue is determined by "int(target_distance) == 0". meaning a distance to the target < 1 will make it finish, but depending on the scale of the models used in a game this isnt very practical.
Hypnos
 
Posts: 585
Joined: Sat Sep 11, 2004 8:07 am
Location: Zürich, Switzerland

Postby JohnKol » Sun Mar 28, 2010 9:42 pm

1. ordering (does it care what order the information is in?)
2. what does the position of the node do?
3. shouldnt most of the length/widths of the cells be the same as squares are generally used?
4.does the info start at the bottom left or does it matter?
5. if a node does not exist does this mean not at all? if so why did we record it??
6. I see in the static ob demo we can make things marked as not traverable is there an easy way to setup a csv to use my terrain as completely traverable then I can mark the stuff off i need? (I use a 1024X1024 terrain for now and i would like the map to use the same size if possible)


1. Yes you need to maintain the order as the data will be read in the same order into a vector which is then used for pathfinding.
2. The AI characters will be using these node positions to traverse the mesh. These are the world space coordinates of the nodes. It will be the center of each grid cell.
3. The constraint for the mesh is that it should have the same number of rows and columns. So if you have a rectangular mesh, then all the grid cells will not be squares and cells will have some minute dimension variance.
4. The info starts at bottom left if I am not mistaken. I will confirm this anyhow.
5. If a node does not exist (which means it is an obstacle) it will be specified as null when the data gets written into the vector during runtime. During pathfinding the A* checks if a node is traversable by doing a null check.
6. So you can pretty much divide your entire 1024 X 1024 map into a grid. Make sure your grid has same number of rows and columns and then find the center position of each of the grid cells and assign it as the node positions in your csv. At this point all the nodes in your grid exist and are traversable. Now in the code you can toggle whether these nodes are traversable or not. As long as the data in the csv that you generate is in the same format I don't see why you should have any issue using our pathfinding.


Course I could just need to understand NavMeshes better myself I will be researching this subject to see if I can get a better understanding and with that hopefully be able to work with navmeshes with heightmaps.


Just so that we are on the same page, we use waypoint meshes in PandAI as compared to Navmesh. And we know the confusion is due to the naming convention we used to explain the mesh generation process and pathfinding. Our apologies.

Hope you find this useful.

Thanks!
John Kolencheryl

Project PandAI
Entertainment Technology Center
Carnegie Mellon
JohnKol
 
Posts: 35
Joined: Thu Aug 27, 2009 3:40 pm
Location: ETC, Carnegie Mellon University

Postby Chia_Pet » Sun Mar 28, 2010 10:27 pm

That was a great responce and it really helped I managed to get it working but there are a few issues: as i already posted this info see thread below for question. There seems to be something wrong with the egg file it looks right though...

http://www.panda3d.org/phpbb2/viewtopic.php?t=8786

I think you guys are probable the only ones that can tell me what im doing wrong.
__________________________________
(Plants for the Including of Soft Shadows 'n Panda) Piss'd

We want soft shadows included natively!!
When do we want it?
SOON!!
User avatar
Chia_Pet
 
Posts: 76
Joined: Sat Oct 31, 2009 8:06 pm

Postby JohnKol » Sun Mar 28, 2010 10:35 pm

Unfortunately PandaAI currently does not support blender models. We are still working on it. The way triangles are ordered in Blender eggs are very different from how Maya and Max does it. Hopefully we can get it working soon. Meanwhile if you have access to Maya or Max you shouldn't have any problems.
John Kolencheryl

Project PandAI
Entertainment Technology Center
Carnegie Mellon
JohnKol
 
Posts: 35
Joined: Thu Aug 27, 2009 3:40 pm
Location: ETC, Carnegie Mellon University

Postby NNair » Mon Mar 29, 2010 2:37 pm


another thing, the completion of the seek and pursue is determined by "int(target_distance) == 0". meaning a distance to the target < 1 will make it finish, but depending on the scale of the models used in a game this isnt very practical.



Noted. I think rather than post bugs here on this post, we should do it on a common front. Any suggestions on a bug repository.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby rdb » Tue Mar 30, 2010 1:11 am

How about Launchpad?
https://bugs.launchpad.net/panda3d/
You could possibly use a tag to mark PandAI-related bugs.
rdb
 
Posts: 9307
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby Chia_Pet » Tue Mar 30, 2010 8:49 am

Ok so I would like to announce that the first version of the code to produce a navmesh.csv has been successful. This system was setup for use with geomipterrain. I am now able to pathfind perfectly with this code.

How it works: I used the code to setup a geomipterrain and then grab a bunch of information from the terrain then math code is looped through and a set of points are created that represent the grid that will be used to setup the paths. This does include finding all the neighboring grid squares in the correct order. as it is going throught the lines of the code it is writing them to navmesh.csv now you have the file you need to use PandaAI without having to recreate your terrain in maya or Max.

This system could be rewritten to use any type of terrain the only limit ive found so far is the number of lines in excel. This means that larger terrains Like geomip or |Craigs| new paging terrain may have issues if you make them too big as you would need lots of decent size squares to fill the terrain. (This system could be changed to paging as well if the code runs fast enough)
also depending on the version of excel used this may limit you to 65k lines (office 2003: around 75 squares per row so terrain smaller than 700px X 700px).

To find out the number of excel rows needed before you try to make the file use (N*N)*9 where N is number of sqaures requested. to find a good number for squares you may need to test although i find using the length of my picture/9 shows me aprox the number of squares i want as i find 9px per square is pretty accurate.

I plan on releasing the code later today once optimizing the code is completed.

I would like to take the time to thank a few people that made this possible:
JohnKol (for giving me the info for setting up the navmesh)
|Craig| (For walking me through optimizing the code)
CMU (For making the PandaAI)

Also thank you to everyone in IRC chat that let me bounce ideas off you for this as it was a big help in figuring out how to write the code.
Edit: This code has been fixed for issues that were found below this post.
Code: Select all
import direct.directbase.DirectStart
from direct.showbase.DirectObject import DirectObject
from panda3d.core import PNMImageHeader, Vec3, Texture, GeoMipTerrain, VBase4
from panda3d.core import Filename, BitMask32, TextureStage
#import csv
class World(DirectObject):
    def __init__(self):
        """
        This is a simple system to make PandaAI work with Geomip terrain
        Use ctrl-F to find the line you need to change by using the code inserted at the number in this text
        Things you need to change to make this work:
        1.use your heightmap                            - self.terrain.setHeightfield(Filename("Terrain/Level 1/terraintest.bmp"))
        2.change to number of blocks you want to use    - self.terrain.setBlockSize(64)
        3.Change your texture                           - loader.loadTexture('Terrain/Level 1/ground.jpg')
        4.change this to your heightmap again           - header.readHeader(Filename("Terrain/Level 1/terraintest.bmp"))
       
        Now you can use this code to make your Navmesh.csv for PandaAI.
        """
        base.cam.setPos(-100,512,3000)
        base.cam.lookAt(512,512,0)
        #Load the first environment model
        self.terrain = GeoMipTerrain("ground")
        self.terrain.setHeightfield(Filename("Terrain/Level 1/terraintest.bmp")) #Terrain/game heightmap.bmp
        # Set terrain properties
        self.terrain.setBlockSize(256)
        self.terrain.getRoot().reparentTo(render)
        self.terrain_tex = loader.loadTexture('Terrain/Level 1/ground.jpg')
        self.terrain_tex.setMagfilter (Texture.FTLinear)
        self.terrain_tex.setMinfilter(Texture.FTLinearMipmapLinear)

        # Store root NodePath for convenience then set root settings for the terrain
        root = self.terrain.getRoot()
        #Set the terrain itself to be collide-able.
        root.setCollideMask(BitMask32.bit(0))
        root.reparentTo(render)
        ts = TextureStage('ts')
        root.setPos(0,0,0)
        root.setSz(50)
        root.setTexScale(ts.getDefault(),15,15)
        root.setTexture(self.terrain_tex,1)
        root.setTwoSided(True)
       
        header = PNMImageHeader()
        header.readHeader(Filename("Terrain/Level 1/terraintest.bmp"))
        hy = header.getYSize()
        hx = header.getXSize()
        bs = self.terrain.getBlockSize()
        cuber = (hx-1)/bs
        cubing2 = ((hx-1)/bs)/2

        file=open("navmesh.csv", "w")
        def doLine(*x): file.write(','.join( str(v) for v in x)+'\n')
       
        doLine("Grid Size",bs)
               
        doLine("NULL","NodeType","GridX","GridY","Length","Width","Height","PosX","PosY","PosZ")
       
        for j in range(bs):
            cubing = ((hx-1)/bs)/2
            for i in range(bs):
               
                def h(f,a,b,c=1):
                    if f: doLine(1,1,0,0,0,0,0,0,0,0)
                    else: doLine(0,c,i+a,j+b,cuber,cuber,0,cubing+cuber*a,cubing2+cuber*b,self.terrain.getElevation(cubing+cuber*a,cubing2+cuber*b)*self.terrain.getRoot().getSz())
               
                h(False,                   0, 0,c=0)
                h(i-1 < 0 or j+1 > bs-1,  -1, 1)
                h(i-1 < 0,                -1, 0)
                h(i-1 < 0 or j-1 < 0,     -1,-1)
                h(j-1 < 0,                 0,-1)
               
                h(i+1 > bs-1 or j-1 < 0,   1,-1)
                h(i+1 > bs-1,              1, 0)
                h(i+1 > bs-1 or j+1 >bs-1, 1, 1)
                h(j+1 > bs-1,              0, 1)
               
                cubing += cuber
            cubing2 = cubing2 + cuber
                 
        #Updates the taskMgr
        taskMgr.add(self.updateTask, "update")

        #this updates the terrain when needed
    def updateTask(self, task):
        self.terrain.update()
        self.terrain.getRoot().setCollideMask(BitMask32.bit(0))
        return task.cont

w=World()
run()
Last edited by Chia_Pet on Sat Apr 03, 2010 11:04 am, edited 2 times in total.
__________________________________
(Plants for the Including of Soft Shadows 'n Panda) Piss'd

We want soft shadows included natively!!
When do we want it?
SOON!!
User avatar
Chia_Pet
 
Posts: 76
Joined: Sat Oct 31, 2009 8:06 pm

Postby NNair » Tue Mar 30, 2010 9:20 am

@rdb

Thanks. I have started setting up bugs in bugs.launchpad.

@Hypnos

Added your pursue find to the bug list.

To the community, please feel free to add bugs to this list. Tag them as PandAI for easy searches.

@Chia_Pet

Sounds exciting! I am really interested in looking at this working and the source code.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby JohnKol » Tue Mar 30, 2010 7:19 pm

Ok so I would like to announce that the first version of the code to produce a navmesh.csv has been successful. This system was setup for use with geomipterrain. I am now able to pathfind perfectly with this code.


Nice job Chia_Pet! It would be great if you could post your code to the community so that others can make use of it. And thanks for making use of our libraries.

This system could be rewritten to use any type of terrain the only limit ive found so far is the number of lines in excel.


.csv just means a bunch of comma separated data and is not in anyway an excel format. You can always open it in a notepad or any other text editor for debugging. Excel just recognizes the format and shows it to you in a clean tabular form. So in short the .csv format is not limited by Excel's limitation. Hope that makes sense.
John Kolencheryl

Project PandAI
Entertainment Technology Center
Carnegie Mellon
JohnKol
 
Posts: 35
Joined: Thu Aug 27, 2009 3:40 pm
Location: ETC, Carnegie Mellon University

Postby Chia_Pet » Tue Mar 30, 2010 8:25 pm

Well I hope everyone likes the above code. I know I do and again thanks to |Craig| who made this code run in like 2 seconds rather than 6 minutes (origional runtime) lol.

Now one thing you need to know when you can see your terrain the code is done so shutdown and grab your navmesh.csv to use in your real game! (I did it this way so you knew that it didnt just crash on you and i had to load the terrain to make it work with auto number system anyway)
__________________________________
(Plants for the Including of Soft Shadows 'n Panda) Piss'd

We want soft shadows included natively!!
When do we want it?
SOON!!
User avatar
Chia_Pet
 
Posts: 76
Joined: Sat Oct 31, 2009 8:06 pm

Postby Chia_Pet » Sat Apr 03, 2010 10:23 am

ok new problem, I got the AI working but im not sure what im doing wrong. Ralph can normally move around my terrain just fine using setZ so i figured by making him walk by himself it should be the same but if he is no at 0 height he will fall over i am wondering if this is something to do with PandaAI or maybe my heightmap I generate (as it dosnt include height cause you said to overwrite height). I cannot seem to findout why he will fall when no on level terrain so any advice would be great.

Edit:
Never mind I figured what i did wrong in the code I made. I designed it for 0 on al z's so as soon as i went and tried to go above that our code was fighting even though in your demo you overwrite both sets of Z coord's apparetly this shouldnot have been done. that being said I am working on a fix to my code to work properly for 3d so that this issue dost happen again!
__________________________________
(Plants for the Including of Soft Shadows 'n Panda) Piss'd

We want soft shadows included natively!!
When do we want it?
SOON!!
User avatar
Chia_Pet
 
Posts: 76
Joined: Sat Oct 31, 2009 8:06 pm

Maya troubles

Postby Shoog » Sun Apr 04, 2010 7:05 pm

Hi all,

Is anyone else using PandAI with Maya? I've followed the tutorial videos but the resulting navmesh.csv doesn't seem to work. I always get the errors "couldnt find destination" and "couldnt find source."

Here's the sequence I used:
1. Created a 60x60 plane centered at (0,0,0) in Maya 2009
2. Under INPUTS->polyPlane1 (my plane) I changed the subdivision width and heights to 4 to give me a 4x4 grid
3. Exported this plane as "env_full.egg" and verified it looked right in pview
4. Selected three of the center faces and deleted them
5. Exported this new plane as "env_col.egg" and verified it looked right in pview
6. Ran C:\Panda3D-1.6.2\bin\egg-trans on BOTH "env_full.egg" and "env_col.egg" to create "env_full_tri.egg" and "env_col_tri.egg," respectively
7. Ran "meshgen env_full_tri.egg env_col_tri.egg" to create navmesh
8. Swapped out my "env_col_tri.egg" and navmesh in the PandAI demo StaticObstacleDemo as a means to test it out. (Note: I repositioned ralph and the destination so that they were inside of my area at the start)

Both ralph and the arrow are definitely inside of the plane, but I get the source and destination errors mentioned above. Any ideas what I'm doing wrong?

Thanks for your help!


EDIT:
Well, I've tracked down the source of the problem. Here it is for others to learn from.

The navmesh.csv that's being generated from my eggs appears to have swapped Length with Height and PosY with PosZ.

Sample:
Code: Select all
Grid Size   3                        
NULL   NodeType   GridX   GridY   Length   Width   Height   PosX   PosY   PosZ
0   0   0   0   4.44E-15   20   20   -20   -4.44E-15   20
1   1   0   0   0   0   0   0   0   0
1   1   0   0   0   0   0   0   0   0
1   1   0   0   0   0   0   0   0   0
1   1   0   0   0   0   0   0   0   0
1   1   0   0   0   0   0   0   0   0
0   1   1   0   4.44E-15   20   20   0   -4.44E-15   20


If I swap them by hand, then the navmesh works great.

Root cause:
I was using Maya in Y-Up instead of Z-Up coordinate system. Do'h.
Shoog
 
Posts: 3
Joined: Thu Feb 18, 2010 12:20 am

Postby et1337 » Mon May 10, 2010 6:29 pm

I'm really excited you guys are looking at AI stuff for Panda3D, but I was a bit disappointed by the navigation mesh functionality. It seems as if it's more of a navigation grid than a mesh, and it looks like it needs to be created manually.

So, I took a look at that Recast project, and ended up getting a small portion of it working with Panda3D. Basically I modified the source of their demo application to export .obj files, which I then imported into Blender, and exported to .egg files. Then I used Panda's vertex reading utilities to go through the vertices and generate pathfinding data.

I got pathfinding to work pretty well with my own methods brainstormed in Python, but I cut some corners for performance, and it's certainly not a textbook navmesh implementation. However, it makes me think that someone experienced with the C++ workings of Panda3D could crank out some good code fairly quickly, especially since a lot (if not all?) of it is already done in PandAI.

I think the ability to use automatically-generated navmeshes from Recast is a great feature, and it's already saved me a lot of time. So, does the current version of PandAI support navigation meshes with different shapes (actually, just triangles)? If not I might look into working on it in C++, but it will take me some time to get up to speed.
User avatar
et1337
 
Posts: 63
Joined: Fri Dec 19, 2008 2:29 pm

Postby treeform » Sat May 22, 2010 10:01 am

User avatar
treeform
 
Posts: 2106
Joined: Sat May 05, 2007 5:15 pm
Location: SF, CA

Postby NNair » Thu May 27, 2010 12:10 pm

@ et1337

Yes you are right it is really a navigation grid.

I think it would be a great idea to get Recast working with PandAI and it was something we really didn't have the time to integrate into Panda3D but really wanted to.
It is something I have been meaning to work on too. If you wish to try it, let me know if you reach any hurdles on the PandAI side of the code.

Also,

Then I used Panda's vertex reading utilities to go through the vertices and generate pathfinding data.


Could you please elaborate on which ones you used and an explanation of how.

@ treeform

Thanks for the link.

Cheers
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby et1337 » Thu May 27, 2010 1:39 pm

Here's my vertex processing code, It's mostly ripped straight from the manual.

I extract all the edges, and then use them to form "nodes" which are basically triangular areas in the mesh. The edges then link the nodes together, forming a graph which I can traverse with A*.

Code: Select all
def _processNode(self, node):
      geomNodeCollection = node.findAllMatches('**/+GeomNode')
      for nodePath in geomNodeCollection:
         geomNode = nodePath.node()
         self._processGeomNode(geomNode)
      for edge in self.edges:
         if len(edge.nodes) <= 1:
            # This edge isn't between two nodes, so we don't need to worry about it when pathfinding.
            # But we still need it for determining which node an agent is in.
            edge.navigable = False

   def _processGeomNode(self, geomNode):
      for i in range(geomNode.getNumGeoms()):
         geom = geomNode.getGeom(i)
         state = geomNode.getGeomState(i)
         self._processGeom(geom)

   def _processGeom(self, geom):
      vdata = geom.getVertexData()
      for i in range(geom.getNumPrimitives()):
         prim = geom.getPrimitive(i)
         self._processPrimitive(prim, vdata)

   def _processPrimitive(self, prim, vdata):
      vertex = GeomVertexReader(vdata, "vertex")
      prim = prim.decompose()
      def getVertex(index):
         vi = prim.getVertex(index)
         vertex.setRow(vi)
         return vertex.getData3f()
      for p in range(prim.getNumPrimitives()):
         s = prim.getPrimitiveStart(p)
         e = prim.getPrimitiveEnd(p)
         for i in range(s, e):
            v = getVertex(i)
            if i + 1 >= e:
               break
            v2 = getVertex(i + 1)
            edge1 = self.addEdge(v, v2)
            if i + 2 >= e:
               break
            v3 = getVertex(i + 2)
            edge2 = self.addEdge(v2, v3)
            edge3 = self.addEdge(v3, v)
            self.nodes.append(NavNode(edge1, edge2, edge3))


To determine which node an agent is in, I just do a dot product from the agent's position to the center of each of the three edges. If all three dot products are positive (or negative, I can't remember), the agent must be inside the node. I do some other stuff for vertical testing as well. It's all in the A3P repository.
User avatar
et1337
 
Posts: 63
Joined: Fri Dec 19, 2008 2:29 pm

Postby coppertop » Tue Jun 08, 2010 10:25 am

I hope it's my search skills failing, but I haven't been able to find a version of the Navigation Mesh Generator for Linux. In the download section of the PandaAI website there's only Windows exe and source. Is it included in Panda 1.7? And if so, under what name and/or in what directory (of it's not /usr/bin)? Thanx in advance.
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby NNair » Wed Jun 09, 2010 8:30 pm

@coppertop

You are right. There isn't one. But to aid you I have re-factored some of the code and have the source code for the Mesh Generator available to be downloaded at :

www.srinavinnair.com/downloads (MeshGen_Linux)

Unfortunately, I don't have an executable ready to use, so you will have to build it in your version of Linux using this source code.

The executable should work the same way as the documentation states.

Do let me know if this works fine.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby coppertop » Thu Jun 10, 2010 4:24 am

Thanks for the reply. I've actually managed to build it in the meantime (had to recall how to use g++, hehe) from the source on the PandaAI download website. It seems to work, but if I happen to hit a wall with it, I'll try your version.

Still, I think it should be included with Panda itself. It's kind of a non-sense for PandaAI itself to be included, but not the most important tool to make full use of it.
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby coppertop » Thu Jun 10, 2010 8:09 am

Is there any progress on the Blender side of things? I've tried making the most simple possible navmesh (a sudivided plane) and failed completely, with the character ending up totally confused with the map (as expected given the previous post on the subject). Is there any chance this will get resolved soon? I have no access to neither Max nor Maya and I need PandaAI, so it's a rather huge problem for me...
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby NNair » Thu Jun 10, 2010 1:26 pm

Cool. Good to hear you got it working. I will leave this code up anyways since it is a cleaner version and have removed any panda dependencies (since the mesh generator really doesn't need any).

Sorry, the blender support is still in progress due to time constraints.

Try to use a trial version of Max or Maya till then.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby coppertop » Thu Jun 10, 2010 1:57 pm

I fully understand that time is a problem, and I really appreciate your work so far. However, is it possible to estimate how long it will take to get it to work? I'm only asking this because I'm working on a rather big project (in which I'm planning to make extensive use of PandaAI), and need at least some indication, so that I can plan my work. Don't get me wrong, I'm not trying to hurry you up, I just need to know where I'm standing. I hope you understand that.

Unfortunately I really can't use Maya nor Max, trial included. Max is not an option because I'm on Linux, and I don't seem to currently meet the requirements for Maya.

Thanks very much.
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby NNair » Thu Jun 10, 2010 2:50 pm

Sure. I understand.

Give me a couple of days(upto a week) to get back to you on this.

Thanks.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby coppertop » Thu Jun 10, 2010 3:52 pm

Give me a couple of days(upto a week) to get back to you on this.

Thanks very much, I really appreciate it.
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby NNair » Tue Jun 15, 2010 3:20 pm

@ coppertop

I am sorry but I don't think we can give a definite answer on the Blender support as of now due to time constraints and lack of our knowledge on the EggData side, which I have been researching.

I hope I can get more time to spend on this apart from my other responsibilities (as I am not full time on PandAI anymore). Please assume that there is no Blender support as of now. I hope you still can use other parts of PandAI.

I will post it up when it is fixed.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

PreviousNext

Return to Panda Features in Development

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests