Page 11 of 18

Posted: Thu Sep 28, 2006 9:15 am
by Luke
Juliusctw:



Sorry again for the delay,


I get what you are doing with the meshes now. You may want to model, texture, and animate them as one mesh then only spilt them when your done. (Presuming your modelling program lets you do this), and you could use the texturing method as well to get more options.
This is how i would impliment your approach, When the game is loading, it would load in a animation mesh.
I would animate it using setFrameLoop()
then i'll get the jointMatrix getMatrixOfJoint() at each frame
i will store this into an animation class
I will do this with every animation
remove the node
This is to do your method, not mine, which one are you trying to do?
when a character in game needs to animate, I will call upon the class at each frame and use
AddMatrixToJoint()
No don’t do this, I decided against the AddMatrixToJoint() function because it animates all scene node that are using that mesh the same way and you have less control over the animation.

Do the getB3dJointNode way I was talking about before, like in the joint example.
And the second thing i really need help on is to understand how you change the texture dynamically. I must have missed it in your code, i didn't seen any methods for it.
Let's say i draw a girl mesh, but prepared 3 skin tones, how do i switch between them???
Just get the meshes material and change its texture pointer, it should work, (from memory) that’s how my loader sets the textures in the first place.

by the way,
Trying to look at your pictures I get “Forbidden”

Posted: Thu Sep 28, 2006 6:49 pm
by juliusctw
Hello Luke

Don't worry about the delay, I understand that i do this full time while other people have to work and all sorts of stuff. I am grateful for all your help already.

I edited the commens off above and changed the pictures. I just basically made a mesh now in x format and i can't get irrlicht to get it displayed correctly. Here is what i mean

http://picasaweb.google.com/juliusctw/M ... 6468153362
Image

you can download the x file here
http://www.box.net/public/yad2n27r5a


Approach:
Yes, i think you understood what i meant by replacing mesh all together. Is that a valid approach?

As for the dynamic animation method, I guess it did sound like my approach :wink: , i guess that's what i really want to do, would it work??? What i'm worried about is that I think your class automatically do interpolation, so is that what I would catch between the frames, and store that info? Does the x format work exactly the same way as yours in this respect?

Posted: Thu Sep 28, 2006 8:23 pm
by vermeer
Luke, sorry the delay.

Actually, I was referring to that 3ds, md2, md3 formats, dont support 2 uv vertices per single mesh vertex.Exported stuff gets broken there in 2 mesh vertices. Not inside blender.

Several uv channels is a different thing, and that's not yet in Blender (lightmaps, multiuv texturing..) . It is in a certain build but only for the blender game engine.

In blender, you can easily weld two UVs, wether that's internally really wellded or not, I dont know. You can make the test with two UV vertices, and thro the menus of uv window, weld the,Or just hit W, 1. With those verts selected.

In ultimate unwrap is also a breeze.

What occurs internally when an artist hit the "weld button" , is what i dont know.

I know it actually only detect "double uvs" , in contours of the uv islands, the contours of the sheets, so I guess if vertices were welded in the UI, were actually internally welded.

So, based on that, you shouldnt work more ;)

Anyway, separated UVs, no, that's no-no...I mean, the contours will be contours, you cant do a full continuous single sheet in an uv map, no matter how good you are uvmapping...at least with a character and reasonable texturing distorsion...

Posted: Thu Sep 28, 2006 8:34 pm
by vermeer
julius


--
I get what you are doing with the meshes now. You may want to model, texture, and animate them as one mesh then only spilt them when your done
--

This what luke mentions sounds well.

You can do in blender.

Just rig the model once textured, to see it all fits well,later on, you can cut it unwelding vertices on an existing loop or adding a new cut.

basically...hmm...well, the way the code needs it is where I am more lost. You will only animate once, for all characters. You can for example, delete the parts you dont want each time (ye old md2 trick, tho in md2 bones do not get exported) . If the code then is capable of share same skeleton -as is the same, with also same anims- but pick the weighted mesh part...-ie, legs- ...so that u can combine parts in code...

then would be ok

