Greetings!

Welcome to Scifi-Meshes.com! Click one of these buttons to join in on the fun.

3ds max realistic clouds on a planet

1235

Posts

  • aszazerothaszazeroth176 Posts: 209Member
    OK, here is the very -quick- part of IRML's tutorial, -no- opacity tweak (his weight map)

    First render is with 1 layer, the next with 21 layers. Note: There are no darkening effects on the blue plane.

    <the code>:
    -- Script:IRML_port.ms
    -- Version: 0.1
    -- Author: Stefan "Aszazeroth" Ivarsson, www.dragondesign.se
    -- Usage: Select your planes and run script (CTRL-E)
    
    numberOfcloudspheres = 21.0
    select $
    moveConstant = 0.05
    for i = 1 to (numberOfcloudspheres) do
    (
    objCopy = copy $
    objCopy.material = copy $.material
    moveObject = [0,0,moveConstant]
    move objCopy moveObject
    select objCopy
    )
    

    //Dr.Asz
    69669.jpg69670.jpg
  • aszazerothaszazeroth176 Posts: 209Member
    A'ight, gonna have to head out away from my computer into the scary RealWorld(tm), but play around some and I'll check the progress later

    Cheers
    //Dr.Asz
  • IRMLIRML253 Posts: 1,993Member
    Davide_sd wrote: »
    ok i found the scene.
    first attachment: original pic with only one cloud layer.
    second: 5 cloud layer, notice how the surfce is darken, and what i can see is this: the cloud layer seems bigger than the original and it's basically the same: in my opinion it's too uniform: i tryed to play with your script some times ago but i have no success.
    it looks like the cloud map is exactly the same for each layer, I guess it's not adjusting the levels properly

    edit - same with the test renders above

    at the moment you guys are getting this:

    http://www.foundation3d.com/uploads/art/2009/06/-14-193527.jpg

    when you should be getting this:

    http://www.foundation3d.com/uploads/art/2009/06/-14-193524.jpg
  • Davide_sdDavide_sd4 Posts: 0Member
    IRML wrote: »
    it looks like the cloud map is exactly the same for each layer, I guess it's not adjusting the levels properly

    edit - same with the test renders above

    at the moment you guys are getting this:

    http://www.foundation3d.com/uploads/art/2009/06/-14-193527.jpg

    when you should be getting this:

    http://www.foundation3d.com/uploads/art/2009/06/-14-193524.jpg

    exactly!
  • Davide_sdDavide_sd4 Posts: 0Member
    aszazeroth, i have modify your last script: i have disable the receive shadows options in the cloud layers, otherwise the pics result to dark (imo)
    -- Script:IRML_port.ms
    -- Version: 0.1
    -- Author: Stefan "Aszazeroth" Ivarsson, www.dragondesign.se
    -- Usage: Select your planes and run script (CTRL-E)
    
    numberOfcloudspheres = 21.0
    select $
    moveConstant = 0.05
    for i = 1 to (numberOfcloudspheres) do
    (
    objCopy = copy $
    objCopy.ReceiveShadows = false
    objCopy.material = copy $.material
    moveObject = [0,0,moveConstant]
    move objCopy moveObject
    select objCopy
    )
    
  • IRMLIRML253 Posts: 1,993Member
    Davide_sd wrote: »
    aszazeroth, i have modify your last script: i have disable the receive shadows options in the cloud layers, otherwise the pics result to dark (imo)
    if you turn off shadows you destroy the effect
  • MelakMelak332 Posts: 0Member
    Aszazeroth and Davide :)
    I have found yet another way to adjust the opacity.

    Drop the cloudmap into a "Color Correction" map, set it to monochrome and enable Advanced in Lightness.
    Then you can adjust the gamma with a slider/valuefield, and you don't need to animate it to be accessible via Maxscript.

    Use these commands to prepare the map if necessary,
    $.material.opacitymap.rewireMode = 1

    $.material.opacitymap.lightnessMode = 1

    And then you can adjust the gamma with this:
    $.material.opacitymap.gammaRGB = 0.5


    Also, this should make sure that the cloudmap is instanced, and only takes up the memory once.
  • aszazerothaszazeroth176 Posts: 209Member
    Sorry guys for ditching out there.

    Now, my IRML port renders had -no- opacity tweaks at all, as mentioned above, just the same map, stacked 21 times. It was only a proof of concept and to show that I did not get the "darkening" effect.

    The shadows need to stay, as IRML says, otherwise the 3D effect is partially destroyed.

    @Melak. Sounds like a nice way to get around the opacity.map.curve-needs-to-be-animated. I shall updated the script to use that and investigate the possibilities of that correction map.

    Keep you updated with progress soon.

    //Dr.Asz
  • Davide_sdDavide_sd4 Posts: 0Member
    IRML wrote: »
    if you turn off shadows you destroy the effect

    yeah it's true...i'm stupid...i forgot to add the ambient light! :shiner::fishslap:

    melak, thanks for this tips! i've never heard about color correction map...i'm waiting for the render, you know, with 41 layers it takes a lot of time :)

    ok, first attach is the old version...second attach is the modify version of the script with the color correction map.
    69672.jpg69673.jpg
  • aszazerothaszazeroth176 Posts: 209Member
    OK, I will be the first to admit my ignorance, but cannot seem to find the "color correction" map, nor the cool maxscript nodes that were posted. Did they come with any of the recent versions of max ?
  • Davide_sdDavide_sd4 Posts: 0Member
    i think it was added with the 2009 version...
    we have to find another way!
  • IRMLIRML253 Posts: 1,993Member
    you haven't also put the cloud map in the diffuse channel by mistake have you? that would cause dark edges like you have

    it should be a pure white surface and the only place the cloud map touches is transparency
  • MelakMelak332 Posts: 0Member
    This one:
    colorcorrection800.jpg

    I'm using max 2009, and as far as I can tell, I don't have any plugins installed.
  • aszazerothaszazeroth176 Posts: 209Member
    I guess I should try the "old" way of controlling the opacity on the planes too.
  • MelakMelak332 Posts: 0Member
    You could try installing Blur Studios max plugins, they might have a color correction map as well.
  • Davide_sdDavide_sd4 Posts: 0Member
    IRML wrote: »
    you haven't also put the cloud map in the diffuse channel by mistake have you? that would cause dark edges like you have

    it should be a pure white surface and the only place the cloud map touches is transparency

    i tell you: too much physics destroys my brain today.
    thanks for noticed it to me.
  • aszazerothaszazeroth176 Posts: 209Member
    OK, 5 layers, old opacity tweak with the animated Color Map (Mono) in the output channel of each copied material.

    Dirty fast tweak though, need to explore the parameters. But this is essentially the exact same code as the 0.4 Stratospherify.ms script but for planes.

    Here is the code:
    -- Script:IRML_port.ms
    -- Version: 0.1
    -- Author: Stefan "Aszazeroth" Ivarsson, www.dragondesign.se
    -- Usage: Select your default plane and run script (CTRL-E)
    
    numberOfplanes = 5.0
    select $
    set animate on
    $.material.opacitymap.output.mono_color_map.curve_1.point_1 = [0,0,0]
    moveConstant = 0.2
    for i = 1 to (numberOfplanes ) do
    (
    objCopy = copy $
    objCopy.material = copy $.material
    objCopy.material.opacitymap.output.clamp = true
    curveStepping = (-2)/numberOfplanes 
    objCopy.material.opacitymap.output.mono_color_map.curve_1.point_1 = [0,curveStepping,0] 
    moveObject = [0,0,moveConstant]
    move objCopy moveObject
    select objCopy
    )
    

    MAJOR NOTE: As before the curve NEEDS to be animated BEFORE for the script to work at all and change the opacity. This is a limitation (well documented) to the maxscript API. I bet one can circumvent this by calling directly on the C API building a plugin instead, but I have not gotten there yet.

    //Dr.Asz
    69674.jpg
  • MelakMelak332 Posts: 0Member
    BUMP! :D

    I think I have found a way that's closer to IRML's original idea:
    test1234.jpg

    The first layer in the composite map (not material!) is simply the cloudmap, the second is a gradient ramp set to Map Channel #2.

    Add a UV map (set to channel #2 as well) like in the image (make it slightly larger than fitting), and finally set the blend mode to colour burn. Ta-Da!

    However I haven't yet gotten this to work with spheres, because of obvious mapping difficulties.

    I'm currently exploring other maps (a fallof map in "Distance Blend" mode, or a gradient in "lighting" mode, with a helper/light at the center of the spheres), I will let you guys know if something comes of it :)
  • IRMLIRML253 Posts: 1,993Member
    can you do it with a weight map? incrementing the value of the weight from the innermost sphere to the outermost sphere?
  • MelakMelak332 Posts: 0Member
    I don't think that theres a weight "map" in max, is that what you used? Or how did you map the gradient "perpendicular" onto the spheres?


    I think the problem here is that Max' gradient ramp map is 2D, not 3D like e.g. the noise map..

    The BlurBeta pack (available for every version of max I think) contains a 3D gradient, this *should* make this easy.
  • IRMLIRML253 Posts: 1,993Member
    yeah I used a weight map, I'd be suprised if max didn't have them

    http://www.foundation3d.com/uploads/art/2009/06/-14-1935210.jpg

    look at that screenshot, but imagine the weight map was added on a sphere by sphere basis, instead of poly by poly, it's really very simple
  • MelakMelak332 Posts: 0Member
    I don't exactly know what a weight map is in lightwave.

    The closest thing in max are probably soft selections, but as far as I know those cant affect maps.

    The only way I can even do it with planes like that is by projecting a gradient onto them from the side...
  • IRMLIRML253 Posts: 1,993Member
    ok do you have vertex maps?
  • MelakMelak332 Posts: 0Member
    I can paint vertex colors onto geometry...?

    Looks like this:
    clipboard01tya.jpg
  • IRMLIRML253 Posts: 1,993Member
    same thing as a weight map
  • MelakMelak332 Posts: 0Member
    Finally, it works! :D

    ...I spot a seam in the cloudmap.

    clouds03.jpg

    clouds02.jpg
  • IRMLIRML253 Posts: 1,993Member
    yeah that looks like the closest anyone has got to it, nice one
  • Davide_sdDavide_sd4 Posts: 0Member
    really great!
    i discovered the vertex map only few days ago, and it's really usefull also for this work! Thanks Melak! :D
  • MelakMelak332 Posts: 0Member
    I used soft selection to paint the innermost sphere, thereby painting a gradient onto the outer spheres :)

    Then I used the vertex map instead of the gradient in the composite map...though I feel this "composite" map might be a new thing, so users of older version os max (<2009) might need to use something else.
  • IRMLIRML253 Posts: 1,993Member
    one thing I noticed on your image here

    http://img221.imageshack.us/img221/2779/clipboard01tya.jpg

    is that you painted the map from left to right, when it should be from bottom to top, I take it you fixed that for your last renders?

    each sphere layer should have the same value all over, and the values should increment from the bottom to the top, like if you have 10 layers it should be: 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%

    hope that makes sense, it looks like you've got it
Sign In or Register to comment.