The new home for the IMVU Community is help.imvu.com. For more information, check out this article.

IMVU room creation tool
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IMVU Forum Index -> 3D Developing
View previous topic :: View next topic  
Author Message
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Sat Aug 11, 2007 7:20 pm    Post subject: IMVU room creation tool Reply with quote

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
View user's profile Send private message  
neo1471

neo1471's page


Joined: 22 Jul 2005
Posts: 3636
Location: United Kingdom

PostPosted: Sun Aug 12, 2007 2:17 am    Post subject: Reply with quote

Wow cool! Very Happy, 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 Very Happy

may help hear for this program to become even more useful? ^_^

looks brilliant very well done lancewrath Smile

(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 Very Happy)
_________________

The head? i lost an auction -.-
"Crankificates" -Polystyrene
Back to top
View user's profile Send private message  
jazzKat 18+ Age Verified

jazzKat <a href='/age_verify/index/'><img src='/common/img/icons/age_verified_35x18.gif' width='35' height='18' alt='18+ Age Verified'/></a> 's page


Joined: 20 Sep 2005
Posts: 1852
Location: United Kingdom

PostPosted: Mon Aug 13, 2007 7:32 am    Post subject: Reply with quote

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 Wink
_________________
Want to make items for IMVU?
Click here to get started!
Back to top
View user's profile Send private message Send e-mail  
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Mon Aug 13, 2007 11:25 am    Post subject: Reply with quote

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 Wink


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
View user's profile Send private message  
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Mon Aug 13, 2007 11:27 am    Post subject: Reply with quote

CSG isnt easy to program...
Back to top
View user's profile Send private message  
jazzKat 18+ Age Verified

jazzKat <a href='/age_verify/index/'><img src='/common/img/icons/age_verified_35x18.gif' width='35' height='18' alt='18+ Age Verified'/></a> 's page


Joined: 20 Sep 2005
Posts: 1852
Location: United Kingdom

PostPosted: Mon Aug 13, 2007 11:42 am    Post subject: Reply with quote

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 Wink


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
View user's profile Send private message Send e-mail  
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Mon Aug 13, 2007 12:34 pm    Post subject: Reply with quote

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 Wink


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
View user's profile Send private message  
BorisTheEngineer

BorisTheEngineer's page


Joined: 04 May 2007
Posts: 814
Location: United Kingdom

PostPosted: Tue Aug 14, 2007 11:38 am    Post subject: Reply with quote

I might be able to help you with the quaternion stuff.
_________________
Duck!!
Back to top
View user's profile Send private message  
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Tue Aug 14, 2007 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message  
neo1471

neo1471's page


Joined: 22 Jul 2005
Posts: 3636
Location: United Kingdom

PostPosted: Tue Aug 14, 2007 3:48 pm    Post subject: Reply with quote

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? Smile

uv done veryy well to have gotten this far with ur app lancewrath, well done Very Happy

(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
View user's profile Send private message  
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Tue Aug 14, 2007 5:46 pm    Post subject: function Reply with quote

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
View user's profile Send private message  
BorisTheEngineer

BorisTheEngineer's page


Joined: 04 May 2007
Posts: 814
Location: United Kingdom

PostPosted: Tue Aug 14, 2007 9:13 pm    Post subject: Reply with quote

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
View user's profile Send private message  
BorisTheEngineer

BorisTheEngineer's page


Joined: 04 May 2007
Posts: 814
Location: United Kingdom

PostPosted: Tue Aug 14, 2007 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message  
lancewrath

lancewrath's page


Joined: 14 Nov 2006
Posts: 146
Location: USA - CA

PostPosted: Wed Aug 15, 2007 8:46 am    Post subject: Reply with quote

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
View user's profile Send private message  
BorisTheEngineer

BorisTheEngineer's page


Joined: 04 May 2007
Posts: 814
Location: United Kingdom

PostPosted: Wed Aug 15, 2007 10:38 am    Post subject: Reply with quote

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
View user's profile Send private message  
Display posts from previous:   
Don't want to see these ads? Join the VIP Program!

Don't want to see these ads? Join the VIP Program!

Hide ads? Get VIP!
Post new topic   Reply to topic    IMVU Forum Index -> 3D Developing All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 FAQFAQ   UsergroupsUsergroups   RegisterRegister  ProfileProfile   Log in for private messagesLog in for private messages 

Search the forums:


Powered by phpBB