VDISP map challenge

Started by Dune, April 20, 2015, 02:17:26 AM

Previous topic - Next topic

Dune

I was discussing the use of an exported TG 'heightfield' in Speedtree (for growing plant pops on, to be used as one object in TG again) with Doug (Zaxxon). It would be great if plants could grow from cracks around rock outcrops, searching for light, and not have a predestined (simple) angle for the whole plant.
So I did a little experimentation.
But exporting a portion of terrain with overhangs is not possible to my knowledge (or is it?). So I thought, why not export a vdisp map, to be used in a sculpting app like ZBrush. But I can't get it to work, and it may not be possible.
So I derived colors from the rock+overhang through a displacement to vector (blue node) and a vector to color. You get the three colors alright, and I simply (for proof of concept) used the previews to printscreen the greytone images, copied them to the RGB channels in a TIFF, and set it to 32-bit. Perhaps a rather primitive line of thought, as it didn't work as expected.

Any ideas, guys? 

TheBadger

When I tried this I found free scripts for maya that make it super fast and easy to create heightmaps of any geometry. I was first looking for ways to make vectors in the same way. But I have not worked on that project in a while.

My point is that it is a least possible to make vectors of objects for the kind of purpose that you are thinking. But even making the heightmaps was really hard without the script I found, even though it is really just a complex ramp. So finding a script would be ideal.

Of course if TG would export vectors directly, then so many problems would be solved.
As it is now, you should sculpt your terrain and have TG as the last step rather than the first. If you want to do anything like you are talking about.

Its not fun doing complex workflows with TG. Tg lacks too many tools.

Now if you have Z-brush, I can give you the instructions that Chris gave me based on his workflow for Snow White. But thats not easy either, and impossible without Z. But would do what you want it to.
It has been eaten.

Dune

Thanks, Michael. But I know how to extract a vdisp map in other apps like mudbox, but the point is to take it off TG. Though it would probably be easier to make the sculpt in another app, make the veggies in ST on that imported sculpt, export the veggies and the vdisp map and set up all in TG. In that respect you are certainly right. But I was just wondering if it could be done with some ingenious line of nodes from TG....

j meyer

As far as I can remember it should be possible to export an .obj mesh of terrain.

zaxxon

#4
Isn't it possible to use the micro-exporter for this? Seems to be plenty of info on the process, but I didn't see if that handles over-hangs. Certainly any mesh into ST shouldn't be too dense, but that could be 'decimated' from the TG export first. My thinking is to use the exported reduced poly terrain sample mesh in ST as a 'template'  to create multiple populations on, which then would exported, and  placed back onto the actual terrain in TG. Any thoughts on this approach?

TheBadger

#5
QuoteBut I know how to extract a vdisp map in other apps like mudbox

Yes, I know. But you are not reading between the lines. This can be done by going to Maya first than to zbrush, you cannot do it with mudbox. What you are trying to do is how chris used TG in the film snow white and the huntsman. I know because he gave me step by step instructions.

QuoteIsn't it possible to use the micro-exporter for this?
Yes, but that is not enough, then you have to make a vector of the object. And this is where it gets really complex. Either you have Z brush, and get the object from Maya to Z following a specific flow, or you must somehow make the vector of the object in maya, which as of yet, I cannot find away to do. The best I could find was a heightmap of the object in maya when searching how to make a vector of a object.

The only PROVEN way to make a vector of a TG object is a maya to Z workflow. That workflow does not work with Mud.

On the other hand, If the idea is more simple here, than you could just paint maps on the TG object in maya (or most any program) if the map is only meant to be a population map, since TG objects do include overhangs.

Dune,
TO be clear, I was telling you that you cannot make a TG object vect with mud. You have to Have Z. Than you can, including overhangs from the .OBJ out of TG. But, if all you want to do is paint pop maps onto the TG .obj, than export the object to mud and paint the pop maps there.

It has been eaten.

Matt

#6
The vectors' RGB representations are likely to have negative values which the shader preview can't display. And then there are issues with gamma correction and so on. So the screen grab won't work. But if you render an image of these vectors from an overhead camera, save the EXR, it might work. Use an orthographic camera, choose an ortho width, and use the same size of plane in the app you're exporting to.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Thanks, guys. The idea is to use TG as a principal source of the mesh, after you have made a complete, complicated terrain and want to use a close-up portion for exact veggie contortion, so to speak. The only problem then would be to locate the population (as one object) spot on. I'll experiment a little more with your input, Matt.

TheBadger

QuoteThe idea is to use TG as a principal source of the mesh,

Yes. The fact is that TG would be SOOOOO useful to so many more people if it could do what you want on its own. I have been learning other soft workflows for a while now, even unity and UDK now. I see people making things that are really easy in TG as it is, but they have to do a lot more work with the soft they use; more soft more steps.

If TG could output in more and better ways, it would really be a great thing!

I know, I know, I never shut up about this. But what can I say, its like cubic noise... The power is clearly there, but man, what a pain!

Love hurts I guess  ;D
It has been eaten.

Matt

Quote from: TheBadger on April 21, 2015, 06:41:46 PM
QuoteThe idea is to use TG as a principal source of the mesh,

