Page 1 of 1

NifSkope/Blender UV Map Problem

PostPosted: Fri Jul 18, 2014 10:15 am
by Stuporstar
I'm having a huge problem importing an OBJ file into Nifskope. It's one I've made from scratch in Blender (I decided to give it Blender another try). The UV map looks fine in Blender:

Image

But when I import it into NifSkope (1.1.0 because I read 1.1.3 has some bug that makes importing OBJ files screw up), the UV map turns into an exploded mess.

Image

Does anyone know how to fix this? I've tried setting after setting after setting, and I can't figure out what's going wrong. I even tried installing the Python 2.6 version of Blender instead (which is even more painful to use) so I could try to export it directly to NIF, but that wouldn't save my UV maps at all, so I went back to using the latest version of Blender because it almost makes sense compared to the hideous (and more convoluted than Dwarf Fortress) interface of earlier versions.

I have been at this stupid thing all night and I'm about ready to give up. I hate Blender SO MUCH. :banghead: Someone, please rescue my sanity.

Re: NifSkope/Blender UV Map Problem

PostPosted: Fri Jul 18, 2014 10:57 am
by Drakkmore
I couldn't help you at all with Nifskope reasoning, I must ask though can you import the obj back into Blender after exporting it.
I mean can you export the Obj, then start a new session in Blender, and import it, and have all of the UV maps working correctly?
Also I have never had an issue with Blender 2.49b not exporting a UV map, and I have used 2.59a with out experiencing that issue too, but I have yet to make a mesh with 2.6x.
If you send me the obj file I can look at it in my Nifskope (I have the second to latest release of Nifskope so I can make Obj files into Skyrim Meshes, and it seems to not screw up UV maps), and I can also look at it in Blender 2.49b

Re: NifSkope/Blender UV Map Problem

PostPosted: Fri Jul 18, 2014 11:30 am
by Stuporstar
I can export it and re-import an Obj into Blender (even across versions) and the UV maps look fine.

I did figure out something while messing around with another file (just a box I didn't make myself). The box has all its vertices doubled and they don't seem to connect. It's like the front/back/sides are split up. Removing the duplicates and exporting as an Obj makes NifSkope explode the UV maps on that file too.

I'll send you the Obj file. Thanks, Drakk! :)

Re: NifSkope/Blender UV Map Problem

PostPosted: Fri Jul 18, 2014 7:10 pm
by Kiteflyer61
Call me silly, but why export it as an .obj file at all? Can't you save it as a .blend file and open it with blender 2.49b for direct export to a .nif file?

You could even do the UV work in 2.49b. Just import the non-UV file.

If I'm missing something, let me know. :D Never messed with any blender except 2.49b. :D




KF

Re: NifSkope/Blender UV Map Problem

PostPosted: Fri Jul 18, 2014 9:01 pm
by Stuporstar
Kiteflyer61 wrote:Call me silly, but why export it as an .obj file at all? Can't you save it as a .blend file and open it with blender 2.49b for direct export to a .nif file?

You could even do the UV work in 2.49b. Just import the non-UV file.

If I'm missing something, let me know. :D Never messed with any blender except 2.49b. :D

KF


I gave that a shot before posting the OP, but I can't even figure out 2.49b and its NIF exporting tools. It was even more of a disaster: wouldn't import the UV maps at all. I just don't have a clue when it comes to Blender, and 2.6 is the only one I could find documentation for. I don't even know if it installed the plug-in properly because half the time it does nothing at all when I try to export a NIF out of the Python version.  :shrug:

Re: NifSkope/Blender UV Map Problem

PostPosted: Fri Jul 18, 2014 10:30 pm
by Drakkmore
Apparently saving a 2.69 blend file you lose the faces when opening in 2.49b

Re: NifSkope/Blender UV Map Problem

PostPosted: Sat Jul 19, 2014 7:24 pm
by Stuporstar
Yeah, it turns out Blender 2.69 just isn't backwards compatible. I guess I'll have to stick to Blender 2.49b like you guys.

Speaking of, I made a grinding wheel.

Image

Um ... now I need someone to teach me how to animate it so it turns when activated.

Re: NifSkope/Blender UV Map Problem

PostPosted: Sun Jul 20, 2014 5:18 pm
by Stuporstar
Well, I managed to animate the thing, but I can't figure out how to fix the Idle groups so it works properly in the game.

At least I finished my bug jugs and mugs.

Image

Re: NifSkope/Blender UV Map Problem

PostPosted: Sun Jul 20, 2014 6:14 pm
by Drakkmore
If you send me the mesh for the grind stone I can name the idles for you,a dn send you a script that will work with it.
though it may not work right if you have the advanced animation patch installed from Morrowind Code Patch. That Patch screws up a lot of animations.
You want it to be animated by activation?
As in player clicks on it and it begins to spin, click on it again and it stops?

EDIT: Well I can send a very simplified script that can tell you when each Idle ought to be played. Then you can write your own script to set it up how you want it to work.

Re: NifSkope/Blender UV Map Problem

PostPosted: Sun Jul 20, 2014 8:18 pm
by Stuporstar
Yeah, it's an activator I only want to spin a few times after you click it. I've already written the scripts, based on the ones I used for Kite's coffee grinder. All I need to do is make the idles actually show up properly in the kf file.

I would like to do this myself, since I managed to get so far this time before being completely stumped again. I'll send you the blend file so you can look at it for me though. Thank you! :)

Edit: Almost forgot to post the script. It will get more complicated later, but I want to test the animations first (once I get the idles set).

Code: Select all
Begin ST_Grinder_Scr

Short ActionFlag
Float Timer

If ( MenuMode )
       Return
Endif

If ( OnActivate )
       Set ActionFlag to 1
Endif

If ( ActionFlag == 1 )
       PlayGroup Idle2 0
       Set ActionFlag to 2
Elseif ( ActionFlag == 2 )
       Set timer to ( timer + GetSecondsPassed )
       If ( timer < 4.5 )
               Return
       Endif
       Set timer to 0
       PlayGroup Idle 0
       Set ActionFlag to 0
Endif

End

Re: NifSkope/Blender UV Map Problem

PostPosted: Mon Jul 21, 2014 12:16 am
by Lokichan
I am not helpful in this department, but I wanted to say your creations look great :D
I look forward to seeing them in action at some point :)

