Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 31st December 2014, 01:50 PM   #1
shorty feden
Junior Member
Junior member
 
Join Date: Apr 2012
Posts: 7
Default Pivot script

For everybody's information the Pivot script will not work in SL or Inworldz. Works in AC3D but when you export it to DAE file and then upload the mesh into those worlds it changes the pivot back the original place best we can determine.

So looks to me somebody needs to make changes in the Viewer software being used. Was told in Inworldz that it was client problem which is the viewer according to tech.

If there is a solution to this problem, I'm all eyes and ears.


Shorty
shorty feden is offline   Reply With Quote
Old 2nd January 2015, 03:06 PM   #2
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Pivot script

I see why, but I don't have the source code to the Collada exporter to fix the problem... Andy?

Basically, the Collada exporter puts out all the objects in world coordinates instead of object coordinates + object center translation. The Collada format supports a translate tag (see https://www.khronos.org/files/collada_spec_1_4.pdf)

The attached zip file is a dae scene with a door and a wall. The door is purposely offset so its hinge is at 0,0,0 in world coordinates.
- The 'stock.dae' file is untouched from my export from AC3D
- The offset.dae has a translate tag added to move the door to where it belongs.

Ron
Attached Files
File Type: zip example.zip (3.9 KB, 112 views)
jentron is offline   Reply With Quote
Old 8th January 2015, 04:25 AM   #3
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Pivot script

Please try this replacement collada export plugin.

This adjusts the vertex positions and sets the translation to the object-center. The translations are -global- but should work even if nested inside a hierarchy, because group outputs do not have geometry/translation.

Let me know if it works/fixes your problem.
Attached Files
File Type: zip collada_export.zip (83.0 KB, 165 views)
Andy is offline   Reply With Quote
Old 8th January 2015, 08:25 PM   #4
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Pivot script

I would try it, but I'm a linux guy...
jentron is offline   Reply With Quote
Old 12th January 2015, 04:23 AM   #5
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Pivot script

no prob. Linux version: http://inivis.com/external/colladalx.tgz
Andy is offline   Reply With Quote
Old 12th January 2015, 11:58 PM   #6
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Pivot script

Quote:
Originally Posted by Andy View Post
That works for the translate tag, at least in the THREE.js collada loader...
Next request, there is a <shininess> tag. I think you can just export the same number as in AC3D:
Code:
<technique sid="common">
<phong>
<diffuse>
<color>0.627451 0.250980 0.250980 1.000000</color>
</diffuse>
<specular>
<color>0.427000 0.541000 0.612000 1.000000</color>
</specular>
<reflective>
<color>1.000000 1.000000 1.000000 1.000000</color>
</reflective>
<reflectivity>
<float>1.0000000</float>
</reflectivity>
<transparent opaque="A_ONE">
<color>0.000000 0.000000 0.000000 1.000000</color>
</transparent>
<shininess>
<float>50.0000000</float>
</shininess>
</phong>
</technique>
There is also a transparency tag (1 is fully transparent) and the transparent color plays somehow, too.
Code:
<technique sid="common">
<lambert>
<diffuse>
<color>0.020000 0.020000 0.020000 1.000000</color>
</diffuse>
<specular>
<color>0.800000 0.800000 0.800000 1.000000</color>
</specular>
<reflective>
<color>1.000000 1.000000 1.000000 1.000000</color>
</reflective>
<reflectivity>
<float>1.000000</float>
</reflectivity>
<transparent opaque="A_ONE">
<color>0.900000 0.900000 1.000000 1.000000</color>
</transparent>
<transparency>
<float>0.9</float>
</transparency> 
</lambert>
</technique>
jentron is offline   Reply With Quote
Old 13th January 2015, 12:07 AM   #7
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Pivot script

There is a THREE.js swinging door here

No transparency, the white wall has a default shininess, and the door is set to 50... Its material is the one posted above.

and the dae model is here: http://www.jentronics.com/ac3d/door/door.dae
jentron is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 09:08 AM.


AC3D Forum
(C) Inivis Limited 2020