Sign in to follow this  

Managing scene objects worlds position without a scene editor

This topic is 2052 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys,

I was using "hardcoded" values on a XML file to specify absolute world position and load my scene objects, but now that I've added quite a few objects it is quite painful to keep editing the xml file, see if my new object is on the desired position, than change the position on the XML a "little bit to the left".

So, I was wondering how you guys do this annoying job if you dont have a scene editor. I'm not planning to code one, unless it is absolute necessary.

Thanks!

Share this post


Link to post
Share on other sites
Well you need to specify the position somewhere. If it's not manually in code of in your xml file, I can't see another solution than an editor. Note that you don't necessary need to create a fully-fledged editor with toolbars and properties and everything if you don't need one, it's kinda easy to hack a simple editor by using a flying FPS camera and a button that add the objects in front of where you are looking, and a save function which scan the scene afterward and generate the xml file, but yeah, it's a scene editor.

edit: You could also use a 3D modeling application like Maya and write a plugin which will create your XML file format based on the scene. Edited by Dunge

Share this post


Link to post
Share on other sites
Hum, I liked the flying FPS camera solution, thats easy to do. Thanks for the idea Dunge, I was looking for something like this.

Btw, is it hard to code those plugins for 3d modeling apps? Im wondering if I will spend most of my time converting axis directions, configuring scales and all those boring things.

Share this post


Link to post
Share on other sites
[quote name='wiselogi' timestamp='1336081650' post='4937222']
Btw, is it hard to code those plugins for 3d modeling apps? Im wondering if I will spend most of my time converting axis directions, configuring scales and all those boring things.
[/quote]

It depends on how complex your game is and what you need to export out of the 3D package. But it can be as simple as a python script that loops through nodes and writes out data to a file.

In general 3D packages are pretty good at selecting/placing/moving/manipulating meshes and other node types. In fact lot of level editors will mimic the basic interface of Max or Maya.

Share this post


Link to post
Share on other sites
I use blender as editor.
Blender allows various ways to push data down to specific meshes, it has a per-node name and a per-mesh name.
I export to collada, then when loading I look for node names to match special behavior. If a match is found, the contained meshes are transformed and forwarded to the appropriate mangler.
In some other cases, I use material names to trigger special behavior.

What happens when a node has a special name but contains special materials? Don't ask. :P

Share this post


Link to post
Share on other sites
Maybe you can extend your application, so that itself becomes your "editor". If you can add a bit of interactivity to it, like moving an object with your keyboard and mouse to the desired position and save the value to a file or print it to the screen.
I usually try to do stuff like this in the application itself instead of writing a new program that copies a lot of functionality from the original program. Sometimes some editor-like feature creeps into the main application because it might be cool to use it. Write and extend this features as you need them and soon you have your editor, even if it did not feel like writing one.

Share this post


Link to post
Share on other sites

This topic is 2052 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this