Welcome, Guest

Author Topic: Add-ons  (Read 56270 times)

HallowedError

  • *****
  • Posts: 83
  • The inquisitive mind
Add-ons
« on: February 18, 2009, 07:34:22 PM »
Hey Dan, is it possible for you to do optional add-ons that don't require full program updates? If it is you probably would have already done this but I was wondering. It would make it a lot easier to add skins and such without the next update.
I would also be pretty neat if people who know how could add the own user created content. Just a thought.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #1 on: February 18, 2009, 08:02:08 PM »
Good question.

Anything is possible, it's all about deciding what's worth the time it takes to make it happen.

Conceptually this wouldn't be too hard to do. Adding better support for user generated content is on the list, but isn't something I've spent too much time on yet.

Eventually I want to let the user easily load their own images for planet textures, etc...

While there have been a few small texture updates the more interesting changes occur in the code which changes the executable (the main program itself) which requires a standard update.

APODman

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 225
    • Astronomic Picture of the Day - Brazil
Re: Add-ons
« Reply #2 on: February 19, 2009, 04:00:53 AM »
About textures it's possible add new or modify the old textures adding or editing the .dds files in "Media" folder and the files "Appearance" and "Local Objetcs" in "Data" folder in the instalation folder of Universe Sandbox.

The .dds file ( I use the Jupiter.dds file ) edit instaling a .dds plugin in Photoshop that I download here: http://developer.nvidia.com/object/photoshop_dds_plugins.html

In "Appearance" file I copy the Neptune data and paste in the final of list:
Code: [Select]
 
      <Object>
<Name>Test</Name>
<TextureDiffuse>test.dds</TextureDiffuse>
<Type>Gas</Type>
<ColorReal>a4bfbf</ColorReal>
<ColorVivid>Purple</ColorVivid>
      </Object>
 

In "LocalObjects" file I copy the data of a Transneptunian object and copy in the final of the list ( changing the id of the object too  ):

Code: [Select]
    <Object>
<ID>3768</ID>
<Name>Test</Name>
<Type>TransNep</Type>
<AbsMag>8</AbsMag>
</Object>
 

Then I made a simulation of a extrasolar planet ( a "Hot Jupiter" )  and alter the <Object> and <Appearance> planet data in the corresponding file of the simulation:

Code: [Select]
<Body>
    <Name>Test</Name>
    <Object>Test</Object>
    <Appearance>Test</Appearance>
</Body>


The result are here:




[ ]´s
« Last Edit: February 19, 2009, 04:12:56 AM by APODman »

SuperNova

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 387
  • ROW ROW, FIGHT THE POWAH!
    • Dreadnaught BG
Re: Add-ons
« Reply #3 on: February 19, 2009, 04:23:21 AM »
thats.....................................................TO COOL!!!! :o :o :o W.O.W!!! O.o how do you make that?!! learn it to me

APODman

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 225
    • Astronomic Picture of the Day - Brazil
Re: Add-ons
« Reply #4 on: February 19, 2009, 04:27:55 AM »
thats.....................................................TO COOL!!!! :o :o :o W.O.W!!! O.o how do you make that?!! learn it to me

I post the alterations that I made, just read the text and follow the steps.


[ ]´s

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #5 on: February 19, 2009, 07:40:18 AM »
Can you pu it up for download or something?

APODman

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 225
    • Astronomic Picture of the Day - Brazil
Re: Add-ons
« Reply #6 on: February 19, 2009, 08:38:19 AM »
Can you pu it up for download or something?

Sure , look in the attachment ( the configuration data to "test planet" are in the final of the listing of the archives )


[ ]´s

avadod

  • *****
  • Posts: 88
Re: Add-ons
« Reply #7 on: February 19, 2009, 10:49:17 AM »
can you create the look of a planet

HallowedError

  • *****
  • Posts: 83
  • The inquisitive mind
