View previous topic :: View next topic |
Author |
Message |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Sat Aug 11, 2007 7:20 pm Post subject: IMVU room creation tool |
|
|
I have made a map editor i was gonna use for a mmorpg engine im developing, but i recently switched IDE's so i need to convert the source code over and redo a few things. Anyways currently
my program Mapit! support Exporting to IMVU XMF format as well as XRF material and the Skeleton file. I'm still new to converting EULER rotations to QUATS so when assigning seat nodes the Roll pitch and Yaw used isn't native to what you see. you might have to play around with it to get it to look right.
Anyways its free and available here
http://www.mapit.vigilsoft.net
I'm going to be converting the creation process to more of a Click drag create sort or method. I have some tutorials in my forum on the site on how to use it.
here are some screenshots of it
 |
|
Back to top |
|
 |
neo1471
Joined: 22 Jul 2005 Posts: 3636 Location: United Kingdom
|
Posted: Sun Aug 12, 2007 2:17 am Post subject: |
|
|
Wow cool! , ask isawhim for his code his made so far, as it has a lot of the rotation stuff allready, he was making a program mainly for sketchup users (but would also help blender users) for placing nodes, deleteing meterials and adding opasity and things and placing seating nodes in a 3d enviroment
may help hear for this program to become even more useful? ^_^
looks brilliant very well done lancewrath
(sketchup and blender users are stuck with half baked exporters that arnt fully compatible and need to wait another year for them to be updated.. this could be very useful for us ) _________________
The head? i lost an auction -.-
"Crankificates" -Polystyrene |
|
Back to top |
|
 |
jazzKat
Joined: 20 Sep 2005 Posts: 1852 Location: United Kingdom
|
Posted: Mon Aug 13, 2007 7:32 am Post subject: |
|
|
Is there a reason that can't be seen in those shots for what looks like a heck of a lot of extra tris that don't appear to be doing anything in the last screenshot, lower left viewport? Seems to be cutting geometry up in a very odd way if not. GG all the same though  _________________ Want to make items for IMVU?
Click here to get started! |
|
Back to top |
|
 |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Mon Aug 13, 2007 11:25 am Post subject: |
|
|
jazzKat wrote: | Is there a reason that can't be seen in those shots for what looks like a heck of a lot of extra tris that don't appear to be doing anything in the last screenshot, lower left viewport? Seems to be cutting geometry up in a very odd way if not. GG all the same though  |
ya some of those screenshots are from older versions, where it was cutting the geometry funky. But i'm gonna be switching IDE's and rebuilding it. I was attempting to make a software rendered wireframe overlay. I havent got it to only show whats visible by the cam and hide what isnt. so some of the extra useless tris you see are geometry that isnt visible from the camera position. |
|
Back to top |
|
 |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Mon Aug 13, 2007 11:27 am Post subject: |
|
|
CSG isnt easy to program... |
|
Back to top |
|
 |
jazzKat
Joined: 20 Sep 2005 Posts: 1852 Location: United Kingdom
|
Posted: Mon Aug 13, 2007 11:42 am Post subject: |
|
|
lancewrath wrote: | jazzKat wrote: | Is there a reason that can't be seen in those shots for what looks like a heck of a lot of extra tris that don't appear to be doing anything in the last screenshot, lower left viewport? Seems to be cutting geometry up in a very odd way if not. GG all the same though  |
ya some of those screenshots are from older versions, where it was cutting the geometry funky. But i'm gonna be switching IDE's and rebuilding it. I was attempting to make a software rendered wireframe overlay. I havent got it to only show whats visible by the cam and hide what isnt. so some of the extra useless tris you see are geometry that isnt visible from the camera position. | You mean based on 'vis' blocking? i.e. you only see the tris you're looking at
I'm actually surprised you're trying to code a level editor because yes they're not easy. Why did you go that route rather than write up an export script for a 3D app or even WorldCraft, Radiant and Quark which are all open souce level editors that use the standard *.map format? At least that way you can spend more time coding the game rather than fixing issues that crop up with the editor (unless you're building the editor into the MMO?), I'm not citicising btw, I'm genuinely curious as to why you've gone this approach rather than using what's out there... _________________ Want to make items for IMVU?
Click here to get started! |
|
Back to top |
|
 |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Mon Aug 13, 2007 12:34 pm Post subject: |
