Planetside Software Forums

Support => Terragen Support => Topic started by: digitalguru on April 30, 2025, 07:32:33 AM

Title: texture sequences
Post by: digitalguru on April 30, 2025, 07:32:33 AM
Probably not an easy answer to this, but I have a scene where I'm using an animated sequence to drive displacement.
My Terragen scene needs to sync with Maya renders and my animated and render sequence starts from frame 1001, and so does my displacment map sequence.

But if I try to set a frame to view in TG, I get the error window popping uo when I start to type in a frame number. This seems to be because when I type in frame 1258 fro example the input stops at the first number entered (1) and the error window appears as there is no file in the sequence for frame 0001. This continues as I type each number until finally I can input the required frame number.
I know I can drag the time slider, but this is a heavy scene and it can take a few tries before I get to the frame I want.

It's not a show stopper, but if there's a workaround would be good to know.
Title: Re: texture sequences
Post by: pokoy on April 30, 2025, 07:37:33 AM
Try copying the entire string from another place - notepad for example - and pasting into TG instead of typing it out, I found this the quickest way to get around the instant parsing (which frankly was a bad idea and should finally be removed, no harm in having to press enter just like in any other program). Not sure if it will work in your case...
Title: Re: texture sequences
Post by: digitalguru on April 30, 2025, 07:43:16 AM
Quote from: pokoy on April 30, 2025, 07:37:33 AMTry copying the entire string from another place - notepad for example - and pasting into TG instead of typing it out, I found this the quickest way to get around the instant parsing (which frankly was a bad idea and should finally be removed, no harm in having to press enter just like in any other program). Not sure if it will work in your case...
I usually do that, but I'll give it a try again.
Title: Re: texture sequences
Post by: pokoy on April 30, 2025, 07:51:27 AM
I really can't think of a case where the current behavior is useful, it only leads to increased CPU usage and waiting for TG to become responsive again since it's restarting the renderer (be it the OpenGL preview, IPR or a noise preview). Makes no sense any way you look at it.
Title: Re: texture sequences
Post by: digitalguru on April 30, 2025, 07:59:53 AM
Yeah, on that, I though pausing the viewport might delay it, but the error window still pops up, trying somethig else a.t.m
Title: Re: texture sequences
Post by: digitalguru on April 30, 2025, 08:07:09 AM
Would be nice if we had expressions - I have the same sequence in Maya - the first and last frames are black (i.e no displacement)  and I can write an expression to hold those frames outside the range of the sequence, which prevents those kind of errors.
Title: Re: texture sequences
Post by: pokoy on April 30, 2025, 09:04:01 AM
Not throwing an error and displaying a warning in the node or the log window would be an option, too. TG's UI/UX are just utterly outdated, no other way to put it.
Title: Re: texture sequences
Post by: Dune on May 01, 2025, 01:59:10 AM
Instant parsing, never heard of that expression, but English is not my native language, so I learned something again. But I agree with the behavior it has being a nuisance. When typing in (additional) letters/numbers for textures instead of finding them in the folder it sits in (I call my bumpmaps ..._BUMP), I always have to type in the title, then cut and paste it in the string. Nowadays I use just an addition B, btw. for bumptextures, so that's easier.
Title: Re: texture sequences
Post by: Kevin Kipper on May 01, 2025, 11:29:48 AM
I have a question regarding the original post.  Do you mean that when you start typing a frame number in the "Set the current frame" input field that the warning message pops up?

If so, have you tried using the "tg_goto_frame" script?  I think this script will by-pass the "instant parsing" behaviour you're describing.

The script is part of the redmaw-tg-toolkit that can be found in this forum's File Sharing > Tools, Utilities section.

Once you've installed the toolkit, you run the "tg_dashboard" which gives you a floating UI window from which you can run any of the scripts in the toolkit.

More importantly, you can use a keyboard shortcut to launch the "tg_goto_frame" script.  The default shortcut is "g".

