Page 1 of 2

Custom Objects Shadow Problem

Posted: 04 Feb 2015, 21:37
by HubbleSM
Hey guys,
i'm currently reworking some old objects that i have made a long time ago to make them embeddable. It's a simple object where i used the material "Tech". As you can see on the pictures, the object is darker than the original texture. On the second picture you can see the object after calculating shadows. Someone knows this problem? How can i make the texture bright? And how to fix the shadow calculation?
(There are no overlapping surfaces in the UV map, i already checked that)

Image
Image

Thanks!

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 05:02
by xrayjay
Hey,

tested and looks the same for me (except the little brighter parts on the build-in block, it´s caused by the lamps which are placed along the sides)
Image
dirty placed texture ^^ the size doesn´t fit, just for testing purposes...

So at your object it could be a lightmap problem, may show your blend file. Or check your game config (graphics)?

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 12:59
by HubbleSM
I tested it with different graphic settings and also with another material (Floor) and it's still the same issue.
You can get the blend file here. I'm not very experienced with modelling objects so there may be some stupid faults :?

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 14:08
by xrayjay
In my opinion there to much verts on your object which are not really needed, some are doubled and some are not visible (why are they there, any special use for that?)

So i made this thing new from scratch and made this whole thing now with 24 verts / 48 edges / 26 faces

Yours got 126 / 166 / 68

The BaseMaterial uv map is empty, there should be your unwrap, the lightmap looks ok but all parts are connected, may this could work but i prefer for lightmap "smart uv project" with these settings 66/1/1 and after this unwrap some finetuning by hand, works best for me (almost on every object)

Here´s the file > https://mega.co.nz/#!FAQ3kC4A!gqlbo9g3X ... Qmujb3mZ6I

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 14:39
by HubbleSM
I tested your version of the object and it worked, thank you very much for this :thx:
Next time i'll try to avoid every unnecessary verts. Maybe it was caused by importing the model from another program (Sketchup) where i created it. Should be better if i learn to model in Blender now ;) . I made the BaseMaterial empty because the texture worked also without an unwrapping there and i think this does not affect the shadows.

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 15:19
by xrayjay
nice :thumbsup:
i noticed one mistake of me, one small edge has got a flipped normal, so look for it (all the little blue lines should point to the outside while you in edit mode), select the one which points to the inside in edit mode and press than ctrl+f > flip normals (that the blue line points outwards) and everything will be good ^^

Tested this thing with an side tex ("WallDeco" parts used) and this appears:
Image

:pop:

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 15:30
by HubbleSM
I noticed that edge already and fixed it :thumbsup:
I thought about using this material for the side (TechWall):
Image

But something is wrong with the texture when flipping the object... looks like the texture is projected from above and doesn't flip together with object :shock:
Do you know if it's possible to avoid this?

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 15:40
by xrayjay
Guess you can´t fix this, some textures are "fixed" to an axis (f.e. all the ...pxz ones works only on one axis and if you turn the object the texture will look deformed/ugly), guess the TechWall is fixed to the x axis, may you have to look for an alternative texture. Or try to unwrap your parts to that texture, may this solves this here.
(or there´s an work around for that and i didn´t know it^^ this appears on all titles with some textures also)

Bit OT: as i watched for an side tex i saw the Platform and Platform2 which i would use but these textures are not inside the StormMaterialLib :teub: Nadeo should give us the opportunity to use em, they are nice :D

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 19:19
by Fix
Platform isn't inside the Material Lib ?? O_O

Re: Custom Objects Shadow Problem

Posted: 05 Feb 2015, 19:39
by maxi031
Hope i am not far from topic.
I did some editing on lib file and discovered that you can construct your own material inside of lib as long as it follows special lib syntax and is using game textures.

Lets say textures for your material are PlatformD.dds, PlatformS.dds and PlatformN.dds, you can than add material to lib like this:

Code: Select all

DMaterial(AddedPlatformMaterial)
		DSurfaceId	(ResonantMetal)
		DUvLayer	(BaseMaterial	, 0)
		DUvLayer	(Lightmap		, 1)
		DTexture( PlatformD.dds)
		DTexture( PlatformS.dds)
		DTexture( PlatformN.dds)
Paste this in Storm lib and it should work as valid game material. :D