Dynamic Sky Questions

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Re: Dynamic Sky Questions

Postby bnewton81 » Fri Jun 17, 2011 11:53 pm

Try playing with the "map to" panel. there are several buttons that say "flat, sphere, tube, cube" I'm not sure if they work with uv maps though. Also I am pretty sure that you are experiencing an unwraping issue. Experiment with different unwrap methods i.e. "sphere from view, Smart projection, etc. I wish I knew exactly what to do, but much of this is still trial and error for me.

One more thing. You said you had your star field at a 2:1 ratio. How big is your texture (resolution)? I would use several textures to effect a realistic sky. The first would be the star field at 1024x1024 tiled enough times to make it look right, then I would add details on separate uv maps laid over top of each other. One with a moon. One with a nebula. When you do this you must remember to utilize the alpha channel. I hope i haven't made this sound too complex. Bet i have. It really isn't that hard. Just look up "blender decals".
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Dynamic Sky Questions

Postby Jojon » Sat Jun 18, 2011 8:55 am

It is pretty logical that you get that distortion, when you know what it going on.
Given that you apparently have got a UV offset animation working, I'm assuming you have unwrapped using a sphere or cylinder projection, which are exactly what you have with real world maps and is the reason that the further you get from the equator an a map, the more landmasses are stretched out. (Although misrepresentative of actual distances, this is very useful in navigation)

Each ring on your UV sphere has a different diameter and is even zero at the poles (we call it our point of view - sorry, I digress ;), but they will all be streched in the UV-map, so that they fit the entire width of the UV-mapped picture, things will become incresingly squashed towards the poles (we are going from a plane to a sphere here - opposite direction compared to world maps).

One might suggest this form of projection is wasteful, given the difference in density of information (texture texel per rendered screen pixel) across the skydome, but it has its uses, not least of all the very ability to scroll the image around using a UV-map offset, that you are exploiting.

One way to get rid of the distorsion with your texture fully wrapped onto the uvsphere, is to warp it using something like photoshop. I'm no photoshop user, so I can't say exactly how to do it, but the principles are universal. You "simply" stretch a 2:1 elliptical portion of the picture to fit the entire rectangle that is the picture, discarding every pixel that falls outside the ellipse.
There is the matter of tiling, which you will want to address either before or after the warp - probably both.

When working with triangles there is another distortion problem. On the cylinder-projection UV-map every square is perfectly rectangular, but the actual polygons become more and more trapezoid the farther to the poles you get. This would not have been a problem if it had really been a matter of four-sided polygons, but in actuality the "quads" you see are two triangles, they are just represented and handled like quads for convenience. To see this, you can press ctrl-T to turn every selected "quad" face to triangles - they will be diagonally split.

This is a problem, because that means moving one corner in the UV-map representation of a quad, may mean you are only affecting one of the triangles. Seemingly working with one surface, you'd expect the texture to stretch across the entire face, but there is an ugly delimiter across it; one half streches, the other is unaffected. So there will a degree of distortion every time the shape of a polygon in a UV-map does not exactly match the shape of the same polygon on the actual 3D model and that will become apparent with your sphere; ok at the equator, not so much at the poles.

It's just something one have to live with and compensate for... :7
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Dynamic Sky Questions

Postby bnewton81 » Sat Jun 18, 2011 5:45 pm

I think you could avoid a lot of this distortion by placing your plane above the 2 poles of the uv sphere. That would mean less distortion. That or just hide the poles from view. Or you could even make the sky more realistic by putting the uv sphere on a tilt of like 30 degrees and rotating around the poles. Then cover the area with too much distortion with a decal that rotates with the sky (star field). If a texture can't be mapped perfectly, cover up the offending area. That's my motto. :D This is where the "ruins" come in handy. Like if I have too much trouble mapping a given model, I do my best then cover up the area that didn't map correctly with a piece of fallen ceiling or something. Know what i mean?
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Dynamic Sky Questions

Postby phoenix » Mon Jun 27, 2011 8:13 am

Hi Guys

Thanks for the feedback. Been moving cities, so been quiet for the last while.

What I originally tried was to use a 2:1 texture of the night sky that had been pre-"stretched" near the poles. I got this texture off an astronomical website, so it is accurate to reality with stretching accomodated so that when it gets wrapped to a sphere it should display correctly.

