Page 1 of 1

Confusion and problem about dynamic items import

Posted: 18 Jul 2014, 22:53
by TitiShu
When trying to import a dynamic object that use ingame materials.

In the "MeshParams.xml" if I put (Dynamic like it's said in the documentation)

Code: Select all

<MeshParams Scale="1" Collection="Storm" MeshType="Dynamic">
	<Materials>
		<Material Name="Platform" Link="Platform" />
		<Material Name="Lights" Link="Lights" />
	</Materials>
</MeshParams>
I've this error in the importer :

Code: Select all

invalid MeshType value :Dynamic

So the old Dyna value seems to work :

Code: Select all

<MeshParams Scale="1" Collection="Storm" MeshType="Dyna">
	<Materials>
		<Material Name="Platform" Link="Platform" />
		<Material Name="Lights" Link="Lights" />
	</Materials>
</MeshParams>
But now i've this error about the materials

Code: Select all

Material link not found in lib : platform
But when i import this item as static there is no problem with materials...
So are ingames materials different betwen Dynamic and Static or it's an importer bug ?

_________________________

Other problem : when I try to use the HitShape value in the "Item.xml" and that i've already import a shape (with static meshtype value) the importer can't find the shape file


Here is the sources files : https://www.dropbox.com/s/023nq7m1jkswa2a/PickUp.zip

Re: Confusion and problem about dynamic items import

Posted: 19 Jul 2014, 10:38
by Fix
Ingame (blocks) materials are all static. excepted, there is a Platform_Dyna used for the rotor rotating blades.

Re: Confusion and problem about dynamic items import

Posted: 19 Jul 2014, 16:52
by TitiShu
If i import the mesh as static and item as dynamic its possible to use ingame materials for dynamics... on the new SpeedBall ball I've used some materials (platform and lights) and it works pretty well

Doe this limitation come from the materials that use world space uv (if i'm right)???

Re: Confusion and problem about dynamic items import

Posted: 21 Aug 2014, 09:25
by Fix
I can't explain everything exactly, it's Luckyboy's domain, but static shaders use UV2+Lightmap for ambient shading/lightning, and dynamic ones get their ambient color elsewhere. And I'm sure there are other differences, such as primitive packing, tangents storage/reading and stuff I don't understand :p
Some shaders have a dynamic conterpart, some others don't.
World Texture coordinates materials (a planar from top or from sides) wouldn't work becasue the coordinates depends on the position of the object => the texture will not move with the object.

Re: Confusion and problem about dynamic items import

Posted: 21 Aug 2014, 19:42
by TitiShu
This is exactly what i tought, hehe... thank's for the explanation...

so there is no real problem about using static shaders (ex: platform)... :D nice

Re: Confusion and problem about dynamic items import

Posted: 22 Aug 2014, 11:49
by Fix
Well, I wouldn't say no real problems =)
You need to check the rendering of your items in all qualities/moods/lighting situations to be sure the artefacts are not annoying.
You're also taking the risk, by using a hack, that later, if the engine receives optimizations / modifications, the result will no longer be acceptable / supported.
Personnaly, I think it's better to stick to supported things whenever possible, it's more robust for the long term.

My personal experience is : You always pay a hack one day, when you're making things for the long term.