Main Menu
Menu

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.

Show posts Menu

Messages - raft

#1876
Support / problem with applet and heap space
August 29, 2006, 01:15:05 PM
hello,

a few days ago i've profiled karga and let me share what i found about memory concerns:

world.removeAll();
world = null;

unfortunately this code piece doesnt effectively retrieves heap back :/ Object3D has a package public field called myWorld referencing its world and world.removeAll() doesnt clear this field. so if you have a reference to any of the objects of your old world, that means you still hold a reference to your world :/

worse enough nulling all of your references to Object3D's and your world and callling System.gc() does not instantly retrieves heap back. if you carefully cleared all references, after some time jvm will correctly garbage collect your world but not instantly.

i suspect this is due to garbage collection mechanism: for instance if object A has a reference to object B, and object B has a reference to object A, and these two arent referenced by any other objects, jvm will eventually garbage collect the two. but i guess it takes some time for garbabe collector to detect the situation

btw, upcoming jPCT version (1.12) has an improved Mesh.compress() method which almost reduces memory requirements to half ;) it may help you a lot

you may also consider using java web start instead of applet. jws is much more flexible than applet and also allows setting max heap size even for untrusted applications

hope this helps
r a f t
#1877
Projects / aptal karga (foolish crow)
August 20, 2006, 05:26:34 PM
thanks for the feedback Egon ;)

as you know, as i use fixed timestep aprroach in karga, fps is limited (30 at the moment) so even on a super fast machine or with an empty scene it doesnt -shouldnt- exceed 30 fps

am i missing something ? what's that surprising you  :roll:

a few people reported karga running extremely slow (5 or less fps) on  very fast machines. i've never encountered that but i was suspecting it may be because of dual core cpus (because of thread synchronization or whatever) but according to your benchmark this isnt the case. at least not for all dual core cpus  ;)

btw, i have now a moderate laptop (toshiba m70-162) with intel mobile 915m video chipset but i still cant run fps and car demo with hw renderer at linux (fedora 4) it complains saying it couldnt find a valid video mode :roll: by default fedora 4 didnt recognize my chipset, so i downloaded a recent X server and compiled and installed it

r a f t
#1878
Support / 3ds max tips
August 17, 2006, 09:12:09 PM
sure, i'll be glad indeed :)
#1879
Support / 3ds max tips
August 17, 2006, 02:12:22 PM
the problem below took me days to resolve, so i thought it may help others if it's documented in a thread.

-- o --

sometimes models arent loaded with 3dsLoader as they look in 3d max. i mean somehow their placement and rotation change when loaded into jPCT.

i first encountered this problem with the commercial village set i use in karga. the producer suggested to use XRef and it effectively solved the problem. this is done by either adding an XRef modifier to each object's stack or by using reset x-form utility in utilities panel (which indeed does the same for all selected objects)

however on some situations XRef doesnt solve the problem. the objects are still misplaced when loaded into jPCT. there seems to be a hidden translation or whatever which XRef doesnt clear, and which in turn confuses the jPCT's loader. here is the solution, it took me days to find it:

create a new object (say a box) and align its center by align tool with our object in question. convert the new object to editable mesh (or poly) and attach our object to it. now go to element sub object level, select new object and delete it. your object has now a brand new transform.

this is the document i found this workaround in: http://fosters.realmwarsgame.com/maxdts/section2.html

note: maybe you may wish to add to this thread in time to build a list of helpful 3d max tips. Egon, maybe you may wish to open a new forum category for this purpose

hope this helps
r a f t
#1880
Projects / aptal karga (foolish crow)
August 12, 2006, 02:50:06 AM
thx manumoi  :D
r a f t
#1881
Projects / aptal karga (foolish crow)
August 10, 2006, 06:33:21 PM
thanks Egon  :D 8)
for popularity i'm not sure. time to time i wrote to some national forums to attract users, these are one of those days that's why there's some crowd inside. for other times i've a few old users who regularly visit karga
r a f t
#1882
Projects / aptal karga (foolish crow)
August 09, 2006, 03:10:53 PM
* new dresses are in
* balloons are improved. they look better and placed more smartly. also they are configurable by user

some new shots:




r a f t
#1883
Support / Problems with pixels~!!
August 08, 2006, 03:32:43 PM
hey, it's a nice applet Mizuki, the player's movements are so smooth :)

Quote from: "EgonOlsen"About the clod...a real clod should be doable somehow but the affords needed to do it will most likely kill its benefits. r.a.f.t once did something like this for Karga...maybe he can help here. Clothing simulation should be possible as it is possible to get access to the raw vertex data of a mesh by using an IVertexController (like this deformed plane shows it: http://www.jpct.net/pics/vertexcontrol.jpg).

i'm afraid what i did wasnt actually a cloth simulation. i mean i never used IVertexController for that purpose. i just seperated some parts of the body (like hair) and recorded all animations of body for also those seperated parts. then  in karga added the part as a child to body to move it with body and applied the same animation to that part. currently all mesh based avatar variations (only hair indeed, it sounds cool if i say so ;)) use this technique

r a f t
#1884
Projects / aptal karga (foolish crow)
July 08, 2006, 02:05:50 PM
thx, i'm glad to hear that from you :)
for alice, yes all users share the same chat session so alice remembers the last user's name ;)
r a f t
#1885
Support / Another Texture Problem
July 07, 2006, 11:03:41 PM
as i remember (i cant reach 3d max at the moment) 3d max converts all texture names to uppercase during export

have a look at console output of your application, if this is the case you should see jPCT warning you for adding non existing textures to texture manager (which are indeed uppercase versions of fps example)

if so, you can either convert all texture file names to upper case or find the code piece which adds textures to texture manager and convert names to uppercase there

hope this helps
r a f t
#1886
Projects / aptal karga (foolish crow)
July 07, 2006, 10:51:19 PM
among lots of other boring admin and similar staff, these may be of interest:

* added basic sound support using Ogg Vorbis encoding
* added invisibility and away mode
* added dance animation and dance and kiss music
* and alice bot is in ;) she just chats and accepts all suggestions but doesnt move around at least for now

r a f t
#1887
Support / JPCT Hello World
June 12, 2006, 10:28:19 PM
you need to call world.draw(buffer) after world.renderScene(buffer);

r a f t
#1888
Support / hang during texture load
May 17, 2006, 03:34:02 AM
thanks for the tips ;) i use netbeans 5 but will remember the eclipse tips for future reference

i've completely forgotten the ctrl+break sequence, but unfortunately it doesnt work on my system :shock: possibly because of the keyboard
r a f t
#1889
Support / hang during texture load
May 17, 2006, 12:05:15 AM
hello,

sometimes program hangs during initial texture loads. this typically happens after running the program a couple of times. i dont think this has anything to do with jpct but with java's image loading mechanism or whatever :?:

by hang i mean a proper hang. it stops responding forever. this is particularly strange since i load such stuff in a background thread, not in awt thread.

furthermore if i try to kill program with control-c it continues at the point it hanged and then terminates.

i suspected a deadlock in awt thread so runned the program with debug option. here comes the most strange part: after a hang, program continues to run if i attach it with debugger :?: anyway, i use this as a local workaround and always start the program with debug option  :wink:

any ideas why this happens and how to solve it
r a f t
#1890
Support / 2D Primitives
May 15, 2006, 07:28:58 PM
i know almost nothing about open gl but i will most likely go after the Mr.Marbles' approach. java.awt.geom package can help to generate textures on the fly
r a f t