Re: Add-ons
« Reply #8 on: February 19, 2009, 03:23:06 PM »
Neat, but I was suggesting something more user friendly. Personally I hate editing text files, too easy to mess up.
Otherwise thanks for the step-by-step. I might mess with that sometime.

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #9 on: February 19, 2009, 03:40:52 PM »
Neat, but I was suggesting something more user friendly. Personally I hate editing text files, too easy to mess up.
Otherwise thanks for the step-by-step. I might mess with that sometime.

Yeah, I constantly mess up my XML's

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #10 on: February 19, 2009, 03:52:27 PM »
Awesome. Well done APODman.

A few comments:

1 - Your changes may be lost when you update Universe Sandbox.
Changes that you make to the files 'Appearance.xml' and 'LocalObjects.xml' will be overwritten (without warning) when you update Universe Sandbox to a new version.
Files that you add to the Media folder may also be lost.
Be sure and keep a copy of your work outside of the installation folder.

2 - You don't have to save the textures as dds files.
You can use bmp, jpg, gif, or png. You can open the dds files and resave them with Xnview (a free graphical viewer that I really like).
http://www.xnview.com/

3 - You can set the body's properties in the 'EarthObjects.xml' file instead of 'LocalObjects.xml'.  'EarthObjects.xml' is smaller and easier to work with. Both of these files (along with Galaxies.xml and Stars.xml) are interpreted by the same code in Universe Sandbox so it doesn't matter where the info is added.

4 - The ID tag (<ID>3768</ID>)isn't used by Universe Sandbox.
There's no need to change (or even use it). I use it to as a way to sort the list in Excel.

can you create the look of a planet

Yes. By editing the texture and/or model you can make a planet look like anything you want.

Here's how to make a planet texture that correctly maps onto a sphere:
http://www.vgd.co.uk/pages/notebook/mapsphere.html

Neat, but I was suggesting something more user friendly. Personally I hate editing text files, too easy to mess up.
Otherwise thanks for the step-by-step. I might mess with that sometime.

Exactly... The grand plan is to allow one to make these changes without editing files and to store them all in your My Documents\Universe Sandbox folder so that it's not deleted if you uninstall or overwritten when you update.



If anyone comes up with any cool textures and/or settings send them my way for possible inclusion in an upcoming release.
« Last Edit: February 19, 2009, 03:58:24 PM by Dan Dixon »

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #11 on: February 19, 2009, 05:12:33 PM »
Well, what Media folder? Is is USer/Media or Documents/Universe Sandbox/Media or what?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #12 on: February 19, 2009, 05:23:20 PM »
Well, what Media folder? Is is USer/Media or Documents/Universe Sandbox/Media or what?

The media folder that's in the install location for Universe Sandbox.

Nothing that you put in the My Documents\Universe Sandbox will get deleted.

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #13 on: February 19, 2009, 06:05:12 PM »
Well, what Media folder? Is is USer/Media or Documents/Universe Sandbox/Media or what?

The media folder that's in the install location for Universe Sandbox.

Nothing that you put in the My Documents\Universe Sandbox will get deleted.
Oh and now I made a file and put it in the appeance tag, test.jpeg. and it won't work. The XML will just the texture wont? What do I put it in?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #14 on: February 19, 2009, 06:54:36 PM »
1 - Make a new texture and put it in the Media folder.
2 - Edit the Appearance.xml file to use the new texture.
3 - Create or Edit a new system/simulation file to use the new appearance item.

To see if your new texture is working just change the listing in Appearance.xml for Juptier from 'jupter.dds' to the name of your new file and then open Universe Sandbox and see if Jupiter looks different.

Changes to Appearance.xml require a restart of Universe Sandbox as it currently only reads this file once as it starts up.



Actually you don't even have to edit the Appearance.xml file...

Use this tag in your system/simulation file:
<Texture>PoolBall-01</Texture>

