The wonders of converting 3do mods to s3o - Page 3

The wonders of converting 3do mods to s3o

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: The difficulties of converting 3do mods to s3o

Post by jK »

I would, but you guys were placing the track texels on the wrong positions on the uvmap for ages.

So here again (I noted this already a hundred times):
You need that the track texels/uvcoords reach from one side to the other (either horizontal or vertical), it is impossible when the track uvcoords are bordered in the uvmap by other texels.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: The difficulties of converting 3do mods to s3o

Post by FLOZi »

I was only being half serious :wink: , though I will point out that the newer models / textures (shermans, panzer iii, stug) comply with that. Although Spiked made a dreadful mess of the AO bake on the StuG tex, and the track on the shermans runs down the middle.

Hypothetically speaking, would it be possible for the shader to apply a texture from a separate file or would that make things much more difficult / be impossible due to the s3o single texture file limitation?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: The difficulties of converting 3do mods to s3o

Post by jK »

You can load any texture you want, the only problem is to identify the vertices and their new uvcoords.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: The difficulties of converting 3do mods to s3o

Post by Beherith »

jK, could you help me with the shadows part of your default shader?
The triangle facing directions seem flipped in the shadows, so models with holes (most 3do-s) have broken shadows. I tried duplicating the faces, so each has a back face as well, but it resulted in faces shadowing themselves and artifacting self shadows.

Image shows a mex on a cliff that's been restored to show shadow under it:
Image

Back face shadow artifacts:
Image
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: The difficulties of converting 3do mods to s3o

Post by jK »

You would need to disable culling in shadow pass, the current framework doesn't influence the shadow pass. Not that it isn't possible, it's just additional work I didn't spend yet.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: The difficulties of converting 3do mods to s3o

Post by Beherith »

Is there anything I can help you with in return for this?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: The difficulties of converting 3do mods to s3o

Post by Beherith »

Merry Christmas, Spring!
http://beherith.eat-peet.net/stuff/glowpulse.SWF
Thanks for the framework, jK!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: The wonders of converting 3do mods to s3o

Post by smoth »

woot christmas all around! very cool stuff behe!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: The wonders of converting 3do mods to s3o

Post by knorke »

thread tl;dr
but the glowing llt thing looks very nice!
How does it work/how is it used?
Can this be used to show different textures, ie for damage, rotating propellers, units slowly changing color when being captured?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: The wonders of converting 3do mods to s3o

Post by Beherith »

Great questions, knorke! On the how does it work part:
Grab jKs shader gadgets from EVO, youll need the following parts:
LuaRules/Unitrendering.lua
LuaRules/Gadgets/gfx_customUnitShaders.lua
whole Luarules/Configs directory.

Then you specify a normal map for each unit in its tdf (or lua file)

Code: Select all

	[customParams]{
		normaltex=unittextures/atlas1norm.png;
		normalmaps=yes;
	}
Now you have the normal mapping, but what else does this shader provide? You can pass parameters to the shader based on things like game time, unit health, capture state, etc.

If you plan to go further, its highly recommended to read a bit about shader (its not nearly as difficult as it seems, but is highly specialized)

Showing a different texture on damage is easy, if your units UV map corresponds to the damage texture well. Changing color when being captures is also not too difficult. Rotating stuff is harder.

But anyhow thank you for the great idea of a damage texture, ill try that out, since I still have 1 free channel of data in the normal map I have yet to use. Hope this didnt turn out too tl;dr.
Post Reply

Return to “General Discussion”