Universe Sandbox

Universe Sandbox Legacy => Universe Sandbox 2008 | Discussion => Topic started by: HallowedError on February 18, 2009, 07:34:22 PM

Title: Add-ons
Post by: HallowedError 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.
Title: Re: Add-ons
Post by: Dan Dixon 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.
Title: Re: Add-ons
Post by: APODman 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:

(http://img22.imageshack.us/img22/3869/testsi0.jpg)


[ ]´s
Title: Re: Add-ons
Post by: SuperNova 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
Title: Re: Add-ons
Post by: APODman 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
Title: Re: Add-ons
Post by: atomic7732 on February 19, 2009, 07:40:18 AM
Can you pu it up for download or something?
Title: Re: Add-ons
Post by: APODman 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
Title: Re: Add-ons
Post by: avadod on February 19, 2009, 10:49:17 AM
can you create the look of a planet
Title: Re: Add-ons
Post by: HallowedError 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.
Title: Re: Add-ons
Post by: atomic7732 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
Title: Re: Add-ons
Post by: Dan Dixon 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.
Title: Re: Add-ons
Post by: atomic7732 on February 19, 2009, 05:12:33 PM
Well, what Media folder? Is is USer/Media or Documents/Universe Sandbox/Media or what?
Title: Re: Add-ons
Post by: Dan Dixon 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.
Title: Re: Add-ons
Post by: atomic7732 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?
Title: Re: Add-ons
Post by: Dan Dixon 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.
Title: Re: Add-ons
Post by: APODman on February 20, 2009, 10:53:50 AM
Thanks by the tips Dan !!


[ ]´s
Title: Re: Add-ons
Post by: atomic7732 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:
Title: Re: Add-ons
Post by: atomic7732 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>
Title: Re: Add-ons
Post by: APODman 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
Title: Re: Add-ons
Post by: atomic7732 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.
Title: Re: Add-ons
Post by: Dan Dixon 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.
Title: Re: Add-ons
Post by: SuperNova 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
Title: Re: Add-ons
Post by: atomic7732 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?
Title: Re: Add-ons
Post by: Dan Dixon 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?
Title: Re: Add-ons
Post by: Dan Dixon 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?
Title: Re: Add-ons
Post by: atomic7732 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
Title: Re: Add-ons
Post by: SuperNova on February 27, 2009, 07:03:22 AM
This Happens

Title: Re: Add-ons
Post by: SuperNova 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......
Title: Re: Add-ons
Post by: atomic7732 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
Title: Re: Add-ons
Post by: Dan Dixon 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?
Title: Re: Add-ons
Post by: Ninjaduck on April 17, 2009, 05:06:53 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?

I would suggest incorporating a GUI for changing the colors of bodies in the next version. Maybe, with sliders to change the color, transparency, ect and a dropdown menu for selecting textures. I hope this suggestion helps :D!
Title: Re: Add-ons
Post by: Naru523 on April 27, 2009, 04:18:50 PM
Wowie, I putted a Pluto texture and it looked like this:
Title: Re: Add-ons
Post by: Naru523 on April 27, 2009, 04:20:00 PM
And how do I put movies in :P

Title: Re: Add-ons
Post by: monmarfori on April 27, 2009, 04:24:42 PM
How to make the texture of the sun true?
Title: Re: Add-ons
Post by: Naru523 on April 27, 2009, 04:34:43 PM
Heres the link
http://planetpixelemporium.com/sun.html
Title: Re: Add-ons
Post by: Naru523 on April 27, 2009, 04:38:36 PM
Got the Pluto texture from this web:
http://planetpixelemporium.com/planets.html
Title: Re: Add-ons
Post by: monmarfori on April 27, 2009, 05:37:48 PM
how about the timeline of our sun?
Title: Re: Add-ons
Post by: MonkeyDLuffy on April 28, 2009, 03:02:45 PM
???
Title: Re: Add-ons
Post by: monmarfori on April 28, 2009, 03:29:39 PM
dont know what website :(
Title: Re: Add-ons
Post by: monmarfori on April 28, 2009, 03:36:33 PM
you must go to this link: http://www.maris.com/content/applets/05_StarLifeTime.html then select Moderately small
Title: Re: Add-ons
Post by: MonkeyDLuffy on April 28, 2009, 03:42:01 PM
*claps*
Title: Re: Add-ons
Post by: monmarfori on April 28, 2009, 03:57:19 PM
in the next update we will collide galaxies and merge to form the new elliptical galaxy.
Title: Re: Add-ons
Post by: Bernier77 on May 05, 2009, 02:20:23 PM
I'm extremely confused by all this.  :-[

I have the NVidia plugin, and can open the XML files in notepad, but really don't know what to do to make new body presets.

Some extremely detailed step-by-step instructions would epically help.
Title: Re: Add-ons
Post by: Dan Dixon on May 05, 2009, 09:07:37 PM
but really don't know what to do to make new body presets.

The items in the new body preset list is hard coded. It's not currently setup to allow the user to make additions or modifications.

The actual data values come from the Appearance.xml, LocalObject.xml, Stars.xml, and Galaxies.xml files in the 'Data' folder where the program is installed.

Note that while you're free to edit these files, any changes will be overwritten (without warning) when a new update is installed.
Title: Re: Add-ons
Post by: atomic7732 on June 25, 2009, 09:40:17 PM
Ummm... You have to put ALL of the images in the folder into a movie maker, and then upload it. You may have to put it on YouTube, then post a link. Btw, it isn't a movie.
Title: Re: Add-ons
Post by: Naru523 on July 09, 2009, 11:31:01 PM
you must go to this link: http://www.maris.com/content/applets/05_StarLifeTime.html then select Moderately small
Meh, somehow it's broken...
Title: Re: Add-ons
Post by: deoxy99 on March 09, 2010, 03:56:18 PM
How do you edit the texture files?