Planetside Software Forums

General => Terragen Discussion => Topic started by: TheBadger on August 25, 2014, 09:00:08 PM

Title: Vectors in TG issues
Post by: TheBadger on August 25, 2014, 09:00:08 PM
OK,

I can get a mudbox vector into TG and to work with just two nodes (image map shader + vector dis shader) But only if the map was made from a sculpt using the default plane in mud.

So then I tried this:
[attach=1]

Then I exported the plane back to MUD as a FBX and sculpted:
[attach=2]

Now in TG:
[attach=3]

So  :-[

Also, there are a few other things Im not sure about
1) Yes or no to clicking antialiasing in Mud map output? I left it off for all my tests. Including the ones that worked.
2) there are several vector space choices a) world. b) Object. c) Absolute Tangent. d) relative Tangent

In the case of the tangents, mud says that relative Tangent is best for making vectors for use in MUD. And Absolute Tangent is best for vectors for use in Maya, Max, and softomage.

So I was guessing that  Absolute Tangent is best for Terragen. But in the test above, I used world.

Now Its hard for me to believe that the detail on the walls is too much, given some of the tests in the big thread on this topic. And I dont know why sending to Maya and back to mud would be a problem. So any help on this would be very welcome!

Thanks.
Title: Re: Vectors in TG issues
Post by: Oshyan on August 25, 2014, 11:35:38 PM
Could it be because you don't appear to actually be using a simple plane but a pre-displaced one or something?

- Oshyan
Title: Re: Vectors in TG issues
Post by: TheBadger on August 26, 2014, 12:14:42 AM
Hi Oshyan!
To be clear. The plane started in mud from the default plane. I sent it to maya by way of obj. All I did in maya was to extrude a few times. Then I sent it back to MUD .fbx... I think it may have something to do with the UVs? THat is, in order to have X&Z (they are not visable to a Y planer map) I had to UV map... Cant understand why that would be an issue in TG though, if it was not an issue in MUD... So maybe not the maps.

Here is a test that worked ok. I found a image on line and loaded it as a stencil in mud. I did not prep the image to be used as a stencil but it still worked pretty good.

The vector preview:
[attach=1]

The sculpt:
[attach=2]

The render:
[attach=3]

Here you see that the details are coming through.
And after re-reading some of the info from the big thread, I began to play with "final multiplier". In every case so far, some adjustment to the FM setting is required.
What other setting may I alter from default, that could effect things the way FM does?
In the case of the HR Giger faces, I had to increase FM to 5. Otherwise the faces were too slight and hard to see. But at default 1, there was no spikes. IF I increase to say 50-200, the terrain explodes. The proper setting seems to be different for every vector, and also depending on the sculpter used. Can anyone tell me anything more about this?

Also from this test. It seems I cannot change the size in the image map shader. If I change it from the 500x500, it will lose all intended features.
This may be related to the way autodesk stuff works. For example, when working between mud and maya, you must use the same measurement system or problems pop up.
Can anyone one say why I loose my faces just from changing the size in the image map shader?

The thing is, if I can get the OP vector to work (or something basically like that) then I know I can do everything I wanted with this vector to TG stuff! So I really want it to work.  ;D

Thanks for helping!

And again (per another thread) You only need two nodes to work with vectors in TG if you save out an .exr as you Vector.
Title: Re: Vectors in TG issues
Post by: Oshyan on August 26, 2014, 12:22:35 AM
I'm no expert with the vector stuff, I've never even tried it as I don't have Mudbox or ZB, so hopefully someone who knows for sure will step in. But unless I'm mistaken, there are assumptions you are making that are causing problems. The whole reason the vector maps work from ZB/MB to TG is that they start with a flat plane and then *the vector displacement map holds all the info needed to reproduce the resulting shapes*. What you're doing is creating *additional changes* from the flat plane that will *not* be reflected in a vector displacement map (because they're already there before you start sculpting), but still hoping it will work as before. The only way what what you're doing would work is if you applied those vector displacement maps *to the same object shape* in TG, and of course TG would have to be able to displace objects properly which it can't. So I don't think what you're doing is possible. The technique that does work is cool but still limited and this is one reason people haven't done more with it.

To reiterate my basic understanding: you need to work off of Mudbox/ZB native shapes, a plane ideally (perhaps only). You cannot displace on an arbitrary object or even a modification of a MB/ZB plane because you are creating changes that will not be encapsulated in the vector map, they are instead in the base geometry. The resulting vector map then reflects those changes and looks wrong in TG because you're applying it to a different base surface shape.