I then created a mesh with a ratio of 2 wide by 1 high (2:1), and used a blender tut to wrap the flat grid into a sphere. Tut here --> http://blenderartists.org/forum/showthr ... or-planets

That worked, but the resolution I get is not useable... it just looks fake.

Any ideas?

Phoenix
Attachments
2048x1024.png
Star field with stretching
2048x1024.png (226.03 KiB) Viewed 4384 times
User avatar
phoenix
 
Posts: 88
Joined: Wed May 19, 2010 2:29 am

Re: Dynamic Sky Questions

Postby tachzusamm » Mon Jun 27, 2011 9:14 am

Hmm... for me, this stretching looks just fine, and to be honest, I cannot imagine how "fake" it looks finally in an Age.

I guess we are at a point where we should ask if you could provide a Blender file with your Age, to have a closer look at it, if you don't mind.
You could remove everything from that Age (after making a copy of course) except the skydome and maybe a walking plane to keep your work unpublished for now.
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Dynamic Sky Questions

Postby dendwaler » Mon Jun 27, 2011 9:15 am

I think about a year ago, i posted a blendfile with an example of an Isle with waveset and a moving sky.
The sky is uv mapped properly and moving slowly .
the only thing you have to do is to swap the texture to the one you want.
May be this is some help for you.

Its the 5th post on the second page of this thread where you can download the blendfile.


http://forum.guildofwriters.org/viewtopic.php?f=7&t=4640&hilit=waveset
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Dynamic Sky Questions

Postby GPNMilano » Mon Jun 27, 2011 7:11 pm

Also, you may want to try tiling the UV Map across the x plane. As long as the texture is seemless along the sides, you should be able to reduce the "fakeness" of how it looks by setting it at 2 or 3 in the map input section of blender. Remember the X plane is left to right while the Y is up and down in a two dimensional space. So in the map input section you can try setting the "size X" to 2 or 3 rather than the default of 1. This would be in the same section that you animated the texture at. But instead of Ofs X and Y it would be Size X and size Y
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Dynamic Sky Questions

Postby tachzusamm » Mon Jun 27, 2011 9:33 pm

Well, I assume Phoenix did not use the UVMap at all, although I'm sure he created one.

I did a quick try of the tutorial he mentioned, and came out with an absolutely perfect mapped night sky globe. No "fake" looking at all.

Except that - the tutorial did not mention to switch the mapping (Material Buttons -> Map Input) to UV instead of ORCO - which gave indeed a fake look. ;)

Tiling the texture in the x direction only, however, would lead to stars looking like small strips - because they are a bit, umm, huge.
I fixed this by tiling it in x and y direction (both at factor 2) and re-painting the texture a bit (and made some huge stars smaller):
NightSky_2048x1024_C.png
Note: This texture is no longer accurate to reality.
NightSky_2048x1024_C.png (52.94 KiB) Viewed 4359 times


And don't forget to check "No Mist" under Material, otherwise black will not come out dark, depending on your fog settings.

@dendwaler: There's no fifth post on the second page in the thread you mentioned... threads shuffled?


And finally, just because I already did it now - here's a blend file with the sphere:
Attachments
Sphere.blend
(288.51 KiB) Downloaded 242 times
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Dynamic Sky Questions

Postby phoenix » Thu Jun 30, 2011 9:30 am

Hi Guys

Thanks for the input. Will munch on this for a bit. If I hit a wall... I will be back, ; )

I think it may be worthwhile opening a topic on the system of each user and what software they use. Since MOUL is moving forward with its code in the publics hands, we now have different pyprp, blender and os versions.

I would like to suggest a tag alongside each member that shows what their setup is. Such as:

Phoenix (ABM-TPOTS, Blender 2.49, PyPRP 1.6, Win7 Home Premium 64)

The reason is self validating. I have had some adjustment issues with win7 64bit, and it may be because of the hardware or the version of MS I am using. After a while we would see who else suffers from the same issues for a given setup. That kind of knowledge is power!

With PyPRP2 and Blender 2.5+ here I am sure we are eventually going to have to deal with this issue since some prefer to use the old 2.49. I would use Blender 2.5+ but it looks like a brand new program that has severely detracted from the 2.49 defacto.

Later

Phoenix
(ABM-TPOTS, Blender 2.49, PyPRP 1.6, Win7 Home Premium 64)
User avatar
phoenix
 
Posts: 88
Joined: Wed May 19, 2010 2:29 am

Previous

Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests

cron