Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Disastorm

Pages: [1] 2 3
1
Support / transparent objects depth?
« on: August 29, 2012, 09:18:10 am »
Hello is there any way to fix this? Depending on the camera angle certain polys of transparent objects seem to appear in front of things that they should be behind.



2
Support / out of memory help
« on: August 07, 2012, 09:34:51 am »
Hello,

I'm making a game and it can start the first time fine, but after I close the Activity and start it back up, it gets an Out Of Memory error.  I unload all my textures, dispose the world and the buffer in the OnStop() method.  What is the best way for me to resolve this error, do I really need to decrease the memory usage, even though the first startup can start fine? Or perhaps I should just make my application kill the process when you quit, although I heard thats not a good thing to do in android?

3
Support / What am I doing wrong?
« on: June 27, 2012, 11:12:46 am »
Hello, I am trying to make an object move toward the camera. I was having some problems so i commented out the normalize call and tried to see if i could just make the object translate to the camera, but I couldn't do it.  This is the code I am using.

Code: [Select]
                                Object3D obj = data.getObject();
Camera cam = visualWorld.getCamera();
SimpleVector desti = new SimpleVector(cam.getPosition());
SimpleVector objCenter = obj.getTransformedCenter();
SimpleVector dest = desti.calcSub(objCenter);

System.out.println(objCenter.x + " " + desti.x + " " + objCenter.y + " " + desti.y);
//dest=dest.normalize();
// dest.scalarMul(0.05f);
obj.translate(dest);
objCenter = obj.getTransformedCenter();
System.out.println(objCenter.x + " " + desti.x + " " + objCenter.y + " " + desti.y);


Output:
973.6122 921.0 -13.489336 -21.0
2551.978 921.0 -483.8615 -21.0

Can you tell me what I am doing wrong?

Thanks.

*edit it looks like it has something to do with me setting a parent object.  When I remove the parent object it translates as it should. Do you know why this is? Could it be related to scaling on the parent?

4
Support / weird problem
« on: April 08, 2012, 01:45:52 pm »
Hello, do you have any ideas as to why this flashing happens on my objects texture, like it flashes from bright to dark depending on camera angle.
Heres a video: http://www.youtube.com/watch?v=3YF4sRAGFR8

Thanks.

5
Support / Running multiple instances of program slow?
« on: March 28, 2012, 12:30:27 pm »
Hello, whenever I run multiple instances of my program it runs insanely slow like less than 1fps.  When running a single instance its perfectly fine.  Do you know why this might happen?

6
Support / setTransparency rotate my object??
« on: July 26, 2011, 01:29:11 am »
Hello, I call setTransparency and it seems to be rotating my object or something, since my object becomes upside down.  Have you seen this before?  It actually looks a little stranger than that like maybe it only rotates part of my object or something. 

7
Support / serialized objects contain the User Object?
« on: July 23, 2011, 07:42:43 am »
Hello do serialized objects contain the User Object, because it looks like when I tried that, the User Object ends up being null?

8
Support / Out Of Memory error?
« on: July 21, 2011, 03:45:33 am »
Hello According to the MemoryHelper I was only using aroudn 10MB memory after compaction, but somehow I got an OutOfMemory error shown here:
http://i8.photobucket.com/albums/a23/Disastorm/OOM.jpg

How can I prevent this?  It happened when I added a whole bunch of objects into my scene (slowly added 1 at a time, through cloneObject).

*edit I saw in another thread you mentioned something about shareCompiledData.  That looks like it may have solved my OutOfMemory issue.
However it seems to work on all my objects except for my "enemies".  For some reason when I call it on them they become invisible... why is this?
also whats the difference between cloneObject and new Object3D(model, true) ? should i actually use the latter instead of cloneObject?  Also I noticed when I do shareCompiledData, my object flashes like brown for a split second when I add it to the world.  If i dont share the compiled data this does not happen.  Is there a way I can stop this flash of brown as it is a little annoying and makes me feel like my game is less polished.

9
Support / Error can't remove object
« on: July 21, 2011, 03:21:08 am »
Hello, I'm not sure how I got this but I was running my application and I got this can't remove object error:

FATAL EXCEPTION: GLThread 9
RuntimeException ERROR: Can't remove object #218!
at Logger.java:189
at World.removeObject:267
...

*edit I think I may have found what I did wrong, is this the error you get when an object was already removed and you try to remove it again?  I think perhaps my collision listener may have had 2 objects collide at the same time with my object and then what happens is i put my object in a queue to be removed later (during the main thread) so I think maybe it added it twice and tried to remove it twice.  Is this the error I would get in this case?

