PDA

View Full Version : Randomize texture?



Sebasvideo
03-31-2014, 02:43 PM
What is the best way to randomize a texture? For example if you have a 2048x2048 PNG of grass, and you want to put it as a texture on the ground, far from above it will look like little squares. I made a 2x2 meter square plane, assigned the texture to it, and instanced it on the bigger ground plane, but it's giving me weird results and it's not accelerating things as much as I thought. For a 2x2 km ground, I was instancing a 1x1 meter patch of grass with geometry, and I needed like 10 million instances randomized to make it nice, but it was choking the computer each time I had to do anything, and it was going to take days to render.

So I thought rendering a 2048x2048 of that grass with the camera pointing straight down and instancing that was going to make it better, but the machine keeps getting stuck when going into the millions of instances. And right now I'm just working with a 2x2 km plane, I need to make that at least 10x10 kilometers, with hills and trees.

And it gets more complicated because for scenes where the camera is closer to the ground I need real grass geometry, so I have to instance that patch of grass at least for a 1 sq. km, and then I was going to use a bigger plane below the main one so at some point the real grass geometry turns into baked texture when the camera is high enough that it doesn't matter.

However, I'm not experienced enough to know how to make this happen, how to make a seamless border between the real grass geometry and the baked texture. Also, other than pointing the camera perfectly downwards and rendering a 2x2k square, I'm not sure if I need something else to bake a texture that will look real. I have an idea of how to make the bump map, the specular, and I have an Nvidia plugin in Photoshop that makes the normal map from a texture, but I'm still confused about what a normal map is, because I see the word "Normal" used for lots of different things in the 3D world. When it comes to textures, where do you load a normal map in the texture editor?

Anyway, any advice on this will be very welcome.

RebelHill
03-31-2014, 03:51 PM
Tbh... you're in the wrong program... you want Vue.

Otherwise...

There's utterly no need to use geo to cover a 1km^2 area, even if your camera is close to the ground... detail like that beyond a couple metres will be indistinguishable from texture, so you'd only need to cover an are within a couple metres of the camera for just about all practical purposes. So really, I think, your best bet is gonna be to use distance to camera mesh replacement. Your terrain would then be built out of "tiles" with each tile swapped out for either a single textured poly past a certain distance, or a geometric grass tuft within a certain distance. Its *not* the most straightforward approach to such a task... and I suspect it'd need a lot of "noodling" with to get something which worked well (like I say, a landscape program is really what you need here)... but still it'd be worth exploring if this is the only option u got. Def would have to cheat along the way somewhere though... either in using layers and comp, motionblur to hide seams during movement, a mix thereof, etc.

As for normals... nope, they only ever refer to one thing (though in different contexts)... and that is a normal is a vector which is perpendicular to some other vector... Most generally, it is the direction which points directly away from the face of a polygon. Thus, a normal map applied to geo is an image map which encodes these directions for a surface, allowing you to capture in hi-res pixel detail, surface nuances which would be too costly to create with geometric resolution.

Sebasvideo
03-31-2014, 04:00 PM
Thanks RebelHill, the only two programs I can use right now are either Lightwave or Modo, and Modo seems far worse at handling large scenes. I'm not sure what "distance to camera mesh replacement" is, any tutorials that you know of? Would this replace the terrain gradually so if the camera is pointing down it will turn from geometry grass to textured grass without the change being noticeable?

About normals, that's what I thought, that it's the direction the polygon is pointing at, so when you flip a polygon you are flipping the normal. However, I still don't understand the normal map, when you say "surface nuances which would be too costly to create with geometric resolution" that seems to me like a bump map, trying to fake displacement, but a bump map is a grayscale texture where the closer to white is more elevated and the closer to black the opposite. So how does that "normal" map or texture plays a role in texturing a model? Specifically in Lightwave, if they give you a model that has a bunch of textures and it includes a normal one, where do you put it?

RebelHill
03-31-2014, 04:51 PM
well... distance to camera mesh replacement... the clue is kinda in the name... it swaps object files in the scene for different versions depending on how close those objects are to the camera. Its in obj properties, object replacement.

The difference with anormal map is that it describes normals... b/w (bump) only describes height... Single colour scale (grey) can only encode for a singular axis... which is taken to be the extant poly normal. A normal map uses 3 channel colour, thus can encode "bump" in 3 dimensions, thus perturbing the poly normal (atificially speaking).

JoePoe
03-31-2014, 05:19 PM
That's a very good, straight forward Normals explanation!!

Just want to add that the normal maps are applied in the Nodes section of the surface editor.

Sebasvideo
03-31-2014, 05:26 PM
well... distance to camera mesh replacement... the clue is kinda in the name... it swaps object files in the scene for different versions depending on how close those objects are to the camera. Its in obj properties, object replacement.

I found it, it's what's called "Level of detail" in the Object Replacement list. The problem is that it if it just replaces the object, in this case the ground, I start the camera on the ground and traveling up while looking down, because then it reaches the specified distance, the switch would be noticeable. I guess I just won't be able to do it that way, I'll have to make a cut.

Sebasvideo
03-31-2014, 05:30 PM
That's a very good, straight forward Normals explanation!!

Just want to add that the normal maps are applied in the Nodes section of the surface editor.

How necessary are normals when surfacing a model? Will they add any realism?

RebelHill, you were talking about Vue, but how do you get Vue and Lightwave to work together? I mean, other than rendering all the landscape in Vue, the objects in Lightwave and then compositing, but in that case the objects in Lightwave won't reflect the environment you created in Vue.

Sebasvideo
03-31-2014, 08:59 PM
OK, digging a little more on Vue, it seems that the only version that really integrates with Lightwave is $1,700, while another version that is $1,300 allows camera and light synchronizing. The Complete version is a more attractive package at $600, but it doesn't seem to have any integration, I'm not even sure you can manually exchange camera motion information between them, which would make it useless even for compositing. Too bad, it seems like a great package.

So I take it that it's impossible to achieve anything remotely similar in Lightwave? I'm not talking about the kind of elaborate landscapes shown on the Vue renders and videos, I'm talking about a simple field that extends several kilometers and has trees, hills and clouds.

BTW, I tried the object replacement thing, it seems kind of buggy, I set it to 30m and it changes when the camera is a bit over 20 meters above the ground (and the ground is what I set to level of detail replacement.) Also, it changes the object but it keeps the instancer going, so you have to keyframe the weight, but that is no big deal.

Snosrap
04-01-2014, 10:11 PM
What is the best way to randomize a texture? For example if you have a 2048x2048 PNG of grass, and you want to put it as a texture on the ground, far from above it will look like little squares. I'm not sure about the other portion of your concerns, but nobody seemed to answer this for you. For this why not blend several image maps along with a procedural and top it off with another procedural texture set to "Texture Displacement" to mix it up. And then add some real grass blades. See "mini" tutorial. :)

Sebasvideo
04-01-2014, 10:27 PM
Thanks! I'll take a look tomorrow.

Sebasvideo
04-24-2014, 09:20 AM
I'm not sure about the other portion of your concerns, but nobody seemed to answer this for you. For this why not blend several image maps along with a procedural and top it off with another procedural texture set to "Texture Displacement" to mix it up. And then add some real grass blades. See "mini" tutorial. :)

I hadn't had time to look into this until now, but it's extremely useful, so thank you very much. Now, does anyone know how to transfer this method into Octane nodes?

prometheus
04-25-2014, 05:32 AM
I think you would need to get some sort of grass texture that is taken over a larger area and not small tile area and try to tile as little as possible.
otherwise I believe som blending of textures is better than just tiling, you could stack grass layers upon each other, and you can also set a slight falloff so you donīt get sharp cuttof tiling pattern, but that also requires a texture beneath the
overlying tiled grass textures if they have a falloff.

I was just testing a little, dpont has an image bomber which you could try, it can tile and "image bomb" an area in different ways, set how many tiles you want, scaling, repeating etc, not sure how it would look really, I am about to test myself.
image bomber is a part of dpont collection...

http://dpont.pagesperso-orange.fr/plugins/textures/Image_Bomber.html

http://dpont.pagesperso-orange.fr/plugins/Textures.htm

Edit...a warning though, in 32 bit lightwave, I get a lot of crashes with image bomber, it has been that way since many lightwave versions back, sort of stopping me to use it properly, thought it should work better now, but Itīs the same ol crashing a lot.
I tried to make denis aware of it, but he couldnīt reproduce the crashes himself, so it just might work for you anyway, I think it has something to to with images and vpr.

Sebasvideo
04-25-2014, 08:27 AM
Thanks Michael, unfortunately I'm working with Octane, which doesn't use the regular surface editor, it can only use its custom nodes, and while it has some sort of texture blending mode, it seems to lack the texture displacement blending mode that Snosrap put here in his mini tutorial, which is exactly what I need. I did manage to find an "OK" way to it in Octane, which makes the tiling less evident, but it's not as good as his method.