Yes. The fact is that TG would be SOOOOO useful to so many more people if it could do what you want on its own. I have been learning other soft workflows for a while now, even unity and UDK now. I see people making things that are really easy in TG as it is, but they have to do a lot more work with the soft they use; more soft more steps.

If TG could output in more and better ways, it would really be a great thing!

What would be the ideal format/method for getting terrain into Unity and Unreal in your opinion?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

TheBadger

Add vector maps.
See my million other posts on why that would be awesome. ;D

And make it so that a single map render node can be added anywhere in the chain, and that everything above it, regardless of how it was created, gets rendered to the map.

To me it is most important that everything gets rendered regardless of how it was made in TG or what order they are in in TG; imagemask, DEM, PF so on.
So anything above the new map node is rendered out to the map.
I do not find that to be the case in TG now.

TG should produce all of the maps that are made and used by other soft. It should also read them. That is those maps that are regarded as standard, + Vector.

IMO.
It has been eaten.

paq

#11
Hello there, Hi Matt,

I have no idea about Unity, but exporting a Terragen terrain for any other 3d package is very problematic.
The microexporter mesh is mostly unusable for me.

1 - The mesh is 'just' a disconnected triangle soap, and so far I never find a way to clean it up. Polycount need to be high for good result, and merging such big file takes ages.
2 - To have a good export (close to what we have in Terragen render), the polycount need to be insane. Dont expect any good result under 8-10M of triangles for middle piece of terrain, my best one was about 30M, file size 8gb. Not many software can deal with this kind of data, and .obj is probably the slower one, or at least the less compressed possible format.

From my pov, enhancing the micro-exporter would be awesome.

1 - a merge vertex option, of course the faster the better.
2 - a decimation/poly cruncher reduction tool that will light up the resulting mesh without loosing too much detail. (very optionnal)

The number 1 is very important. If the mesh is 'clean' (no holes or disconnected vertices), we can eventuelly use external decimation tool (atangeo balancer is very good) to reduce the data. Then it's quite easy to auto-create a clean low res version in zbrush (with uv's), and eventuelly bake the details from the hires model as normal, displacement, or vector map.

As for textures, that's a very tough one. What about storing the data as vertex map ?

If you use a format like .abc (alembic), it's possible to store multiple vertex data channel (called custom channel). So it should be possible to store diffuse, spec, gloss by vertex. It's not as clean as bitmap texture, but it doesn't require uv's, and the expected tessellation been insane anyway, I think the result might be very great.

Any 3d package with a good .abc loader can then use this data to reshade the model, either by using the embedded colors, or by remapping them with custom gradients. Without saying .abc 'otawaga' compression can help a lot with huge data.

Cheers.
Gameloft

mhaze

Proper support for vector displacement maps for object displacement would be wonderful! especially as per object displacement is on the horizon. I like Michaels idea of vector displacement output for terrain as well.

TheBadger

I realized that I did not really respond to matts question in my post.
QuoteWhat would be the ideal format/method for getting terrain into Unity and Unreal in your opinion?

Matt,
For me it is not about going to Unity from TG. Its about going to other soft first. The workflows I have found and am trying to learn use soft I don't have. My main problem is that I cant translate the workflows because the soft I do have dose not do the job. However, if I can skip some steps by getting the maps that I need right from TG, then I can use the soft I do have just as well as the people in the tuts, and I think, even better.

In terms of why TG would be great for a game world workflow. Just watch some tuts on how people use MUdbox/Z-brush Vue and WM/GC/other to create terrain. My point is that TG would fit in there great, because it could be used to create stamps and stencils very quickly...

It already can now! But only if you have the right soft. IF you add vectDip then TG would allow me to skip a bunch of steps in the workflows I have seen and get the same and even better results faster with the soft I do have. then once in the soft I have, I can make maps for unity.

On the other hand, I am sure that going right from TG to unity/UDK would be a good thing too. In terms of which maps are best, Well it seems to me that the maps are standard. And TG does those, but with a lot of issues.

What I would like is somehow, to get as much fine detail like in the micro exporter, but in maps.

The micro exporter is great for a few things, really great. But as Paq said, limited use. And without Z-brush, then I really need vectorDisplacement from TG to do the same job.

The power would really make such a difference for me, for one. There are some things in TG I think I will never fully understand. But those things can be done in different ways with other soft as you and everyone knows. I would like to take my TG terrains to other soft and then bring them back for rendering! Or go to unity UDK to put them in a realtime so I can play with them in VR.

About the micro exporter,
If you turn off (i think it is ray trace) then you can get very fine details, even plants and stones. This is really great for a lot of things. And I really like how easy it is to render out an object. Making maps in TG is not so easy. and you do not get close to the info in a map that you can get in an object. And then there are all the problems that Paq pointed out too.

thanks.
It has been eaten.

j meyer

Quote from: Matt on April 21, 2015, 11:28:38 PM
....
What would be the ideal format/method for getting terrain into Unity and Unreal in your opinion?

Matt

According to the Unreal site it should be .fbx 2014 for meshes.

And as far as I understand there is nothing in such an engine unless you put it there.
So one would need a mesh first to have something to displace (vector or traditional).
Correct me,if I'm wrong,please.