- Oshyan
Title: Re: Vectors in TG issues
Post by: TheBadger on August 26, 2014, 12:36:07 AM
Hmmm. If that is true (and it may very well be) Then I think I know a solution!
And Im happy to share it.

So if Oshyan is correct here is a work around

Make a vector of the sculpt for use in Mud box as a "vector brush".
Then, use that new vector brush on a fresh plane (new scene).
exprt a new vector map for TG
No map issues!

Ill try it  :)
Title: Re: Vectors in TG issues
Post by: Oshyan on August 26, 2014, 12:57:59 AM
Interesting. I hope it works!

- Oshyan
Title: Re: Vectors in TG issues
Post by: Dune on August 26, 2014, 02:12:59 AM
In my (little) experience you need more than 2 nodes to make it work; also convert the channels and then swap some of them into the VDisp shader. Also; if you add your 'printing' doesn't it add vertices? The vector map is the difference between a default plane and the sculpted plane, but I don't think it can have too many differences in local number of vertices. Also, I see some transects from one height to another; I don't think that would be possible as well. And TG has its limitations regarding straight verticals.
And; no UV's are needed, at least not when I worked with them.
Title: Re: Vectors in TG issues
Post by: Tangled-Universe on August 26, 2014, 02:36:29 AM
Yes, you do need UV's and actually good ones to start with.
Each UV coordinate tells where each pixel of the vector displacement map (VDM) should be, so as far as I know you do need UV's and good ones.

Sadly and mostly unbelievably, Mudbox's own default plane generates very poor UV's upon subdivision.
What I did is creating an 8x8 poly plane in Maya and exported that as .obj (couple of kb only).
I learned you need to do this from a Youtube video.

Import that into Mudbox and create a new layer to sculpt on.
Then subdivide once or twice to create a bit more resolution and start sculpting the rough details.
Then subdivide once again when you need to add more details and repeat the process till you're done.
After that then generate the vector displacement map via that menu I can't remember the name of now ;)

That's how I got it to work and as far as I know I didn't need to do any channel swapping, but that could perhaps be because I have set units/axis setup similar to Maya in Mudbox.
The only thing I have mentioned is that there is a slight negative offset on the Y-axis in TG when using a Mudbox VDM.
Title: Re: Vectors in TG issues
Post by: TheBadger on August 26, 2014, 02:59:26 AM
QuoteIn my (little) experience you need more than 2 nodes to make it work

No. you need only export a .exr. As you can see in the last image post, it works. It is a verification of a post in one of your threads.

Quoteno UV's are needed, at least not when I worked with them.

The vector of the faces above is an example of a clean plane UV, here is the bad one from the OP
[attach=1]
As far as I can understand, UVs matter through the entire process. The Vector preview you see in the file is in-fact an exact representation of the UVs.

QuoteThe only thing I have mentioned is that there is a slight negative offset on the Y-axis in TG when using a Mudbox VDM.
Do you mean that the map causes the terrain to rise or fall below the rest of the terrain at the edges of the map? I think someone showed that in the big thread in an image, but is there a fix??. I thought that it could be avoided by not sculpting near the edges of the plane, but maybe it will happen anyway? I should test that now too!

QuoteSadly and mostly unbelievably, Mudbox's own default plane generates very poor UV's upon subdivision.
What I did is creating an 8x8 poly plane in Maya and exported that as .obj (couple of kb only).
I learned you need to do this from a Youtube video.

Im not sure I understand the difference between a map made by mud (auto), and one made by maya for example. Do you happen to have a link on hand Martin? I don't recall ever hearing something on that.


The perfectly vertical walls though, yes, I know from the maze world thing I did that, that is a real big problem. But I was hoping that it would be less so now. In 3.1 is it still a big deal??! Ill tell you now I can't/won't sit through a 200 hour render again :o


Im starting the testing now. We will know much better in a little while. But Im really hoping that with the help of you guys I will be able to fix/work around/ any issues! So please keep an eye out. :)
Title: Re: Vectors in TG issues
Post by: Oshyan on August 26, 2014, 03:14:37 AM
Your 200 hour render had little to do with the vertical walls, just to clarify. The problem is that they don't look great when rendered, not that they render slowly.

- Oshyan
Title: Re: Vectors in TG issues
Post by: Dune on August 26, 2014, 04:10:57 AM
I said UV's are not needed, but I mean only if you make, e.g. a rock surface that's textured procedurally. I have to recheck the converting part...
Title: Re: Vectors in TG issues
Post by: Tangled-Universe on August 26, 2014, 04:18:55 AM
Michael,