Re: NifSkope/Blender UV Map Problem

PostPosted: Mon Jul 21, 2014 12:32 am
by Stuporstar
Thank you! I'm going to hold off on releasing the bug stuff for the next Uvirith's Legacy overhaul (currently in progress), but I'm going to release the grinding wheels and stones as a resource as soon as I get everything working. :)

Eventually all the odds-and-ends I've made for UL will end up in a separate pawn shop mod, because I've made a lot of random stuff.

Also, new the new bug lamps are almost done! I just have Gothren's unique one left to do (it's going to be blue).

Re: NifSkope/Blender UV Map Problem

PostPosted: Mon Jul 21, 2014 5:45 pm
by Lokichan
:D Very cool!
I am also excited to hear about the Uvirith's Legacy overhaul, I didn't know that was going on!
Yay, my Telvanni character and I look forward to it :)

Re: NifSkope/Blender UV Map Problem

PostPosted: Wed Jul 23, 2014 1:24 pm
by Stuporstar
Yeah, while working on bug-fixes, I have a separate file for the version after that one where I can do whatever I want. I'm keeping them separate, because the next update it going to be bux-fixes only so people can easily upgrade. Then I'll be releasing the big overhaul version later. I'm mostly overhauling stuff I was lazy about upgrading between version 2 and 3. That version is going to take a while, but the bug-fixes should be ready within a month or so.