but...art -side, careful. Dont make cuts in visible parts, be clever, use real life "natural" divisions. Ie, sewed borders in a jacket, borders of the sleeves, the head, please make the cut in the very internal union ofhead sphere with neck trunk...or better, in the neck base were it gets born in the blouse border.
Those sort of tricks.

this is exporting every time every chunk of mesh , deleting from a master file,all what is not that part, and exporting for all anims (or for one file only if you put all anims in same file(but then youd better know when starts and ends each action ))

pretending to export a part and that by code you asign the weights and positionover the armature sounds to sci fi to me... So I guess you mean exporting as I mentioned.

you cut the mesh with knife. I guess problems can arise with new vertices, specially once rigged. Have not done this in blender...if it's as good as othe rpackages, a reweight of the new vertices would be enough.

Posted: Fri Sep 29, 2006 1:18 pm
by Luke
Anyone:


(I forgot to mention it last post)



“BIG BUG” at the blitz basic forums has released a B3D exporter for Cinema4D,



Get it here: http://www.blitzbasic.com/Community/pos ... opic=63608


I’m not sure how good it is as I don’t have Cinema4D, but its features look good:
-Animation
-Autokeyframing
-Full range of material options
-Weighted/non-weighted bones
-Second UVW-set to support lightmaps
-GUI & Log
-Additional useful plug-ins like "Disconnect All"


Juliusctw:

I edited the commens off above and changed the pictures. I just basically made a mesh now in x format and i can't get irrlicht to get it displayed correctly. Here is what i mean

It looks as if the lights in your scence are to close and bright, and you might want to play around with the mesh’s Material’s AmbientColor/DiffuseColor/EmissiveColor.

As for the dynamic animation method, I guess it did sound like my approach , i guess that's what i really want to do, would it work??? What i'm worried about is that I think your class automatically do interpolation, so is that what I would catch between the frames, and store that info? Does the x format work exactly the same way as yours in this respect?
Except for the AddMatrixToJoint(), it sounds fine,

I added SetInterpolationMode(s32 mode) to the b3d loader (it’s in the SVN), so if you call mesh->SetInterpolationMode(0); you can disable interpolation for that b3d mesh, then you simply don’t store the frame if the position or rotation is the same as the last one. (Note: with b3d meshes position frames and rotation frame can be independent)



Yes, i think you understood what i meant by replacing mesh all together. Is that a valid approach?

Sound alright, you wouldn’t normally worry about this for other types of games of course, but for a rpg it should be fine.



Vermeer:


Not should what you mean but it’s not used because look:


A mesh exported from blender without cloning vertices: (not normally this bad, and its rare to find a mesh using it)

Image

A mesh exported from blender with cloning vertices on:

Image


I’ve done it anyway so I just leave it in as an option.

Posted: Fri Sep 29, 2006 1:48 pm
by vermeer
er...yup, leave it in as I actually dont know exactly what it is, more of an internal thing...that result in the wrong one happens whenever a software tries in import to connect the UVs, maybe is same effect....

Anyway, by all means, sounds more sensible to add the feature :)


Oh, btw, extremely cool that of the cinema plugin.. I have cinema4d 6 CE, given away long ago for a magazine, as full. heh, and what do I discover? that plugin supports Cinema 4d 6.0 and above !

great !

Not that I'll make use of it now, am involved in a game project with a friend with other engine(for language preference), but allways cool to have the option.

Posted: Fri Sep 29, 2006 1:49 pm
by vermeer
Anyway, I bet Blender bone and character animation system is better, but for other matters, Cinema tends to rock. A bit slow UI, imo, but ok. And has several features not in Blender.

Specially cool as several ppl on inet use cinema comercial or the given CE version :)


Anyway, *all* can grab Blender...I think it's actually very good, as it expands b3d "platform".

Posted: Fri Sep 29, 2006 1:50 pm
by vermeer
Interesting...multiple UV supported...

Posted: Sat Sep 30, 2006 2:57 am
by Luke
Afecelis / Anyone:

Hey afecelis, check out the latest SVN it looks like that bug with OpenGL has been fixed, I tried your house mesh and the windows all look fine, there not solid in the inside anymore, yay.