I'm not making maps in Maya.

I meant that you must not start sculpting on a native Mudbox plane, but on a Maya created plane.
Somehow the plane object created in Maya has better UV's and/or allows for better UV's after subdividing in Mudbox.
It's really strange.

Just try the following: subdivide a Mudbox plane 8x and subdivide a Maya plane object 8x, both in Mudbox.
The Mudbox plane will end up with smoothed corners!
Title: Re: Vectors in TG issues
Post by: TheBadger on August 26, 2014, 05:22:54 AM
Um, I think the reason you are getting smoothed corners is not what you think Martin.

In both Maya and Mudbox in the smooth options, there is a setting that allows you to control the shape of an object as smoothing is applied. So if you want very sharp corners you need to tell both programs to keep the shape of the object before smoothing is applied. If you want those corners to smooth then the default should have done that, but if a setting was changed...

So in maya start with a cube and hit the 3 key. The 3 key previews in real time the effect of one smoothing level (or more smoothing levels if you tell it to). IF your settings are still default (it sounds that they are not to me), you will get a shape that is no longer anything like a cube. But a plane will appear to keep its shape because it has more edge loops. The extra edge loops (verts and edges) are forcing the shape to hold. But at a certain level they are really changing
The way to test if what you are trying to tell me is correct is to test a cube not a plane.

the base level of a Mud and Maya plane must be the exact same amount of  edges and verts, as well as the same size, or you will get a warning, something like "target and source are not the same base level, cannot map". I mean in regards to trying to do what Im doing in the OP.

I just re-learned some of this and some of it I learned for the first time tonight. But basically You can make anything into a a vector for Mud (and then for TG)(even whole objects)) And you can avoid all the problems I was  having at first! The only question is how well TG will render it, but I think it will be near perfect! If not perfect :)

And I will proove it *I think :-\* ... Maybe  ;) Im just waiting for my maps to finish. I stupidly used all the highest setting that should not have for tests ::)
But I will tell you that be fore you make a vector dis, you have to first make a regular displacement map, then from the result of that, make your vector.  ;D a entire step we were not doing!
Title: Re: Vectors in TG issues
Post by: Tangled-Universe on August 26, 2014, 06:15:03 AM
That's interesting.

In my so far simple tests I just open that plane I mentioned, add a new layer and start sculpting there.
The plane stays at subdivision 0 or 1, whichever of both is default.
The sculpt is in the end subdivision 6-8 or so.

I then extract the vector displacement map directly from the differences between the subdivision 6-8 plane vs the subdiv 0/1 base plane and I get a 1:1 reproduction in TG, except for the slight negative offset I mentioned earlier.

It also doesn't make much sense for me that you need to extract a displacement map first and then also a vector displacement map, just because if I think what these actually are and how they differ. It doesn't make sense to me (yet?).


Well ok, the smoothing seems to be something else.
But I'm not out of examples of why NOT to use Mudbox's native plane ;)
Again, subdivide a mudbox plane and displace that with a TG heightfield saved as .exr.
It will look like a mess.
Do the same procedure, but with a Maya obj plane and it works.
Title: Re: Vectors in TG issues
Post by: TheBadger on August 26, 2014, 06:53:25 AM
Martin, I think what you are saying is right on.
I *will* take your advice on the maya plane in the future! I am sure you tested it, and I am happy to take your advise there without redoing your tests.

But if you look at the op images, Im trying something much more complicated then starting from a simple plane (maya or mud), I have learned that what I want to do *IS* possible, but there are some issues I have to work out.

If I am going to work from an altered plane (not even a plane anymore really) then I need to treat it differently than two maya planes or two mud planes or a mix. I have to treat it like an object like a 3d car as in this example: https://www.youtube.com/watch?v=QuGDdhSqIhg

^^ this link above explains the other displacement map. Do check this out guys! Its pretty interesting when thinking about TG and having the vector be one simple plane at the end for import to TG. But he leaves out some important info (as usual with youtube) He dose not tell us anything about the car or how it was made or what the UVs look like.
Title: Re: Vectors in TG issues
Post by: j meyer on August 26, 2014, 11:28:26 AM
The simple solution is you have to flatten the extruded structure then make UVs of
the flattened plane and extrude again and sculpt from there.And NO holes in the structure!!!!!
As shown in your thread Michael.