I spent all day yesterday completely engrossed in making a jug in Blender, because the first one I made (in the screenshot above) looks like crap. I also made two kinds of bug jars. I'm thinking of making another Tea Shop, one in Tel Mora, where you can buy all this stuff, and releasing it as a Tea Mod add-on. Also, I retextured the bug lamps, but made them different objects from the originals, because the originals sucked in terms of going out the second you try to equip them and there's barely a handful placed in the game. Not shown is my glossy dark-blue buglamp (but that's because it's unique for Gothren's Magical lamp, and I want it to be a surprise).

Image

Here's another view of the jug, since I spent so long on it. UV maps are such a pain.

Image

I've still made no progress on getting that grinding wheel animation to work though. I have a couple other questions for the resident modelers though:

Why would one of my models (the tall jar) look blocky in the game and another (the jug) look smooth? I used smoothing on both, though after I triangulated the jar smoothing screwed it up so I did it while it was still divided into quads, as I had also done with the jug. Triangulating was the last thing I'd done on both of them. They're both using the exact same texture/materials. They were also both made using 32 vertex cylinders. Is it just the difference in shape? The screenshot above shows it after I subdivided, but I feel like adding that many vertices was unnecessary (especially since it's still "blocky" when you view it in the game--by blocky I mean every vertical edge is sharp and easily discerned).

Also, is there an easier way to get two materials to apply to a single object (and actually show up that way in nifskope), other than separating the different shapes into two objects and then merging them again? Because if there is, I couldn't find it.

Edit: Figured out the first question. I had it set to solid instead of smooth in the material properties.

Re: NifSkope/Blender UV Map Problem

PostPosted: Mon Jul 28, 2014 2:25 pm
by Stuporstar
So I figured out the other question about applying materials to a single object.

Now I have a shiny brand new problem! I got the animation working on that first grinding wheel, finally, but then decided to make it a treadle wheel (because my boyfriend suggested that was more realistic for a single person to use, and it's the player using it). Anyway, here it is:

Image

The problem is when I animate it in Blender, using IPO curves, it works just fine. Porting it into Nifskope though, one of the parts is swinging all over the place. I can't seem to fix it in Blender because it's already working in Blender. I think Nifskope must be miscalculating the interpolation. I tried keying every frame, but that didn't help either. I found out Nifskope only supports linear interpolation, not bezier curves, so I'm already not using those. Drakkmore is looking at the file as well, but so far we're stumped.

Also, can someone tell me what Loop Start and Loop Stop do when it comes to idles? I figured out I could get the thing to do what I want by not using those functions, but now I want to know why. I figured out Loop Start stops the animation from looping, so how the heck does Loop Stop fit in then?

Re: NifSkope/Blender UV Map Problem

PostPosted: Mon Jul 28, 2014 5:20 pm
by Drakkmore
I spent most of the evening, and the night till around 5:30is reanimating the thing.
The problem That Stuporstar was having was coming from the fact that the linkage was child of the Wheel. SO I removed the IPO curves, reset the origin of the linkage, and removed the constraint of the parented wheel.
Then I re animated the linkage frame by frame. This resulted in an almost exact opposite animation flaw happening to the linkage, but not nearly as severe.
Here are some videos describing the issue.
First I will show Stuporstar's animation in Nifskope:

Next I will show the Blender animation of how it is supposed to look. This is the animation after I had tampered with it (note the grinding wheel texture is just a texture I threw on there to have a texture, and for no other reason):

And finally I will show what my tender administrations to the animations of the grinding wheel's linkage. This video was taken in the CS preview window:


I have not yet figured out why the linkage is missing the Grinding Wheel crank, and will look into this some more. In the mean time some suggestions might be useful.

Re: NifSkope/Blender UV Map Problem

PostPosted: Tue Jul 29, 2014 9:44 am
by Jac
Dunno if this'll help, but it's worth a try:

Code: Select all
Begin ST_Grinder_Scr

Short ActionFlag
Float Timer

If ( MenuMode )
       Return
Endif

If ( OnActivate )
       Set ActionFlag to 1
Endif

If ( ActionFlag == 1 )
       PlayGroup Idle2 1 ;start the animation immediately.
       Set ActionFlag to 2
Elseif ( ActionFlag == 2 )
       Set timer to ( timer + GetSecondsPassed )
       If ( timer <= 4.5 ) ;timer is a float, so we'll stop it at excatly 4:30.
               Return
       Endif
       Set timer to 0
       PlayGroup Idle 1 ;stop the animation immediately.
       Set ActionFlag to 0
Endif

End

Re: NifSkope/Blender UV Map Problem

PostPosted: Tue Jul 29, 2014 5:21 pm
by Stuporstar
This time the scripting isn't the problem. I actually got that part working perfectly. It's the Blender->Nifskope transfer that's screwing up the animations.

Oh man, Drak. I can't believe you tried reanimating the whole thing. I've been too exhausted to do anything about it since, but I had a bit of a chance to fiddle in Nifskope, and I might be able to reset the positions in Nifskope's data instead of Blender. It's a last resort, if we can't get this working any other way. I don't have much time tonight, but I'll try to pop on again in the next day or so.

Re: NifSkope/Blender UV Map Problem

PostPosted: Tue Jul 29, 2014 6:25 pm
by Drakkmore
I'm sorry I didn't reanimate the whole grinding wheel, I just reanimated the linkage, and a little bit of repositioning of the treadle a bit so that the linkage stayed in the eye-loop on the treadle. That's all.
I still can't get the top end to stay with the crank on the wheel axle though.
I'll keep tinkering.

Re: NifSkope/Blender UV Map Problem

PostPosted: Tue Jul 29, 2014 9:45 pm
by Stuporstar
Oh, don't be sorry. I wasn't expecting you to go to all that trouble, and I don't think it's necessary. I had the exact same problem trying to get the treadle-pole to connect to the hook using that IPO curve with location data I kept in the file (just in case). Connecting it to the wheel and trying to control its rotation was my second attempt (which fares far worse as you can see).

I'm thinking this may be a problem with Nifskope miscalculating the IPO curves when they're imported, since they work in Blender just fine. I'm completely stumped as to what to do about it though (other than going to the tedious expense of re-rigging the whole thing in Nifskope after it's been imported, which as I said before, is the last option out of desperation, because ugh).

Re: NifSkope/Blender UV Map Problem

PostPosted: Tue Jul 29, 2014 10:18 pm
by Drakkmore
I think it is an issue with how Blender is exporting it, because as I said the video of my attempt after exporting from Blender was taken in the Construction set with out the ever being imported to nifskope. Though even after watching it in the construction set I did import it to Nifskope, and it was the same there as it was in the CS.
I will continue looking on the webternets, and try to find some documentation, or someone else that had the same issue,a dn might have found a solution.

Re: NifSkope/Blender UV Map Problem

PostPosted: Tue Jul 29, 2014 11:01 pm
by Stuporstar
Thanks, Drakk. Maybe we should be looking at Nifskope documentation rather than focusing too much on Blender, because it seems the problem may be on the nif exporting end of things.

Re: NifSkope/Blender UV Map Problem

PostPosted: Sat Aug 02, 2014 12:40 am
by Drakkmore
Hmm I'm not coming up with anything useful on this at all.
I would like to ask about this on the Bethesda Softworks Forum, and see if one of the animators there might be able to help, but I will not do so with out your permission first.
I would include a link to that thread on this one if you wanted too.




EDIT: Never mind what I said before I have made some progress, and will see what you think when you get the mesh.