So what can be done about this? jK informed me that an empty root piece is very bad mojo. Leaf pieces are alright, and I use those for aiming and effects purposes. Should I create tiny microscopic tetrahedrons?CarRepairer wrote:I do have an empty base piece and I use it in every model for spring. But the blender obj exporter decides to discard it? Blender experts, any help?
ANN: OBJ model format support
Moderators: MR.D, Moderators
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: ANN: OBJ model format support
Re: ANN: OBJ model format support
You just should name one of your real piece, "base"CarRepairer wrote:So what can be done about this? jK informed me that an empty root piece is very bad mojo. Leaf pieces are alright, and I use those for aiming and effects purposes. Should I create tiny microscopic tetrahedrons?CarRepairer wrote:I do have an empty base piece and I use it in every model for spring. But the blender obj exporter decides to discard it? Blender experts, any help?
btw : do the .obj parser works with corpses ?
Re: ANN: OBJ model format support
double post, sry.
Anyone has tried to apply normal maps to .obj units ?
Kloot/Argh's shader works very basicly but it has a lot of glitchs and the fps drops to 1 when the unit is being built.
CA's/S44 imporved shader seems to be .s3o specific. I tried to add my units directly in CA, I can see normals maps on other units but not on mine (adding/removing the customparam changes nothing). I also tried to pick S44 gadget but it does not work either. Any ideas ?
Anyone has tried to apply normal maps to .obj units ?
Kloot/Argh's shader works very basicly but it has a lot of glitchs and the fps drops to 1 when the unit is being built.
CA's/S44 imporved shader seems to be .s3o specific. I tried to add my units directly in CA, I can see normals maps on other units but not on mine (adding/removing the customparam changes nothing). I also tried to pick S44 gadget but it does not work either. Any ideas ?
Re: ANN: OBJ model format support
Current (82.3), assuming there were only Unix-style line endings in your model. If that was already the case and it still crashed, I'd have to see the .obj.CarRepairer wrote:Current version or next version?
So make one?Super Mario wrote:Importer script for blender would be better for me.
Yep, features can have OBJ models too.Cremuss wrote:btw : do the .obj parser works with corpses ?
I don't know what kinds of hacks Argh applied to the code, but I can provide my original gadget if you want.Cremuss wrote: Kloot/Argh's shader works very basicly but it has a lot of glitchs and the fps drops to 1 when the unit is being built.
You need at least CA revision 8267.Cremuss wrote: CA's/S44 imporved shader seems to be .s3o specific. I tried to add my units directly in CA, I can see normals maps on other units but not on mine (adding/removing the customparam changes nothing). I also tried to pick S44 gadget but it does not work either. Any ideas ?
Re: ANN: OBJ model format support
The problem is that units in build are rendered with an user clipplane. Many GPUs don't support this in combination with shaders and fallback to software rendering. My gadget disables custom shaders for units in built for that reason.Kloot wrote:I don't know what kinds of hacks Argh applied to the code, but I can provide my original gadget if you want.Cremuss wrote: Kloot/Argh's shader works very basicly but it has a lot of glitchs and the fps drops to 1 when the unit is being built.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: ANN: OBJ model format support
I did that. But I still need empty leaf pieces. For example an empty piece at the tip of the sword where I want a flame effect.Cremuss wrote:You just should name one of your real piece, "base"
Did you not see the post?Cremuss wrote:Anyone has tried to apply normal maps to .obj units ?
http://springrts.com/phpbb/viewtopic.ph ... 60#p444860
That's YOUR model! (with my edits.) It's using jK's normalmap gadget.
Last edited by CarRepairer on 21 Aug 2010, 19:51, edited 1 time in total.
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: ANN: OBJ model format support
You think that I know how?Kloot wrote:So make one?Super Mario wrote:Importer script for blender would be better for me.
Re: ANN: OBJ model format support
CarRepairer helped me, I thought the customParam with the CA's gadget was the same than the one in Argh's/Kloot example, so problem fixed now thx all :)
Re: ANN: OBJ model format support
fwiw, S44 version of jk's gadget now supports OBJ too (and is hopefully easier to extricate from the mod)Cremuss wrote:CarRepairer helped me, I thought the customParam with the CA's gadget was the same than the one in Argh's/Kloot example, so problem fixed now thx all :)
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: ANN: OBJ model format support
Help, my models are falling apart again.
Even though we finally had success on my previous and first model, now my second model is falling apart when rotating its parts and I have no idea why.
I set up the origins, I exported the obj and lua and everything looks right. I have to set globalvertexoffsets = true for the pieces to start out correctly (same as in the first model) but the animations are not correct in this model. The pieces are not rotating about their origins as set up in the blender file.
I also tried changing line 103 as instructed here but that actually makes things worse.
I tried apply scale/rotation to data and some other stuff in that menu but it doesn't help.
Even though we finally had success on my previous and first model, now my second model is falling apart when rotating its parts and I have no idea why.
I set up the origins, I exported the obj and lua and everything looks right. I have to set globalvertexoffsets = true for the pieces to start out correctly (same as in the first model) but the animations are not correct in this model. The pieces are not rotating about their origins as set up in the blender file.
I also tried changing line 103 as instructed here but that actually makes things worse.
I tried apply scale/rotation to data and some other stuff in that menu but it doesn't help.
- Attachments
-
- screen00014.jpg
- (59.7 KiB) Downloaded 2 times
-
- carpy.obj.txt
- (1.4 MiB) Downloaded 33 times
-
- carpy.lua
- (1.81 KiB) Downloaded 119 times
Re: ANN: OBJ model format support
Sorry, rotated Blender objects are not (yet) handled correctly by the exporter.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: ANN: OBJ model format support
Man, that sucks but now I'm relieved to at least know the reason. I need a break from blender anyway.Kloot wrote:Sorry, rotated Blender objects are not (yet) handled correctly by the exporter.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: ANN: OBJ model format support
*Bump*
Break's over. Kloot, you alive?
Break's over. Kloot, you alive?
- thesleepless
- Posts: 417
- Joined: 24 Oct 2007, 04:49
Re: ANN: OBJ model format support
can't you apply the rotation to your objects before you export?
CTRL+A =)
CTRL+A =)
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: ANN: OBJ model format support
thesleepless wrote:can't you apply the rotation to your objects before you export?
CTRL+A =)
I already do that (for other reasons - fixing normals) but it doesn't fix this problem. I need Kloot's smarts to update his exporter script to work for rotation the same way he fixed it to work with scales.CarRepairer wrote:I tried apply scale/rotation to data and some other stuff in that menu but it doesn't help.
- KingRaptor
- Zero-K Developer
- Posts: 838
- Joined: 14 Mar 2007, 03:44
Re: ANN: OBJ model format support
There's weird rendering behavior with cloaking .obj units.
For instance, this jammer tower from Cremuss' Final Outcome:
This happens when the jammer tower in ZK (r871 and up) cloaks or decloaks (Lups effect); the texture returns to normal once the effect ends.
When rendered partially transparent without the Lups effect (in the original game, or when selecting a build spot for it in any game), the model is a uniform teal color instead of the expected texture + teamcolor.
For instance, this jammer tower from Cremuss' Final Outcome:
This happens when the jammer tower in ZK (r871 and up) cloaks or decloaks (Lups effect); the texture returns to normal once the effect ends.
When rendered partially transparent without the Lups effect (in the original game, or when selecting a build spot for it in any game), the model is a uniform teal color instead of the expected texture + teamcolor.
Re: ANN: OBJ model format support
LUPS bug in lups/ParticleClasses/UnitCloaker.lua, OBJ models are seen as 3DO's:KingRaptor wrote:This happens when the jammer tower in ZK (r871 and up) cloaks or decloaks (Lups effect); the texture returns to normal once the effect ends.
Code: Select all
function UnitCloaker:CreateParticle()
self.isS3o = (UnitDefs[self.unitDefID].model.name:lower():find("s3o") and true)
...
end
Engine bug, fixed.KingRaptor wrote:When rendered partially transparent without the Lups effect (in the original game, or when selecting a build spot for it in any game), the model is a uniform teal color instead of the expected texture + teamcolor.
Re: ANN: OBJ model format support
I need some help.
I got Blender 2.49b, s3o importer script, and obj metadata exporter from this thread.
Now I run Blender, import s3o that I made - it loads, model looks fine.
Then I export obj metadata and select a file name.
It creates 2 files: wp.obj.lua and wp.obj.log
But the lua file created is almost empty, it only contains numpieces + some default variables. Doesn't contain any piece hierarchy or translations at all!
What is stranger is that the log file says there were pieces processed and it even prints their offsets. Which means the s3o was correctly loaded and data was here.
Any idea what is wrong?
I got Blender 2.49b, s3o importer script, and obj metadata exporter from this thread.
Now I run Blender, import s3o that I made - it loads, model looks fine.
Then I export obj metadata and select a file name.
It creates 2 files: wp.obj.lua and wp.obj.log
But the lua file created is almost empty, it only contains numpieces + some default variables. Doesn't contain any piece hierarchy or translations at all!
What is stranger is that the log file says there were pieces processed and it even prints their offsets. Which means the s3o was correctly loaded and data was here.
Any idea what is wrong?
- Attachments
-
- wp.obj.log
- (5.1 KiB) Downloaded 23 times
-
- wp.obj.lua
- (439 Bytes) Downloaded 28 times
Re: ANN: OBJ model format support
The export fails because your model contains multiple meta-pieces ("SpringRadius", "SpringHeight", "Cube") without a parent. Any such piece (more specifically, the first encountered) is assumed to be the root object, so there must be exactly one.
("SpringRadius" and "SpringHeight" are added by the S3O importer, you'll have to remove or re-link them before exporting)
("SpringRadius" and "SpringHeight" are added by the S3O importer, you'll have to remove or re-link them before exporting)
Re: ANN: OBJ model format support
Yeah it was that, thanks for help!
When I removed (after many tries) the extra pieces it exported a correct lua file. The "Cube" was there because Blender starts new scene with a cube in it. I thought import would overwrite scene geometry but instead the cube became hidden inside my model...
I must have gotten some unfortunate version of Blender - the outline doesn't work 80% of the time, and object deleting removes it from the object list without really deleting it...
When I removed (after many tries) the extra pieces it exported a correct lua file. The "Cube" was there because Blender starts new scene with a cube in it. I thought import would overwrite scene geometry but instead the cube became hidden inside my model...
I must have gotten some unfortunate version of Blender - the outline doesn't work 80% of the time, and object deleting removes it from the object list without really deleting it...