Gamestudio Links
Zorro Links
Newest Posts
Links dont work
by HamzaAhmed. 05/19/22 08:07
Unable to make new structures
by vinitrinh. 05/19/22 06:04
C++ scripts
by AndrewAMD. 05/18/22 16:43
Help with sorting data array
by degenerate_762. 05/18/22 12:24
How to use dataFromCSV
by AndrewAMD. 05/16/22 16:43
MT4, handling requote issues
by Grant. 05/15/22 00:04
Lapsa's very own thread
by Lapsa. 05/14/22 22:59
AUM Magazine
Latest Screens
DEAD TASTE
Tactics of World War I
Hecknex World
Scheherazade's Journey
Who's Online Now
7 registered members (Quad, degenerate_762, 3run, HamzaAhmed, Grant, vinitrinh, alibaba), 262 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Abdou, quandr, SGB1962, QuadraQuant, IcairDap
18781 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Submeshes with Shadowmap and Shader #485350
02/28/22 19:28
02/28/22 19:28
Joined: Oct 2008
Posts: 679
Germany
Ayumi Offline OP
User
Ayumi  Offline OP
User

Joined: Oct 2008
Posts: 679
Germany
Hello,

i have a model with i.e. 3 textures , 3 submeshes and 3 shaders. The shader do the same for all 3 submeshes: He combine entSkin1 with entskin2.

Every mesh needs his own shadowmap.
It s not possible to have one shadowmap for 3 submeshes as one.

[Linked Image]

Skin1,Skin2,Skin3 are Shadowmaps with second coordinates.
Other Skins have a Shader on the texture set by MED (effect).


If i set the first Shadowmap to mesh 1, the result is right.
If i set the second Shadowmap to mesh2, the result is wrong.

The mapping from mesh1 is broken, mesh 2 is ok.
If i set the third Shadowmap to mesh3, the result is wrong.
The mapping from mesh1 and mesh2 is broken.

Any idea?

Last edited by Ayumi; 02/28/22 19:31.
Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485353
03/01/22 01:12
03/01/22 01:12
Joined: May 2005
Posts: 861
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 861
Chicago, IL
I was able to get a working shadowmap. You have to import the model as FBX with two different UV sets. This is possible to do in Blender.

It's been a few months since I worked on it though, so bear that in mind. When you say sub-meshes, I think you are just referring to different closed sets of geometry? Or is it something more technical than that?

Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485354
03/01/22 01:14
03/01/22 01:14
Joined: May 2005
Posts: 861
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 861
Chicago, IL
Can you put all the different skins into one image? You would have to move the UVs around a bit, but then you can just have one Skin for all the textures, and one for the shadow map.

I'm assuming you set up the second UV correctly, but if you are not sure about that, I can maybe help walk you through that part.

Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485355
03/01/22 08:13
03/01/22 08:13
Joined: Oct 2008
Posts: 679
Germany
Ayumi Offline OP
User
Ayumi  Offline OP
User

Joined: Oct 2008
Posts: 679
Germany
Sub-mesh means a closed set of geometry, yes. Every texture needs his own mesh (1 model, 3 sub-meshes, 3 textures e.g).

It s not possible for me to use only one shadowmap because the model has 12 textures /12 groups of sub-meshes.
Of course i could split them but it s not nice laugh That s the last option.

I also tried 1 shadowmap for all groups but if you activate the second UV-set in MED, you have to set a the shadomap to a mesh. Otherwise you can not use a skin mapping. If i try to set the the shadowmap for all groups not using a skin mapping, the shader should use entSkin2 with no coodinates (0,0).


Last edited by Ayumi; 03/01/22 08:15.
Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485362
03/01/22 15:10
03/01/22 15:10
Joined: May 2005
Posts: 861
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 861
Chicago, IL
You may have to write a custom shader to match the way your model is set up.

Reach out to Jumpman ... he's good with shaders and may be able to help.

Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485364
03/01/22 16:41
03/01/22 16:41
Joined: Oct 2008
Posts: 679
Germany
Ayumi Offline OP
User
Ayumi  Offline OP
User

Joined: Oct 2008
Posts: 679
Germany
Ok thank for your help.

Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485370
03/01/22 21:50
03/01/22 21:50
Joined: Oct 2008
Posts: 679
Germany
Ayumi Offline OP
User
Ayumi  Offline OP
User

Joined: Oct 2008
Posts: 679
Germany
My friend has found a solution.
You have to merge all groups in MED, than add the new shadowmap, activate second UV set and add the Mapping. The Mapping should be contains all Coordinates from the meshes.

The order is important. Anyway, it works.

Last edited by Ayumi; 03/01/22 21:51.
Re: Submeshes with Shadowmap and Shader [Re: Ayumi] #485377
03/02/22 20:38
03/02/22 20:38
Joined: May 2005
Posts: 861
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 861
Chicago, IL
Yeah, it is tricky to figure out. But it works laugh


Moderated by  HeelX, rvL_eXile 

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