Edit:of course not extrude,but move/raise it up again.Sorry.
Title: Re: Vectors in TG issues
Post by: TheBadger on August 26, 2014, 12:41:15 PM
^^ ahh yes that was your post. I was thinking of it off and on all night. Was going to mention it as proof of what I was trying to accomplish. I did not remember that you said to flatten then stretch it back up, but now that makes perfect sense.

I am not sure that there can be no holes at all though. I mean I know that is the consensus. But I just am determined to find some trick!

My main problem right now is making maps, displacement and vector. If I use really high settings mud starts crying.

Title: Re: Vectors in TG issues
Post by: j meyer on August 26, 2014, 01:02:17 PM
As for the holes:unless you find some way to make a wormhole
(or maybe some quantum magic?)there is no trick to find,I'm afraid. ;)

There is another way of doing such things like the structure you
showed(without holes) ,do the first step,the blocks and stuff,
make a vdisp map,displace in TG,then export the geometry to
your app and use that as the base for the next step(s).I think
Chris mentioned this before,also.


Title: Re: Vectors in TG issues
Post by: TheBadger on September 02, 2014, 03:20:52 AM
Hi J.

I just discovered that the flatten and stretch part of the workflow is unnecessary when trying to create pillars and towers. Just pull and build up your forms and don't worry how ugly the geo gets. Then just click re-topo. now add all your detail to pretty close to perfect quads and done.
However, I'm not quite sure yet, but after you re-topo, (in mud it is an automated process), the new re-topo(ed) plane may or may not become your lowest smooth level. Have to look into that.

Also, I have found that a hole is not only possible its easy, though requires a bunch of steps. And I don't know what TG will do with the map once it gets that far. I think this will work. all the steps are proven. Just have to do it now. We'll see I guess.

Oh, also, i'm finding that T-Us statement that you don't need to target down to the lowest sub level (I think it was T-U), is a good idea. Targeting down to 50000 0r 100000 polygons instead of whatever the default number is for the default plane... looks like a good way to get better detail. Also trying this out soon.
If its already proven some image examples would be nice if anyone has them on retargeting to a high polly.
Title: Re: Vectors in TG issues
Post by: Dune on September 02, 2014, 03:52:07 AM
Why don't you post some of your experiments?
Title: Re: Vectors in TG issues
Post by: j meyer on September 02, 2014, 10:43:00 AM
What Ulco said.
The retopo stuff doesn't work like that in ZB,you have to do it from
the starting plane/object.
I'm eager to see the hole.... in TG,'cause that's where it's problematic.
Title: Re: Vectors in TG issues
Post by: Dune on September 02, 2014, 12:05:52 PM
I mean in general. You post a lot, Michael, but we never see any recent work anymore  :(
Title: Re: Vectors in TG issues
Post by: TheBadger on September 03, 2014, 01:10:24 AM
I admit defeat.

You cannot retarget a re-topoed plane to the original plane level zero. And you cannot retarget a plane to any other plane with different original topology. Also, a retoped does not become a zero level, so you cannot smooth and target back to the retopo, because the retopo is not at zero, and the target mesh must be at zero in order to create a UV.

Also, in any case at all, both planes must have UVs and both must mach at level zero which becomes impossible when you either re-topo in mud or change topology in maya.

I tried this in a number of ways, including using maya planes and mud planes with the related UVs.

At each point you are prevented from even trying to make a v map by mud. Therefore J was right, I have to change the space time continuum before making mud work the way I want.

Of course you can have holes in MUD, just have to import an object modeled with holes. But there is no way to make a vector of it * for use in TG as a terrain vector*. The best you can get is a cup form, or a tube with one end closed.

And yes, the no hole thing was stated a number of times in the big thread as well as here. But now I fully understand why. Which sucks, Just feels strange when you cant do something in 3D.

Anyway, I can do everything I thought. I just cant make a proper UV vector of it. So no *real* holes then.
>:(

@ulco, I'll just post less.



Title: Re: Vectors in TG issues
Post by: Dune on September 03, 2014, 03:39:24 AM
NO  :'( :'( :'(
Title: Re: Vectors in TG issues
Post by: TheBadger on September 03, 2014, 04:41:03 AM
Ba
I'll never finish anything at this rate anyway. Not really interested in posting tests and stuff. I want to post the finished story.
Title: Re: Vectors in TG issues
Post by: Dune on September 03, 2014, 06:25:36 AM
Still, to keep this forum alive and kicking, we need more posts, tests and above all, renders... so think communal  ;) If you stop, I'll stop  8)
Title: Re: Vectors in TG issues
Post by: Kadri on September 03, 2014, 06:26:24 AM

https://vimeo.com/103389185

For your motivation Michael. It took his years. Not sure if you want to make a short movie or not.
Mostly Lightwave. Look at his site too for more detail.
Title: Re: Vectors in TG issues
Post by: bobbystahr on September 03, 2014, 10:12:02 AM
Wow Kadri...that was amazing...and he started his modeling career in Bryce. No wonder he found Lightwave a joy to work with as Bryce back then (1998) was a wonky piece of work at best. Thanks for sharing this.
Title: Re: Vectors in TG issues
Post by: Kadri on September 03, 2014, 10:15:03 AM

:)
I was waiting since 2 years to watch it. Very nice work indeed.
Title: Re: Vectors in TG issues
Post by: yossam on September 03, 2014, 11:12:28 AM
That, my friend, was cool as hell.  :) 


