Skydome question

Hello :slight_smile:

I’m having trouble with setting my skydome’s texture.

 def Load_Skydome(self):
        self.skymap = loader.loadModel("skymap")
        self.skymap.reparentTo(camera)
        
        self.skymap.setEffect(CompassEffect.make(render)) 
        self.skymap.setBin('background', 0) 
        self.skymap.setDepthWrite(False) 

You see, when I run the game it shows itself as this.

The texture the egg loads it’s located in a Textures folder, on the game’s main folder.

egg file
texture file (jpg)

Please give me some advice,

{} {} }{

PS: If you want to see more pics of this, go to my blog. It’s in spanish tho.

Do you get any error message on the command line?

Here is what I would do:

(1) Find out where your egg files is located (not in your post)

(2) Open the egg file and find the tag. There you will find the filename of your texture.

(3) Have a look at the egg syntax documentation. There you will find:

(4) Check if your texture filename is right.

You have specified a relative path in your egg file, so it has to be the path from the egg file to to your texture file (if you want Panda3D to find the texture via the first criterion). Optionally you could add your game’s main folder to the texture path in your config.prc (which only makes sense if you use a custom config for your game).

enn0x

<Texture> Material.001 {
  "./Textures/skymap.jpg"
}

The folder tree hierarchy goes like this:

Game Folder
     All the py and egg files
     skymap.egg
     Textures
          All the texture files
          skymap.jpg

No, it doesn’t give me any error, except when I try to load the texture with loadTexture to then set it to the skymap, in which case it gives me the “Argument 1 must be Texture, not Nonetype”.

Can someone check the egg file please? I’m almost 100% sure that the problem is there, but I cannot find it (I did a sphere, inverted it’s normals and made a material using the texture file, under Blender).

I have found a Skysphere model in the Downloads section and I’ve learned a lot from it.

It was my egg after all :slight_smile:

Thank you people,

{} {} }{

Actually, after some time tinkering with the skysphere, I found out that it doesn’t work very well with my type of game. I can see the south pole right now and I’m not loving it. The distortion is ugly too.

I’d like to make a skybox, but Blender and I aren’t good friends (I don’t understand even how to achieve this -seemingly- simple task).

Any tips? I have the pics already, I could use an egg file but I’m not going to ask for it. I believe in doing stuff by myself.

You could have a look at this post. It’s a short script that creates a nice sky dome (not sphere). You could try tweaking the parameters if you don’t like the projection, or modify it yourself.

https://discourse.panda3d.org/viewtopic.php?p=11845#11845

If you don’t have a tile-able sky texture you could create one yourself. Read about the plasma algorithm (aka diamond-square aka midpoint-displacement). There is at least on implementation here on the forum. Part of PandaSteer2 if I am right.

enn0x

Thanks enn0x, you should start to charge for your services =)

However, that won’t do the trick. My game makes it reaaaally hard to look at something else than from the horizont + 30º to the nadir, the zenith is out of reach by the camera’s design.

I just thought of getting some equirectangular photos for the inside of the skysphere :slight_smile:

I’ll post some pictures in a few hours if everything went well :slight_smile: