Welcome, Guest

Author Topic: Custom texture help  (Read 8992 times)

Omnigeek6

  • *****
  • Posts: 111
Custom texture help
« on: January 10, 2011, 05:18:38 PM »
I've been trying to avoid wasting peoples' time asking for information I can look up, but I've tried pretty much everything and cannot get my textures to work.

I have edited the bodies file and replaced the appearance info with texture tags (No effect), and even edited the object and appearance files (The body ended up with the texture of Apophis, the last body in the localobjects file).

Please help, I can't figure out how to get custom textures working.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Custom texture help
« Reply #1 on: January 10, 2011, 05:42:11 PM »
Upload your xml or ubox file and I'll take a look.

Omnigeek6

  • *****
  • Posts: 111
Re: Custom texture help
« Reply #2 on: January 10, 2011, 09:06:39 PM »
Okay... here's the XML file.

This is exactly what was added to the Appearance file in Data, in the program files folder:

<Object>
      <Name>Rajin</Name>
      <TextureDiffuse>NK004- Rajin texture.jpg</TextureDiffuse>
      <Type>Gas</Type>
      <ColorReal>b8a36e</ColorReal>
      <ColorVivid>Orange</ColorVivid>
   </Object>

This was added to the LocalObjects file in Data, in the program files folder.

<Object>
      <ID>3768</ID>
      <Name>Rajin</Name>
      <Diameter>155167.207310229</Diameter>
      <Type>Planet</Type>
      <Mass>32276200</Mass>
      <Density>1.65</Density>
      <Obliquity>7.5</Obliquity>
      <RotationPeriod>8.45</RotationPeriod>
      <Color>Orange</Color>
   </Object>

There is a copy of the attached texture in both the My documents media folder and the program files media folder.

Naru523

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 1295
  • let's walk the true path of life
Re: Custom texture help
« Reply #3 on: January 10, 2011, 09:07:34 PM »
Have you tried <Texture> ?

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Custom texture help
« Reply #4 on: January 10, 2011, 09:17:33 PM »
Also, use (My) Documents\Universe Sandbox\Systems.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Custom texture help
« Reply #5 on: January 10, 2011, 09:44:38 PM »
You're making this harder than it has to be. Editing the Appearance.xml & LocalObjects.xml files are not necessary to use custom textures (and not recommended as your changes may be overwritten when a new version is released).

It's just two steps:

1 - Copy your jpg into the Media folder in documents:
(My) Documents\Universe Sandbox\Media

2 - Edit the bodies.xml file to include this line within the <body> tag of the body you want to use this texture with:
<texture>NK004- Rajin texture.jpg</texture>

And then drag and drop the saved xml file into the Universe Sandbox window to open it.



Future versions of Universe Sandbox will allow use of custom textures without editing xml files at all. Also planned is the ability to save textures in the ubox container files.



Not necissary to make the texture work, but note this problem:

In your bodies.xml file you refer to this:
    <object>Rajin (NK004)</object>

... but you list the appearance info as:
     <Name>Rajin</Name>

Those are different.


Also, use (My) Documents\Universe Sandbox\Systems.

The folder changed in 2.0.14, it's now:
(My) Documents\Universe Sandbox\Simulations

You can place xml or ubox files here and they will show up in Open > My Simulations (inside Universe Sandbox).
« Last Edit: January 10, 2011, 10:47:56 PM by Dan Dixon »

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Custom texture help
« Reply #6 on: January 10, 2011, 09:45:56 PM »
wuut. No wonder the systems names are all messed up.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Custom texture help
« Reply #7 on: January 10, 2011, 09:47:25 PM »
How are they messed up?  When you run 2.0.14 for the 1st time it automatically renames the 'Systems' folder to 'Simulations'. Let me know what you mean.

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Custom texture help
« Reply #8 on: January 10, 2011, 09:54:11 PM »
When I named one of the simulations instead of the default name, it named itself .ubox in the Simulations folder.

Also, please remove HD 20180 from the Community Simulations, because it doesn't work. >.> Or just fix it. :P

EDIT: Wtf densities in HD 69830?
« Last Edit: January 10, 2011, 09:58:33 PM by Darvince »

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Custom texture help
« Reply #9 on: January 10, 2011, 10:02:05 PM »
I think your problem with naming is the same as this:
http://universesandbox.com/forum/index.php/topic,2633.0.html

This problem is unrelated to the folder name change. It's caused by faulty code that is supposed to make sure the file name is unique (adding numbers to the end of the file as needed), but for some reason it's clearing out the original name.

And thanks for letting me know about HD 20180. I'll fix it for the next release.

Omnigeek6

  • *****
  • Posts: 111
Re: Custom texture help
« Reply #10 on: January 10, 2011, 11:20:48 PM »
Okay, thank you, it now works.

I think my problem before was that I tried to replace the appearance with texture, instead of adding it.

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Custom texture help
« Reply #11 on: January 14, 2011, 10:39:50 PM »
I didn't know you could even do it that more complicated way. 0_o