simple scaling with transform shader

Started by billhd, June 05, 2009, 01:41:55 PM

Previous topic - Next topic

billhd

Hello all..I have something simple that I cannot get.  I would like to use the transform shader to scale an object, a sphere for instance, in this case along one axis.  I go to the internal network of the sphere and I plug a transform shader into the surface input with, for example, the y value set to 5, leaving x and z at 1, with the scale box checked, with no apparent effect.  I also tried plugging the transform shader into a default shader's displacement function and, as well, putting it in-line with a power fractal, again plugged in to the surface input.  None of these actions seem to affect the sphere's axis in question (though the pf does its usual work).  I think I must be missing something simple. Sorry if this is answered somewhere, I have looked.  Thanks, -Bill

Kevin F

you don't use the transform shader to achieve this. Simply change the  x,y,z values of the object (under scale) then rotate to your chosen position.

billhd

Thanks Kevin, However the screen for sphere has only "centre" and "radius"; angular position has "heading", "elevation" and "distance" and then there is the surface shader tab.  The only scaling to my view is the radius.  The planet object as well has no such single-axis scaling capability that I can see.  I suppose I could import an obj or other format sphere, as the obj reader has the multi-axis scale provision, but what I really want to do is make a native TG2 planet oblate (squash along the y axis).     Bill

cyphyr

Hehe cool idea, I think the only way to do this is to cheat  ;D

Use a greyscale displacement map, in spherical projection like the one attached. The whiter areas will be displaced outwards. You may have to use some fairly insane values but it should work. Contracting or expanding the whiter areas will create different "types" of oblation:)

Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

billhd

Thanks cyphyr, Could work; however isn't the transform shader made to allow scaling; do you think I'm using it incorrectly in the way I describe?  After all, all it has are scaling and translation values, leading me to believe it can translate and scale!  But perhaps only shaders and not objects?  Bill

cyphyr

Quote from: billhd on June 05, 2009, 03:22:08 PM
... perhaps only shaders and not objects?  Bill

Yep that's right :)

Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Kevin F

yeah, I was thinking it was the same as the rock obj. which can be scaled along each axis. How about an enormous rock obj (with thousands of faces)!

dandelO

Yup, the rock object is the way to go. Around 2000 faces, smooth normals and rescaled along the desired axis.

I made this flying saucer out of rocks and discs... http://forums.planetside.co.uk/index.php?topic=5312.0

billhd

Thanks to dandelO and others and I will try the rock approach.  I diddled with the gradient image-displacement map approach but no good results so far.  Got irregular or spiky displacement and tried all kinds of mapping. 

Will report more as it happens, later.

billhd

So far, not bad.  The sunlight terminator of the planet was blocky but soft shadows helped.  I at first tried the stone at the scale of planets, which resulted in a cobblestone shadowing effect on the rock, not at all looking like a jovian atmosphere.  Reduced size considerably, that helped.  Tried more than 10K faces but that crashed TG2 on my system.

dandelO

Have you checked 'Smooth normals' in the rock, too? Might be why it appears blocky if it's still unchecked. 2000 faces is as large as I could go comfortably with rocks on the computer I was using at the time. Trying to poulate those, though gave a really annoying result of the populator progress bar restarting and flashing on and off screen, sometimes it would eventually catch itself and populate but mostly I had to lower the faces a bit for it to work. Tgd.exe had to be stopped through windows when this populator error happened.