Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, Quad, AndrewAMD), 936 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
ent_fixnormals - error? #395644
02/25/12 22:43
02/25/12 22:43
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
Hallo,
I have to ask now. What the hell is wrong with ent_fixnormals.
I modified a mdl (not a terrain) with ent_setvertex and used
ent_fixnormals(ent, 1) after the manipulation
(I tried also 0 for the frame parameter). The problem: each time
I call fixnormals the meash is reset to its original state. That's
realy annoiying. I didn't post it in the bugs forum, because I
am hoping I missed something.

Re: ent_fixnormals - error? [Re: jenGs] #395652
02/26/12 01:32
02/26/12 01:32
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Ive come across this problem before and never got a good answer to why.

BUT, the fix for me was to use "ent_fixnormals(ent, ent.frame);"


Hope this is of some help...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_fixnormals - error? [Re: EvilSOB] #395655
02/26/12 05:41
02/26/12 05:41
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
I donīt see the error here. When calculating the normals for frame X why should the entity be in an other state than frame X?

Re: ent_fixnormals - error? [Re: Hummel] #395657
02/26/12 07:24
02/26/12 07:24
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
@EvilSOB
unfortunately that doesn't fix the problem for me, but thank you for your suggestion.

@Hummel
That's the thing I don't understand here. I do some heavy vertex manipulations, I added the wireframe material to see if the mesh is realy modified. If I don't call fixnormals, the mesh is modified like it is supposed to be. But even if I use fixnormals a lot of frames later (or in the same frame), the mesh is reset to it's original state. And to be sure, no mdl has any frames (one of course).

Re: ent_fixnormals - error? [Re: jenGs] #395666
02/26/12 11:35
02/26/12 11:35
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Ahh, now I got it: it resets your deformation also. Well, thatīs definitely not correct. Best is you upload a small sample project showing the prob so others can check whatīs going wrong there.

Re: ent_fixnormals - error? [Re: jenGs] #395670
02/26/12 13:39
02/26/12 13:39
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Try with D3DXComputeNormals, like code below:

Code:
function on_n_event()
{ 
	while (key_n){wait (1);}
	
	LPD3DXMESH Mesh = ent_getmesh(ent, 0, 0);

	D3DXComputeNormals(Mesh, 0);

	ent_setmesh(ent, Mesh, 0, 0);
}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: ent_fixnormals - error? [Re: rojart] #395704
02/26/12 19:31
02/26/12 19:31
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline OP
Member
jenGs  Offline OP
Member
J

Joined: Jul 2010
Posts: 283
Germany
Thank you rojart. that helps. It is a good workaround. Perhaps it is even how ent_fixnormals should do the job.

I will put a small example together to show how this "bug" works.
Even if there is a workaround the function should work (or be on the bug list)

Re: ent_fixnormals - error? [Re: jenGs] #395759
02/27/12 13:39
02/27/12 13:39
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This was already reported for terrain some time ago. It is fixed in the latest version.

Re: ent_fixnormals - error? [Re: jcl] #395785
02/27/12 16:25
02/27/12 16:25
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Can you say WHICH version that is?

Is it a public version? Or is still in 'closed' beta?

Thankx


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_fixnormals - error? [Re: EvilSOB] #395839
02/28/12 09:02
02/28/12 09:02
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
It's the beta. But if someone needs the beta for testing such a particular problem, please PM me - I can submit a link.

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

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