Blender->Spring Feature script - Page 2

Blender->Spring Feature script

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Blender->Spring Feature script

Post by smoth »

obj >3ds thank you!
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

smoth wrote:obj >3ds thank you!
your welcome. Only other format I would consider is collada
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Blender->Spring Feature script

Post by Anarchid »

I'm using alias wavefront obj format for the 3d files because it was the most documented and easiest to implement.
You can use .blend in spring directly.

I'm currently doing a propaganda action wrt this in attempt to replace zk's buoy model (it's a fsck'ing Core Can!) with a .blend :P
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

Anarchid wrote:
I'm using alias wavefront obj format for the 3d files because it was the most documented and easiest to implement.
You can use .blend in spring directly.

I'm currently doing a propaganda action wrt this in attempt to replace zk's buoy model (it's a fsck'ing Core Can!) with a .blend :P
yeah I saw that when I was checking it out. however I don't believe a blend file is a good match for a distributed game file or as an interchange format. know of any other apps that can import a blend file?

OBJ is simple and the Lua files add the extra functionality. all plain text.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Blender->Spring Feature script

Post by Anarchid »

know of any other apps that can import a blend file?
D'oh, blender? I figure other major 3d modeling suites should also support it.

Though i guess doing it in .blend represents some *additional* lock-in to one already present in your script's dependance on blender.