10
Support / TextureManager problem?
« on: July 20, 2011, 01:00:32 am »
*edited this post a million times, texturemanager problem is last half of my post.

Hello I'm trying to figure out what to clear from memory on OnStop so that I don't have a memory leak.  Originally i had a big leak its because I wasn't disposing the framebuffer, but now it seems to be smaller.  Right now I am calling removeAndUnload on all the textures, world.dispose, and framebuffer.dispose.  Is there anything else I need to call?  Do i need to call some dispose method on the actual Object3Ds ( I didn't see one)? Also should I be using VBO?  Does that take any more memory than vertex arrays or does it not really matter?

*edit I think I mostly fixed my memory leak issue but maybe you can tell me if this sounds like there is one or not:

First Run after initialization of the world: 11800 KB (after calling MemoryHelper.compact)
second: 12450 KB
third: 12534 KB
fourth: 12547 KB



 However, I just discovered another problem, on my fifth run, the TextureManager said I have too many textures despite the fact that I removeAndUnload them every time.  It said to change Config.maxTextures but in your javadoc it says "The manager wil increase the value if needed. This is in for historical reasons only. No need to adjust it. Default is 64. "  So is something weird happening?

*edit if only add the textures the initial time and do not add them after that, if i keep restarting my app, it eventually crashes with an out of memory error, something about converting the texture in the gl rendering or something.  Can you tell me what I should do about the texture problem because it is crashing my application.  I tried changing Config.maxTextures but that doesn't help. 

Also what does the "used out of" part mean in MemoryHelper.compact()'s log message?

*edit
oh wow i removed a 1MB texture and it freed up 8-9MB of memory? 

11
Support / 2cameras at once/stereoscopic 3d?
« on: July 18, 2011, 08:46:24 pm »
Hello, I have a 3d phone (older japanese Sharp phone, not the newer LG or HTC one, so I don't know their apis, but maybe the same) and basically all it requires for 3d is to send a doubled image with the left eye image on the left side and the right eye image on the right side on a single SurfaceView.  I was just wondering If there is a way to do this with jpct? Also would be nice making some 3d apps since there aren't many out there right now.

12
Support / cloning/reusing mesh doing weird stuff?
« on: July 18, 2011, 06:11:01 am »
Hello, I noticed cloning or reusing meshes seems to offset the center of the object or something like that sometimes.  Have you experienced this before?  Also should I call build() after cloning an object?  I've tried both ways, and both ways seem to have strange results.

*edit also noticed clearRotation() clears the scale of my model for some reason.

*edit ok i solved it, i was cloning a non-built object and then calling build after cloning, but i guess maybe thats not the proper thing to do? I added the build before the clone and now it works.  However, just wondering, the only build i need is before the clone or should i also call build after?

13
I noticed I load an obj that has a solid color material as opposed to an image file and it seems to work in jpct but after i serialize it for Android, and load it in the android program it does not have those solid color materials?

I also noticed some parts of serialized object looks a bit strange, maybe the textures or something like that.  Is this common?  Not sure if its because of the serialized object or because of android.  Heres an example of the strange textures, those red parts are not supposed to be there: http://i8.photobucket.com/albums/a23/Disastorm/Temporary/weird.jpg

*edit just wanted to point out that the strange textures do not appear on my phone, it ends up appearing perfectly normal.  Is the strange texture something with older version or android or maybe just the emulator?  I wanted my game to be compatible with older versions so I've been using Android 1.6 emulator.

14
Support / Serializer question
« on: July 13, 2011, 09:21:29 am »
Hello, I was just wondering if animations get serialized for Object3Ds when you serialize them with the Deserializer class.

15
Support / texture mapping?
« on: July 12, 2011, 11:10:24 pm »
Hello, I don't know much about mapping other than that there are a bunch of mapping styles that make textures look better because of light, but I saw a cool demo on your youtube of parallax mapping on android, so I was wondering what forms of mapping does jpct support and how do you do them (assuming you already generated the mapping images)? The only method I saw related to mapping on Object3D is setBumpMapTexture (and the android one doesn't even have that method?).  How do you do things like height,parallax, normal, displacement, etc?  Are these actually all forms of bumpmapping so it can just be set in that method?  On your youtube I noticed you used an app called ShaderCL to generate the maps.  Does this mean I can use this application to make my textures look better?

Pages: [1] 2 3