|
|
jazzKat wrote: | lancewrath wrote: | jazzKat wrote: | Is there a reason that can't be seen in those shots for what looks like a heck of a lot of extra tris that don't appear to be doing anything in the last screenshot, lower left viewport? Seems to be cutting geometry up in a very odd way if not. GG all the same though  |
ya some of those screenshots are from older versions, where it was cutting the geometry funky. But i'm gonna be switching IDE's and rebuilding it. I was attempting to make a software rendered wireframe overlay. I havent got it to only show whats visible by the cam and hide what isnt. so some of the extra useless tris you see are geometry that isnt visible from the camera position. | You mean based on 'vis' blocking? i.e. you only see the tris you're looking at
I'm actually surprised you're trying to code a level editor because yes they're not easy. Why did you go that route rather than write up an export script for a 3D app or even WorldCraft, Radiant and Quark which are all open souce level editors that use the standard *.map format? At least that way you can spend more time coding the game rather than fixing issues that crop up with the editor (unless you're building the editor into the MMO?), I'm not citicising btw, I'm genuinely curious as to why you've gone this approach rather than using what's out there... |
i was creating a built in external scripting language for the editor. eventually i wanted to make it the equivalent of the unrealed but geared toward mmorpgs.
there was a bunch of other things i planned on including into this editor so i could just use one tool for all my game editing opposed to buying multiple different programs and then spend time putting it all together in combined archive file. |
|
Back to top |
|
 |
BorisTheEngineer
Joined: 04 May 2007 Posts: 814 Location: United Kingdom
|
Posted: Tue Aug 14, 2007 11:38 am Post subject: |
|
|
I might be able to help you with the quaternion stuff. _________________
Duck!! |
|
Back to top |
|
 |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Tue Aug 14, 2007 2:28 pm Post subject: |
|
|
yea im havin troubles. The roll pitch and yaw doesnt quite look right in IMVU. the Avatar is sideways when it should be straight up and down. so i have to go 0 pitch 0 yaw and 80 roll for the avatar to be straight up and down. but if i try to rotate the yaw the avatar doesnt turn in Quats it rotates ins oem strange direction. i can paste in the function i got to convert Euler to quats maybe you can look at it and see if there is a problem. |
|
Back to top |
|
 |
neo1471
Joined: 22 Jul 2005 Posts: 3636 Location: United Kingdom
|
Posted: Tue Aug 14, 2007 3:48 pm Post subject: |
|
|
try pming isawhim, im not sure how far he got with his but i know his done a enough to have calculations and a bit of programming to work that out allready? (not sure if its acurate tho, but its a start as his collected info on it and things)
couldnt hurt to have the info on hand to compair atleast?
uv done veryy well to have gotten this far with ur app lancewrath, well done
(i know verryyyy limmited programming, just doing an assinment for uni on it atm as well.. tho its only basic stuff) _________________
The head? i lost an auction -.-
"Crankificates" -Polystyrene |
|
Back to top |
|
 |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Tue Aug 14, 2007 5:46 pm Post subject: function |