As soon as you start typing in the frame number, Terragen will advance to the frame.  You can use the up and down arrows to advance one frame forward or backwards too.
Title: Re: texture sequences
Post by: digitalguru on May 01, 2025, 11:41:25 AM
Quote from: Kevin Kipper on May 01, 2025, 11:29:48 AMI have a question regarding the original post.  Do you mean that when you start typing a frame number in the "Set the current frame" input field that the warning message pops up?
Exactly.
Script sounds just the ticket, I'll give it a try. Does it need a specific version of Python? I have a few installed on my machine for dev purposes.
Title: Re: texture sequences
Post by: Kevin Kipper on May 01, 2025, 12:57:50 PM
I'm using Python 3.10.5 for all the scripts.  I don't know if the older versions of Python will work or not.
Title: Re: texture sequences
Post by: digitalguru on May 01, 2025, 03:28:37 PM
Just tried the script. The "Go to frame" function doesn't work - it's just as "live" as starting to enter the frame number in the transport bar, and the error window still pops up. In my situation it would be handier if that function had the frame field and a button to execute it.

I would still lobby for some kind of expression for a file sequence - being able to loop sequences, hold frames etc would be incredibly useful (Terragen 5 perhaps?)

In fact expressions would be useful all over TG, imagine you have a tree of power fractals and you want to increase them all, having them linked to master would save a lot of leg work - something like Houdini's Paste relative references.

The Compare files function looks interesting though, I can see myself using that a lot.

p.s. while I'm thinking about it, could I suggest having data entry fields in the blue nodes with numerical spinners? Would make trees a lot smaller without having to create constant scalars to control everything, but if you plugged in a node it would override the internal value.
Title: Re: texture sequences
Post by: Kevin Kipper on May 01, 2025, 05:21:06 PM
Thanks for trying out the script.  I'll see if I can add a mode in which you have to press "enter" or something before the value is passed to Terragen.  That may do the trick.

Expressions would be great as well as your numerical spinners idea.
Title: Re: texture sequences
Post by: digitalguru on May 01, 2025, 05:22:25 PM
Quote from: Kevin Kipper on May 01, 2025, 05:21:06 PMThanks for trying out the script.  I'll see if I can add a mode in which you have to press "enter" or something before the value is passed to Terragen.  That may do the trick.

Expressions would be great as well as your numerical spinners idea.
I think that might work.
Title: Re: texture sequences
Post by: Kevin Kipper on May 02, 2025, 01:50:55 PM
I'm still looking into adjusting that script, but noticed that if you use the Mousewheel to advance the frame number in the script's input field, that you actually have to press the enter key to accept the value.  So you could use the Mousewheel to rapidly advance to the desired keyframe and then press enter.

I tested this with an image sequence used to displace the terrain to make sure the Errors and Warnings window is not being updated each time the frame value increments due to scrolling via the Mousewheel.  

I'll still see if there's a way to set the behavior of that input field, but for now there's a small work around.
Title: Re: texture sequences
Post by: digitalguru on May 02, 2025, 02:30:44 PM
middle mouse doesn't seem to work for me,
Title: Re: texture sequences
Post by: Kevin Kipper on May 02, 2025, 02:36:42 PM
I've updated the tg_goto_frame.py script.  There's a new check button on the UI to defer the evaluation of the value in the Entry widget until the Enter key is pressed.

tg_goto_frame_GUI.jpg

In regards to the "middle mouse", it's a mousewheel right?  Does the value of the "Go to frame" input field change when you scroll the mousewheel?  Make sure the focus is on the script window.   Which operating system are you using?
Title: Re: texture sequences
Post by: digitalguru on May 02, 2025, 03:06:35 PM
ah - long day , wan't scrolling in the window - it works, but I managed to scroll to a 8 digit number whilst using it :)
good for small increments maybe, but I'm jumping around a few reference frames (1180 to 1380 for instance) so it's not that practical

scene is almost complete, so no biggie, just opened it to render with motion blur when I noticed it
Title: Re: texture sequences
Post by: Kevin Kipper on May 02, 2025, 06:29:27 PM
That's interesting.  Maybe we can add a min/max frame range that defaults to the project's settings?