Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
3 registered members (7th_zorro, AndrewAMD, TedMar), 837 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
deforming skinned model #394242
02/11/12 10:53
02/11/12 10:53
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Hi guys,

I'm deforming a model in realtime through ent_setvertex(). This works great as long as there is no uv mapping assigned to the model. But if the model (created in MED) was skinned with the "6 side mapping" tool of MED, the defomring doesn't work:



This is how it should look like:



It seems like the mesh was splitted through the skinmapping. Maybe this is because every vertex occures 3 times in the uv mapping (one vertex is shared by 3 sides of the cube and through the 6 side mapping every side is seperate in the uv mapping):



What can I do to overcome this problem? Do I have to update the uv mapping (btw. how can I do this)?

Thanks for your help!


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: deforming skinned model [Re: Dark_samurai] #394250
02/11/12 12:21
02/11/12 12:21
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
No, it seems that the vertices are not snapped together. Select all vertices and click on "merge".

Re: deforming skinned model [Re: HeelX] #394256
02/11/12 12:59
02/11/12 12:59
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Thanks for your reply. I just checked the model and it has only 8 vertice for sure!

My theory: A vertex can have only 1 uv coordinate. But the uv mapping created with "create 6 side mapping" needs at least 3 vertices per "real" vertex because otherwise it won't be possible to split the sides of the cube as shown in the skin editor screenshot. But I think the 2 additional vertices are somehow hided by the engine and not returned through ent_getvertex(). Thus I can only change one of those vertices which leads to the strange behavior. What do you think?


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: deforming skinned model [Re: Dark_samurai] #394293
02/11/12 17:30
02/11/12 17:30
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Works fine for me:

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////


void main()
{
	fps_max = 60;
	level_load(NULL);
	camera.x = -100;
	you = ent_create("cube.mdl",nullvector,NULL);
	CONTACT* c = ent_getvertex(you,NULL,2);
	c.z += 10;
	c.v = NULL;
	ent_setvertex(you,c,2);
}




"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: deforming skinned model [Re: Superku] #394309
02/11/12 19:26
02/11/12 19:26
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Superku are you sure that your model has the same skin mapping as mine (see screenshot)? All vertex that occure only 1 time in the uv mapping also work for me (you only try 1 vertex so maybe you had luck).

Could you upload the model if the error still doesn't occur for you? Thanks laugh

Btw. if I want to create a mesh that has seperated sides like in the skin mapping screenshot, how would I have to do that? I see no other way than creating the same vertex more than once (because one vertex can't have different uv coordinates)?

Last edited by Dark_samurai; 02/11/12 19:28.

ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: deforming skinned model [Re: Dark_samurai] #394310
02/11/12 19:50
02/11/12 19:50
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i remember having a similar problem, using ent_fixnormals(you, your.frame) might help?

Re: deforming skinned model [Re: Dark_samurai] #394311
02/11/12 19:51
02/11/12 19:51
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Yes, here's the model:
http://www.superku.de/cube.mdl


"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: deforming skinned model [Re: Superku] #394347
02/12/12 10:46
02/12/12 10:46
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline OP
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Thanks MrGuest, ent_fixnormals() fixes the problem laugh


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version

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