Thanks anyone who helped fix it!!! I think it might have been hybrid and or hey_i_am_real, thanks.

Posted: Sat Sep 30, 2006 9:10 am
by hybrid
Yes, several OpenGL render state bugs have been fixed with the help of hey_i_am_real 8)

Posted: Tue Oct 03, 2006 10:48 am
by Luke
Hi,

Sorry I’m taking so long with the blender exporter, I haven’t really worked on it much lately. I’ve also been a bit bored of it, debugging python scripts are not as much fun as they seem. :lol:

I put some effect in today and made some progress, I think I fixed the problem with bones and animation (in was so simple it annoys me)


Heres a sample of it working with vermeer’s worm exported to b3d:
http://www.fileden.com/files/2006/8/10/ ... m_Test.zip


One thing left to fix (I though it was part of the other bug but I guess not) is that sometimes animated characters are exported inside out.

I’m not sure what’s causing it, it only happens with some meshes.

Again if anyone has any animated characters in blender they would be very useful to help me find some pattern with this bug.


And anyone who knows about matrixes: Can you tell me how you would turn a vertex’s local position (to a mesh) using the mesh’s matrix to the global (world) position of that vertex, I want to see if I’m doing it right.

Posted: Tue Oct 03, 2006 11:22 am
by Saturn
Luke wrote:Sorry I’m taking so long with the blender exporter, I haven’t really worked on it much lately. I’ve also been a bit bored of it, debugging python scripts are not as much fun as they seem. :lol:
You could give Winpdb a try for debugging blender scripts. http://www.digitalpeers.com/pythondebugger/blender.htm

Posted: Tue Oct 03, 2006 8:19 pm
by vermeer
here's displaying perfect -in the crappy anim and model I made. Uvs, textures, seems weights too (tho couldnt see it fullscreen or zoom to check from near)

Great work


Inside out?

Hmm....At least, artist side... :

possibility A) - Normals inverted.

possibility B)- face order changed

possibility C) - Double facing tends to be activated by default in blender. Many blender users dont notice they'r actually modelling badly for export...(happening among other possible issues, A) case...)

At edit buttons (with object selected) panel, go and leave unchecked "doubles sided" . This is so to detect stuff. Also, to ensure stuff, hit tab (this way you go to vertex, face or edge level, usually ur just in "object" level) . For example, after hitting tab, you'll see all the dots appear...ctrl+tab, to choose whatever the mode: faces, edges, vertices. Normally starts in vertices.

hit A key, so to select all....then ctrl+n , so it asks to "recalculate normals outside" ...click on it... Now you ensured it working great...shouldn wreck this simple thing the weights in the character. U could try doing so with one of the offending characters.

Also, check that the blender "modifiers" are all baked ("make real" or something)

cant think of more...too late at night for me...

Posted: Wed Oct 04, 2006 1:18 am
by Luke
Saturn:

Thanks I have a look


Vermeer:

I might be as simple as that,

Is the box in your worm mesh inside out?


I exported that worm and box to obj format, (and showing normals in unwrap3D), it seems to be inside out.

I had trouble exporting it using other formats, what formats work well?



Also when I press ctrl+n after I’ve selected all, nothing happens, any mode I have to be in, or something? (I’m hopeless at blender)


Do you have an animated character that’s been designed to export into a game? The worm mesh is good be I’d like to test something more complicated, and a different mesh.

hey luke,

Posted: Wed Oct 04, 2006 2:46 am
by juliusctw
hey luke

check the gmail common account, the top one called girl i just made for you in .blend format, i quickly put some crappy walking animation on it, see if everything works. I made her in maya, and i couldn't figure out how to get the shader to work in blender, so she looks pretty crappy, but it should work for your purpose. If you use them in irrlicht, they tend to look alot better if you use shaders.

picture
http://picasaweb.google.com/juliusctw/F ... 3820490770

the normals should all be facing the right way :D


Also, i'm almost done with my game character set, it was huge, it would be great when you are done with the exporter cus i'm gonna use it to create an game character demo.