Open up Pool Balls - Racked.xml to see how this is used.
(the file extension (.dds or .jpg) is optional, I think it looks for the texture file you specify with a couple different extensions (dds, png, jpg) until it finds it.

APODman

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 225
    • Astronomic Picture of the Day - Brazil
Re: Add-ons
« Reply #15 on: February 20, 2009, 10:53:50 AM »
Thanks by the tips Dan !!


[ ]´s

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #16 on: February 20, 2009, 06:10:12 PM »
It won't work. I put test2.jpg in a texture tag and it was white. JUST WHITE. What ag do I put it in?

TagResult
TextureWhite
TextureDiffuseMoon texture
AppearanceAny colored moon texture
This is what I want it to be:
« Last Edit: February 20, 2009, 06:28:18 PM by NeutronStar »

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #17 on: February 20, 2009, 06:27:55 PM »
Code: [Select]
<?xml version="1.0" standalone="yes"?>
<System>
  <Body>
    <Name>Sun</Name>
    <Object>Sun</Object>
    <Appearance>Sun</Appearance>
    <Mass>19891000000</Mass>
    <Density>1.40844628708309</Density>
    <Diameter>1392000</Diameter>
    <PositionX>-67885734.9754417</PositionX>
    <PositionY>129233872.55859</PositionY>
    <PositionZ>20395297.0298883</PositionZ>
    <VelocityX>6.1834716256905E-08</VelocityX>
    <VelocityY>-2.6114950594118E-08</VelocityY>
    <VelocityZ>-9.34240494717165E-09</VelocityZ>
    <Settings>gravity=1</Settings>
  </Body>
  <Body>
    <Name>Test 3</Name>
    <Object>Test 3</Object>
    <Texture>test3</Texture>
    <Mass>734.9</Mass>
    <Density>3.34458858085376</Density>
    <Diameter>3475.06</Diameter>
    <PositionX>23900165.511027</PositionX>
    <PositionY>93183810.6145903</PositionY>
    <PositionZ>6683467.23539272</PositionZ>
    <VelocityX>13.4912953471177</VelocityX>
    <VelocityY>33.9037650943561</VelocityY>
    <VelocityZ>0.234774973129048</VelocityZ>
    <Settings>timestep=1.00 minute</Settings>
  </Body>
</System>

APODman

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 225
    • Astronomic Picture of the Day - Brazil
Re: Add-ons
« Reply #18 on: February 20, 2009, 06:32:03 PM »
Code: [Select]
    <Name>Test 3</Name>
    <Object>Test 3</Object>
    <Texture>test3</Texture>

I supose that you need declare the name of texture file with the extension, <Texture>test3.jpg</Texture>. no ?

[ ]´s

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #19 on: February 20, 2009, 06:38:00 PM »
Code: [Select]
    <Name>Test 3</Name>
    <Object>Test 3</Object>
    <Texture>test3</Texture>

I supose that you need declare the name of texture file with the extension, <Texture>test3.jpg</Texture>. no ?

[ ]´s
nope, dan said you don't need it. I followed your instructions. (except it ain't a .dds) Did exactly what you did, but NOPE! I find that Texture tag seems to work, except that it's white. I try it with it... same result. I give up. I'm not dealing with this XML stuff. I hate it. It never works for me. I need a friendly interface. BY TOMARROW. because you made me so happy you could do this, and I can't and it's stupid.
« Last Edit: February 20, 2009, 06:42:35 PM by NeutronStar »

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #20 on: February 21, 2009, 01:26:57 PM »
I'm sorry you're frustrated.

The file extension is optional. You're right about that.

And the tag to use in System/Simulation files is <Texture>
Again, you don't need to edit the Appearance.xml file to make this work.

1 - Copy the texture into the Media folder.
2 - Create a system file with a <Texture> tag.

Where did you put the texture? Did you put it in the Media folder?
Post your media folder path so I can make sure you're putting it in the right place.

Also... the <Object> tag look up data about the object. So <Object>Earth</Object> looks up the mass and radius for the earth from the file in the Data folder. You can then override these properties by specifying new ones:

