Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,310 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Change mesh of an entity without ent_setmesh(); #435852
01/15/14 12:51
01/15/14 12:51
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
Hey, I need a very fast way to change the meshes of entities.
I know I can use ent_setmesh(), but I need to do it in a much more faster way. I just need to set the mesh. No collision update etc. needed. Is there a possibility to set the meshpointer of an entity directly, without ent_setmesh?
I need to set a new mesh on ca.2500 Entities (300poly) every frame. I tried it also with ent_morph, thats fast enough without collision, but the different models need too much space...

Re: Change mesh of an entity without ent_setmesh(); [Re: Benni003] #435855
01/15/14 13:04
01/15/14 13:04
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
maybe using vertex animated models?


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Change mesh of an entity without ent_setmesh(); [Re: sivan] #435857
01/15/14 13:11
01/15/14 13:11
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
I already tried this, have you ever tried to run vertex animation on even 500 cloned entities? The framerate breaks down. I think I have to do it in the way I wrote, but how to get and set the mesh?...

Re: Change mesh of an entity without ent_setmesh(); [Re: Benni003] #435865
01/15/14 14:10
01/15/14 14:10
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
yes, tried grin
cloning is usually a bad thing on memory usage...
depending on the quantity of "frames" you could use multiple entities for each object, and setting/resetting their INVISIBLE flag frame by frame must be fast, and no need for ent_clone.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Change mesh of an entity without ent_setmesh(); [Re: sivan] #435879
01/15/14 14:50
01/15/14 14:50
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
hm multiple entities...
then I would need 300 entities for every Figure... because there will be this much of different needed meshes. tongue

Re: Change mesh of an entity without ent_setmesh(); [Re: Benni003] #435882
01/15/14 15:20
01/15/14 15:20
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
what the hell are you doing? grin


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Change mesh of an entity without ent_setmesh(); [Re: sivan] #435885
01/15/14 15:34
01/15/14 15:34
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Indeed, it sounds like you are running into a XY problem there.
What are you actually trying to do?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Change mesh of an entity without ent_setmesh(); [Re: WretchedSid] #435889
01/15/14 16:45
01/15/14 16:45
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
Hi, actually I'm trying to make a different animation system for my game ^^
If I use vertex or bones animation it's too slow. 1000 Figures should be animated (lowpoly) without crashing the framerate. The animations don't have to be very soft. 15-20 steps per second are enough. I was able to "animate" them with ent_morph with 60 frames per second and 3000 Characters. But all the different models need too much space. Means for one Charakter with one Animation scene I need 15-20 Models.

Re: Change mesh of an entity without ent_setmesh(); [Re: Benni003] #435895
01/15/14 18:18
01/15/14 18:18
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
So you want to replace some thousand meshes manually at runtime and hope that this will yield a faster animation system than the built-in vertex/ bones system? Why don't you just use for example the bone animation via vertex shader? My next game will be an RTS (I assume you are working on one, too), I've already tested it and it works amazingly fast.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Change mesh of an entity without ent_setmesh(); [Re: Superku] #435906
01/15/14 23:52
01/15/14 23:52
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
hm do you mean the matBones shader? I'm using this shader for the animation. 400 Entities are no problem, but more are breaking the frame rate. And these are just the figures... with calling ent_morph on 3000 different entities every frame, the framerate was on 60 per second! And yes, maybe I will work on a RTS, otherwise on Simulation game... but I know that I will need many figures moving around.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1