|
|
ok here is the function i got so far for converting euler rotations to quaternions
Code: |
Function QUA_EulerToQuat2(Pitch#, Yaw#, Roll#)
Pitch# = Pitch# / 2.0
Yaw# = Yaw# / 2.0
Roll# = Roll# / 2.0
Cos_Pitch# = Cos(Pitch#)
Cos_Yaw# = Cos(Yaw#)
Cos_Roll# = Cos(Roll#);
Sin_Pitch# = Sin(Pitch#)
Sin_Yaw# = Sin(Yaw#)
Sin_Roll# = Sin(Roll#);
CpCy# = Cos_Pitch# * Cos_Yaw#
SpSy# = Sin_Pitch# * Sin_Yaw#
SpCy# = Sin_Pitch# * Cos_Yaw#
CpSy# = Cos_Pitch# * Sin_Yaw#
q.QUA_Quat=Last QUA_Quat
If q=Null q=New QUA_Quat
q\z# = ((Sin_Roll# * CpCy#) - (Cos_Roll# * SpSy#))*-1
q\x# = ((Cos_Roll# * SpCy#) + (Sin_Roll# * CpSy#))*-1
q\y# = (Cos_Roll# * CpSy#) - (Sin_Roll# * SpCy#)
q\w# = (Cos_Roll# * CpCy#) + (Sin_Roll# * SpSy#)
End Function
|
[/code] |
|
Back to top |
|
 |
BorisTheEngineer
Joined: 04 May 2007 Posts: 814 Location: United Kingdom
|
Posted: Tue Aug 14, 2007 9:13 pm Post subject: |
|
|
When it's multiplied out like that its hard to make any sense of it at all, but my best guess is it was written for a different coordinate system, although you might be outputing the quaternion parts in the wrong order.
I don't know what the "official" cal3D definitions are but I interpreted the coordinates as (x,y,z) with x being to the right, y being away from the viewer and z being up. The default orientation would be facing the viewer then. The quaternions appear to be ordered (i,j,k,real), which seems to be consistent so far.
If I remember correctly a yaw should be a rotation about the z axis, so stuff a yaw of 180 degrees into that function and I get a 1 in the "y" part of the quaternion.
What system are you using?, also when the quaternion is output what order is used for the values, is it (x,y,z,w) or (z,y,x,w)? _________________
Duck!! |
|
Back to top |
|
 |
BorisTheEngineer
Joined: 04 May 2007 Posts: 814 Location: United Kingdom
|
Posted: Tue Aug 14, 2007 11:44 pm Post subject: |
|
|
Thought some more about it, a yaw of angle A on its own expressed in IMVU form would be
0 0 sin(a/2) cos(a/2) _________________
Duck!! |
|
Back to top |
|
 |
lancewrath
Joined: 14 Nov 2006 Posts: 146 Location: USA - CA
|
Posted: Wed Aug 15, 2007 8:46 am Post subject: |
|
|
hmm well it exports x,y,z,w in the skeletal file.
I'm using blitz style Euler, which i end up running into the gimbal lock when using euler rotations.. grr thats kind of why i like quaternions better.
i think i may have found a better solution to Exporting quaternions
using blitz style Euler rotations.
Code: |
Function EulerToQuat(out.Quat, src.Rotation)
Local cr# = Cos(-src\roll/2)
Local cp# = Cos(src\pitch/2)
Local cy# = Cos(src\yaw/2)
Local sr# = Sin(-src\roll/2)
Local sp# = Sin(src\pitch/2)
Local sy# = Sin(src\yaw/2)
Local cpcy# = cp * cy
Local spsy# = sp * sy
Local spcy# = sp * cy
Local cpsy# = cp * sy
out\w = cr * cpcy + sr * spsy
out\x = sr * cpcy - cr * spsy
out\y = cr * spcy + sr * cpsy
out\z = cr * cpsy - sr * spcy
End Function
|
|
|
Back to top |
|
 |
BorisTheEngineer
Joined: 04 May 2007 Posts: 814 Location: United Kingdom
|
Posted: Wed Aug 15, 2007 10:38 am Post subject: |
|
|
Gimbal lock's pretty much inevitable at some combination of Euler angles.
Edited as I'm not sure about this: {I think you might find roll and pitch reversed, this is because the default unrotated state in IMVU appears to be facing along the y axis, not the x axis as some systems assume.} Actually I take that back. If that's how BB defines roll then thats how it must be exported regardless of which way the avatar standing on the node actually faces. _________________
Duck!! |
|
Back to top |
|
 |
|