Thanks for the link.
Title: Re: Vectors in TG issues
Post by: Dune on September 03, 2014, 11:54:30 AM
Incredible, thanks so much for the link. Something he can be real proud of.
Title: Re: Vectors in TG issues
Post by: j meyer on September 03, 2014, 01:18:18 PM
Great video,thanks Kadri.

Ulco is right Michael you should post more.Often enough tests and
experiments are much more inspiring and can launch something.
Title: Re: Vectors in TG issues
Post by: TheBadger on September 03, 2014, 08:31:58 PM
Yeah thats really very good, Kadri. Thank you for the uplift! And yeah, a short would make me very proud.
Anyway, I don't think I could give up if I wanted to. I think I am an addict or something.
Its really very pathetic of me too. I wake up, shake off the sleep, and check to see if any new images have been posted here and a couple other sites before starting my day. Check often. Check before I sleep.

When I see new work I like I think to my self, yeah, I'm going to post something that will make them think of my work like I think of theirs!  ::) yeah sure, in 10 more years!  ;D

Oh well. All I care about is that I do it. But its like climbing Everest or something. Even if it don't kill you, what are you going to do at the top other than turn around? Guess the only reason is because you want to. still feels like a good enough reason... Maybe if I ever get to the top I'll feel different.

I think I know how to do most everything in principal. I just have lots of problems getting all the parts to work together; soft and methods and stuff.

Thanks for the help here though! Would not know anything at all if not for this place.
Title: Re: Vectors in TG issues
Post by: yossam on September 03, 2014, 09:37:02 PM
Michael,


I think you sell yourself short. What few images that you post have been good IMO.........that is why I wish you would post more. One thing that you need to remember.............you don't have to impress anyone in this forum. At the end of the day, it's all about satisfying yourself.


I have learned more from the critiques of my posts than anything else...........I have made posts that I personally thought sucked...........but usually someone likes it. Go figure............... :o



Title: Re: Vectors in TG issues
Post by: TheBadger on September 04, 2014, 02:09:25 AM
I appreciate it yossam. Your right that self improvement is best though.
Ill post more unfinished stuff ;D ;D 

On the vector thing. It accrued to me that in terms of a vector TG workflow, wouldn't the best thing be to have TG produce a vector map to send out and then work back in? I mean, other than the impossible hole thing, I think that would probably be the most powerful easy way to do this stuff.

Imagine,
Set up a TG scene, then export a vector, then sculpt it into a fantasy location, then send back a new vector map... That would be a much smoother workflow for sure.

Request request request!

Title: Re: Vectors in TG issues
Post by: Dune on September 04, 2014, 02:32:10 AM
QuoteIll post more unfinished stuff
;D

Maybe it's possible to export and import modified as vector. But exporting as obj, not vector, then sculpting and having mud calculate the difference between the 2.
Title: Re: Vectors in TG issues
Post by: Tangled-Universe on September 04, 2014, 05:41:35 AM
Quote from: TheBadger on September 04, 2014, 02:09:25 AM
Imagine,
Set up a TG scene, then export a vector, then sculpt it into a fantasy location, then send back a new vector map... That would be a much smoother workflow for sure.

Request request request!

For that we would require decent UV's and also decent topology of the exported OBJ first.

As far as I know this is by itself already quite a challenge to get "fixed" (for lack of better words) in TG.
Title: Re: Vectors in TG issues
Post by: TheBadger on September 04, 2014, 08:15:01 PM
...Never mind. Need to play around some more.