(but then, isn't 3ds just the same?)
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

Anarchid wrote:
know of any other apps that can import a blend file?
D'oh, blender? I figure other major 3d modeling suites should also support it.

Though i guess doing it in .blend represents some *additional* lock-in to one already present in your script's dependance on blender.

(but then, isn't 3ds just the same?)
I did mean 3d modeling and animation applications other than blender.

I'm pragmatic, in the sense that the spring community is not very large really, and that doing difficult things on principle should be avoided, so yeah more apps should support blender, but that probably isn't going to happen much soon and even if it does it will be in the form of clean use of interchange formats like collada

3ds is the same in my opinion. which is why I said earlier the only other format I would support is collada which is a true interchange format.
But from what I've read over the years on various mailing lists, collada support is a bit iffy so I stuck with what was easy and already documented. I wanted a solution now that works and is acceptable for as many people as possible. obj is afaik so common its a no brainer until i want to do something more advanced, and then it will be collada.. but i am not there yet.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Blender->Spring Feature script

Post by Anarchid »

Oh, i just re-read the thread and found this:
Also, regarding DDS I haven't found any simple FLOSS tools to work with DDS textures that are available without difficulty on Linux.
I used to do DDS textures back in the olden days on linux with gimp-dds plugin. I did have to sudo make install it, but that was it.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Blender->Spring Feature script

Post by smoth »

Anarchid wrote:(but then, isn't 3ds just the same?)
No, 3ds dewelds vertices breaking normals due to a busted way of handling uvmaps.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Blender->Spring Feature script

Post by Pressure Line »

I may be wrong in this, but afaik in Spring a 'feature' (like the trees in this screenshot)
Image
has to be a single object (ie, i cant have seperate "trunk" and "leaves" objects) while units can be as many separate parts as you want (im sure there is a limit, but im also sure its huge)

and afaik Spring only loads the 'first' mesh in the hierarchy, but someone will need to clarify
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Blender->Spring Feature script

Post by FLOZi »

Used to be the case, afaik hasn't been for a while wrt feature models.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Blender->Spring Feature script

Post by knorke »

afaik in Spring a 'feature' (like the trees in this screenshot) has to be a single object
not mandatory but for performance its better:
http://answers.springlobby.info/questio ... any-pieces
question 5
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Blender->Spring Feature script

Post by Pressure Line »

I stand corrected. Although its still *pointless* to have multiple pieces for a feature, because its not like you can animate it (as you mentioned earlier knorke)
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

Thanks all that's some useful information, and a new site to check for answers :)

If it doesn't effect performance(due to non animating) then its not an issue.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

Ok, just thought of a super useful feature that I will add to my script.

* attribute presets

So say I'm making a tree.. select a tree from the pre-sets and it will make it upright, reclaimable, blocking, etc and set the metal/energy/etc from the model xyz dimensions.

I understand this will only work for extremely generic features like grass/shrubs/trees/rocks.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Blender->Spring Feature script

Post by knorke »

So say I'm making a tree.. select a tree from the pre-sets and it will make it upright, reclaimable, blocking, etc and set the metal/energy/etc from the model xyz dimensions.
sorry,imo not that usefull: If you have already made one tree feature you can just c&p the lua file to create the next one, takes few seconds.
And if there are so many features that manually editing the files gets annoying you can use something like this:
http://springrts.com/phpbb/viewtopic.php?f=14&t=26888
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: Blender->Spring Feature script

Post by wolas »

Have few weird issues.

First I pointed at correct .tga images in blender t1 and t2 which were tested before in spring works with transparency. Then just for test again exported same model and from both good tga's transparency was removed. Ok small issue, I bet there is no way to export image as it looks in blender? you still must edit those manually to get wanted transparency?

And this issue is weird as hell. I had exported before to .dae with same .tga images transparency isint working at all. When using obj transparency works. BUT I must first load .dae model(maybe some others too) then load .obj one then transparency works, otherwise model is blue... Also tried other formats png, tiff only with tga's I can get transparency :/ this explains why I couldnt get transparent models some time ago... maybe its public secret that you must use .obj and .tga?
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

wolas wrote:Have few weird issues.

First I pointed at correct .tga images in blender t1 and t2 which were tested before in spring works with transparency. Then just for test again exported same model and from both good tga's transparency was removed. Ok small issue, I bet there is no way to export image as it looks in blender? you still must edit those manually to get wanted transparency?

And this issue is weird as hell. I had exported before to .dae with same .tga images transparency isint working at all. When using obj transparency works. BUT I must first load .dae model(maybe some others too) then load .obj one then transparency works, otherwise model is blue... Also tried other formats png, tiff only with tga's I can get transparency :/ this explains why I couldnt get transparent models some time ago... maybe its public secret that you must use .obj and .tga?
OMG someone has attempted to use my script.. awesome!!!

anyway, so I ran into a problem with the way I was copying the image files when exporting, basically it beaks up the images when it copies them to the destination folders. just copy your originals over the top for now.
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: Blender->Spring Feature script

Post by wolas »

https://github.com/enetheru/springrts-b ... 453219bee1
last revision which works newer ones adds spheres instead plane for radius or whatever else.

http://postimage.org/image/8id9k7guz/

When I slide to change side it adds more spheres quickly.

At first I thought I dont understand how to use it, but when really tried to do something...


EDIT:
Have no idea how it broke but reverting next e2ff29e2de8a5a0a2f2259096d06c60db4e1ed0 commit and it works again.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Blender->Spring Feature script

Post by gajop »

[offtopic?]
Ok, maybe not the best question for this thread judging by the text inside, although the title seems right:
I wanted to ask what animation file formats would you like supported in Spring?
I've once implemented an .obj opengl viewer myself, but I've never dealt with any animation-model (do you want mesh or bone models, or perhaps something else?).
What are the popular formats, MD2, MD3, etc? And should they be implemented directly or converted to some existing Spring one, like the .s3o for models?
PS: Didn't want to make a new thread as I'm kinda busy right now so probably can't implement anything about it, and this is little more than a curiosity as I'd like to know what's so hard about doing it right now.
[/offtopic?]
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender->Spring Feature script

Post by enetheru »

gajop wrote:[offtopic?]
Ok, maybe not the best question for this thread judging by the text inside, although the title seems right:
I wanted to ask what animation file formats would you like supported in Spring?
I've once implemented an .obj opengl viewer myself, but I've never dealt with any animation-model (do you want mesh or bone models, or perhaps something else?).
What are the popular formats, MD2, MD3, etc? And should they be implemented directly or converted to some existing Spring one, like the .s3o for models?
PS: Didn't want to make a new thread as I'm kinda busy right now so probably can't implement anything about it, and this is little more than a curiosity as I'd like to know what's so hard about doing it right now.
[/offtopic?]
AFAIK, spring uses animation scripts which use the pivot points of the individual pieces. I don't think it supports loading animations from file formats you specified.
http://springrts.com/wiki/Animation-CobLuaDifferences
Post Reply

Return to “Art & Modelling”