Page 2 of 5

Re: Per-object textures for s3o

Posted: 01 Jan 2008, 09:12
by Pressure Line
exactly rattle.

lets think simple on this, yes AF's grand designs are nice, and would be ultra-cool. But if it takes 6 months for the coding of that to be finished, and the geometry replacement code is finished in 2 week... guess what id rather have (because its all i need.)

Re: Per-object textures for s3o

Posted: 01 Jan 2008, 13:19
by SinbadEV
In theory, based on what I'm hearing, you could pull together an s3o with a blank or generic texture and replace the texture in game with lua... which would be pretty darned intuitive... I'll wait for someone to do the hard part of creating the needed documentation.

Re: Per-object textures for s3o

Posted: 01 Jan 2008, 14:16
by Pressure Line
that is also possible. could be nice to have a lua widget change unit textures based on the map (ie in s44 have 3 textures, a snow texture (whitewashed army-green), temperate (armygreen) and desert (brown))

BUT thats not the point of this thread!

im throwing ideas at quantum (and anyone else who will stand still long enough), based on looking through the Lua API, and we are coming close to a basic methodology of doing this :D

Re: Per-object textures for s3o

Posted: 01 Jan 2008, 14:30
by SinbadEV
Pressure Line wrote:BUT thats not the point of this thread!
Maybe you have mis-understood me...

Okay, you have BasePiece and GunPiece right?

You Make "Tank" Which is an s3o with BasePiece and GunPiece in it, then you have lua replace the texture of BasePiece with the BasePiece Texture and replace the GunPiece with the GunPiece Texture... then the model is cobbled together from different pieces and the lua associates those pieces with specific textures.

Re: Per-object textures for s3o

Posted: 01 Jan 2008, 14:54
by Pressure Line
ahhhhhhh. aye. that could be useful. that may infact be the way to go... *investigates*

Re: Per-object textures for s3o

Posted: 01 Jan 2008, 15:17
by AF
What I suggested has already been done using modular weapon units and transport cob code in OTA and spring. It is hardly grand at all and steps towards these types of systems have already been made in lua in other projects.

The difference is that with lua we can avoid cob and handling transport tags entirely as well as having to build them all separately and manually attach modules, it could all be done automatically without the user being aware and we'd get a far more flexible system out of it too.

Re: Per-object textures for s3o

Posted: 02 Jan 2008, 05:25
by rattle
AF wrote:The difference is that with lua we can avoid cob and handling transport tags entirely as well as having to build them all separately and manually attach modules, it could all be done automatically without the user being aware and we'd get a far more flexible system out of it too.
Create a working example which can be animated through COB, in one script that is, not one per piece. And a Lua framework while you are at it.

Spring needs an extended model format which supports more than one texture.
And RGBA textures, team color can be read from texture 2's blue channel or from a seperate grayscale image. And easy to setup materials. Think of all the headlights that could have been had.
Of course, that involves lots of work and jc is pretty busy like everyone else. I still think it would be worth it.

Re: Per-object textures for s3o

Posted: 02 Jan 2008, 09:01
by KDR_11k
I would say controlling attached pieces with one COB would need the compiler so we could add a "move <piece> in <part> to x-axis <bla> now" command and such.

Re: Per-object textures for s3o

Posted: 02 Jan 2008, 09:43
by Pressure Line
rattle wrote:I still think it would be worth it.
+âˆŝ for truth

Re: Per-object textures for s3o

Posted: 02 Jan 2008, 14:19
by AF
I understand enough to know what to do but I lack the lua and cob knowledge to actually do it.

( imagine knowing every single aspect of a bridge and going to build it only to find you don't know how to use your hands )

Re: Per-object textures for s3o

Posted: 02 Jan 2008, 23:58
by aGorm
AF wrote:( imagine knowing every single aspect of a bridge and going to build it only to find you don't know how to use your hands )
We should start a book on his analogies...

aGorm

(sorry for off topic)

Re: Per-object textures for s3o

Posted: 05 Jan 2008, 13:53
by Pressure Line
im part of the way through the most basic form of this :D

i do not know how well its going to work, but i figure if i can at least get the ball rolling, more competent people will be able to guide me towards better ways of doing this :D

Re: Per-object textures for s3o

Posted: 05 Jan 2008, 15:03
by kiki
AF wrote:imo it would be far more useful to be able to specify external s3o models as objects inside an s3o, and even have the option to swap them out ingame using lua for other pieces.

This way you get the multiple uv maps you're requesting, and you also allow for a truly enormous amount of flexibility we would have otherwise missed out on, ranging from custom flags and banners on units, earth 2150 component designing of units, to extreme animations and transformations by adding and removing new premodelled geometry on the fly.

Of course one could argue that this is already possible using lua gadgets.
Yes, very important for me, to keep down size and allow custom weapons systems for the units of my praetorian faction in UA. Thus eliminating messy transport work-arounds (ala Blox).

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 09:37
by Pressure Line
Pressure Line wrote:im part of the way through the most basic form of this :D

i do not know how well its going to work, but i figure if i can at least get the ball rolling, more competent people will be able to guide me towards better ways of doing this :D
progress report! and pictures!

i have successfully converted a model into a .lua file. and now have managed to draw it onto a unit :D

Image

theres still a bit of work to go, but its getting there :D

*edit* now with 100% more shading!

Image

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 09:44
by Pressure Line
dbl post for great thanks!

major props to quantum and jK for all their help so far! as well as trepan, for writing the widgets i cannibalised to make what i have so far.

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 12:17
by Pressure Line
gg. triple post. oh well.

Image

with the texture drawn onto the fuel tanks. one last bug to fix, then im all set :D

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 14:01
by Pressure Line
quadpost ;_; what ive done so far is now availible here.

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 16:38
by Peet
Does it [is it even possible to?] z-sort with terrain and features water and other units?

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 16:44
by Pressure Line
as far as my testing has shown it gets drawn just like a unit does. ie; behind terrain, features and under water (assuming that the unit its rendered onto is also behind these things)

if thats what you are asking.

Re: Per-object textures for s3o

Posted: 06 Jan 2008, 16:47
by Peet
Nice :-)