As an example:
Code: [Select]
  <Body>
    <Name>Test 3</Name>
    <Object>Earth</Object>
    <Texture>test3</Texture>
    <Mass>2 earth</Mass>
    <PositionX>23900165.511027</PositionX>
    <PositionY>93183810.6145903</PositionY>
    <PositionZ>6683467.23539272</PositionZ>
    <VelocityX>13.4912953471177</VelocityX>
    <VelocityY>33.9037650943561</VelocityY>
    <VelocityZ>0.234774973129048</VelocityZ>
  </Body>

I did find a strange problem where you had to restart Universe Sandbox if you first refer to the texture without the extension and then refer to it with one. That's been fixed locally and will be in the next update.

I also just added a Media folder here: My Documents\Universe Sandbox so in the upcoming release you can keep you custom media separate from the default content.

SuperNova

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 387
  • ROW ROW, FIGHT THE POWAH!
    • Dreadnaught BG
Re: Add-ons
« Reply #21 on: February 25, 2009, 02:55:25 AM »
Like Neutron Star the texture don't wokrs fore me. :( i copie the local objects and the appereance  to C;/ProgramFiles/UniverseSandbox/Data/ but it don't works

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #22 on: February 25, 2009, 07:22:46 AM »
Like Neutron Star the texture don't wokrs fore me. :( i copie the local objects and the appereance  to C;/ProgramFiles/UniverseSandbox/Data/ but it don't works

no, you have to go into media, and it's i dunno where but not there... or is it?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #23 on: February 25, 2009, 06:55:59 PM »
Don't put anything in the installation folder.
(C:\Program Files\Universe Sandbox)
It will/may get deleted or changed when Universe Sandbox is updated.

Put your custom textures here:
My Documents\Universe Sandbox\Media
(and you may have to manually create the media folder or run the Pool Balls system (which will create it). This is minor oversight that I'll fix in the next release)

Does that work for you?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #24 on: February 25, 2009, 07:37:50 PM »
Check the "Sandbox Log.txt" file. It will list errors that you get when it tries to load textures.

Are you sure the extension of the file is jpeg and not jpg?

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #25 on: February 25, 2009, 07:39:07 PM »
Check the "Sandbox Log.txt" file. It will list errors that you get when it tries to load textures.

Are you sure the extension of the file is jpeg and not jpg?

right befor you posted i figured it out and came here to say that!
see about 90% of my planet at: http://www.youtube.com/watch?v=WtGXjYQYmOI
« Last Edit: February 25, 2009, 07:44:18 PM by NeutronStar »

SuperNova

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 387
  • ROW ROW, FIGHT THE POWAH!
    • Dreadnaught BG
Re: Add-ons
« Reply #26 on: February 27, 2009, 07:03:22 AM »
This Happens


SuperNova

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 387
  • ROW ROW, FIGHT THE POWAH!
    • Dreadnaught BG
Re: Add-ons
« Reply #27 on: February 27, 2009, 07:07:25 AM »
I HATE TO EDIT XML FILES!!!!

is there no EASY way to make systems

i was REALY happy about the planet skin maker. because i'm search very long fore a planet editor......

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Add-ons
« Reply #28 on: February 27, 2009, 07:49:29 AM »
I HATE TO EDIT XML FILES!!!!

is there no EASY way to make systems

i was REALY happy about the planet skin maker. because i'm search very long fore a planet editor......
USe <Texture> file.jpg</Texture> If JPEG and put your file in My Documents/Universe sandbox/Media

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Add-ons
« Reply #29 on: March 02, 2009, 06:21:55 PM »
I know it's still hard to customize and make your own systems.
This is a difficult problem to solve, but something that I am working toward in the long term.
Ideally you would be able to create planets and systems without having to edit any code at all.

In the meantime please continue to ask questions. I'm happy to help you solve these problems.

Did you resolve the issue that you were having?