Jump to content


Photo

Rotation point for prefabs


10 replies to this topic

#1 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35923 posts

Posted 12 March 2017 - 11:50 AM

I'm starting the process of creating drop-ready prefab buildings using my modules. 

 

Anyone know what the rotate point is for prefabs?  I thought it would be the origin of the map (0,0,0) but that doesn't appear to be the case.  I'd like people to be able to rotate the prefab to see it from all angles, but it currently rotates so widely that it leaves the viewing area.


Posted Image

#2 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17971 posts

Posted 12 March 2017 - 12:25 PM

Anyone know what the rotate point is for prefabs?  I thought it would be the origin of the map (0,0,0) but that doesn't appear to be the case.

As I understand it, when I have created models or prefabs I have do so with the item at 0,0,0 in the map before exporting it. Then when viewed in DR its stays centered in the viewer as you rotate it.



#3 Melan

Melan

    Contest Winner, Wordsmith

  • Campaign Dev
  • PipPipPipPip
  • 4317 posts

Posted 12 March 2017 - 12:27 PM

Yeah, you have to move the prefab close to (but not exactly to) 0,0,0 before you save it.


Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

#4 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35923 posts

Posted 12 March 2017 - 01:48 PM

I did that.  It's centered in the viewer but it still rotates widely.


Posted Image

#5 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7353 posts

Posted 12 March 2017 - 01:50 PM

http://bugs.thedarkm...iew.php?id=4443

 

What DR version are you using?


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#6 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35923 posts

Posted 12 March 2017 - 02:03 PM

You can see in the video that the model is centered on the map origin, but you can't rotate it in the viewer to see the other side.

 


Posted Image

#7 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35923 posts

Posted 12 March 2017 - 02:03 PM

http://bugs.thedarkm...iew.php?id=4443

 

What DR version are you using?

 

You can set a new rotation point?  How?  I have the most recent version but don't know how to do that.


Posted Image

#8 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 317 posts

Posted 12 March 2017 - 02:21 PM

In the video you're only showing a weird rotation inside the prefab viewer, so I assume that's the problem? Ever since 2.0.3 or so, Dark Radiant's prefab (and model?) viewers changed from rotation around the origin of your pf/model to 3D viewport controls. You're not seeing the prefab rotating weird due to a wrong origin, that's on the camera. If you right click the viewer window, in fact, you can go into freelook mode just like the 3D viewport.

 

I think it was brought up once or twice in the DR release threads and I don't honestly know if it was intentional. Me, I don't really like it that much, since now some prefabs with bad origin points are invisible and impossible to spot in the viewer.


Edited by Spooks, 12 March 2017 - 02:21 PM.

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#9 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 5573 posts

Posted 13 March 2017 - 09:39 AM

Well, this might not be that difficult to fix (I know, shut my mouth).

There is already code to find the center of the bounds of an entity or group of entities.

The viewer could generate the center of prefab.


I always assumed I'd taste like boot leather.

 

#10 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17971 posts

Posted 13 March 2017 - 03:11 PM

Ever since 2.0.3 or so, Dark Radiant's prefab (and model?) viewers changed from rotation around the origin of your pf/model to 3D viewport controls. I think it was brought up once or twice in the DR release threads and I don't honestly know if it was intentional. Me, I don't really like it that much, since now some prefabs with bad origin points are invisible and impossible to spot in the viewer.

If that was the case then all models would be effected.

 

@Springheel, your video is very low res so can't tell what your doing. That said I don't think the origin of the model has been placed at 0,0,0. And is the model. a FS before its exported to .ASE? If the model is .LWO then the export trick isnt going to work as DR wont be making any changes to the model.



#11 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35923 posts

Posted 13 March 2017 - 03:33 PM

The problem is that the prefab viewer doesn't have the same rotation controls as the model viewer.  It only has the freelook rotation option, using the right mouse button, which by default sets the camera/rotation point a distance from the prefab.  There doesn't seem to be any way around that.


Posted Image



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users