Notifications
Clear all

[Closed] Skydomes

Hi, i’ve used some of the skydome systems that people have made public, and im working on my own that is procedurally animated, but i dont know how to make the light system sample its colours from the procedural textures on the dome, if some one can help me out it would be appreciated as i would like to release this here or at scriptspot, as my way of trying to give back to the max community.
thanks

2 Replies

Originally posted by doug_
Hi, i’ve used some of the skydome systems that people have made public, and im working on my own that is procedurally animated, but i dont know how to make the light system sample its colours from the procedural textures on the dome, if some one can help me out it would be appreciated as i would like to release this here or at scriptspot, as my way of trying to give back to the max community.
thanks

Hi!

It depends on the textures used.
If you are using a single bitmap, you can read the pixel from the bitmap based on the UV coordinates of the vertex at the dome.

If you are using a complex procedural texture tree, you could use the RenderMap method to get the top level map to a bitmap and read the pixels the same way out of the bitmap.

Or you could go the hacker’s way and place a camera close to the point to sample, point it at the sample location and render a 1×1 pixels bitmap to get the actual color seen in the scene. (make sure you disabled all lights and rendered with full self-illumination to get correct results). Then read the single pixel out of the 1×1 bitmap and use its color to create the respective light.

Just a couple of ideas, pick one or use your own…

Cheers,
Bobo

Originally posted by Bobo
…Or you could go the hacker’s way and place a camera close to the point to sample, point it at the sample location and render a 1×1 pixels bitmap…

hehe, you gotta be some twisted programmer to come up with such a solution!

Martijn