View Single Post
Old 09-27-2023, 10:58 AM   #11
philosopher
Registered
 
philosopher's Avatar
 
Join Date: Jul 2004

Posts: 86
Originally posted by Jim Sachs:
Thanks for the kind words.

Sales of the program have been nearly non-existent for several years. I gave my share to Prolific Publishing, just to keep the SereneScreen.com website running.

My only income is from a license agreement with Roku to use a version of the Aquarium on their devices. They have been using the same version for about 7 years now, and it's conceivable that they might want to commission an update. If that should happen, I'd consider rewriting the program in Unreal. A lot would depend on whether or not my 74-year-old brain is capable of learning Unreal.  
Originally posted by hclarkjr:
i really hope you upgrade it, as i said earlier today i would be willing to donate to help you with the cost.  
I would also donate!

And Jim, when it comes to learning Unreal, and seeing as how you are already messing around with Midjourney, I've had a lot of luck with asking Chat GPT programming questions. It doesn't produce full code that works all that often, but I've been able to learn new things pretty easily by asking it a series of questions and then asking for clarification.

I've never used Unreal or any kind of 3d graphics software, but I asked a test question and got a pretty detailed answer with code examples at the end:

Can you write me code for unreal 5 that makes a small fish swim around a piece of coral?

ChatGPT
Certainly! Creating a simple behavior for a fish to swim around a piece of coral in Unreal Engine 5 (UE5) involves a combination of Blueprint scripting and some basic assets. Here's a high-level breakdown:

Assets Required:
A fish mesh (static or skeletal)
A fish animation (swimming loop) (if using a skeletal mesh)
A piece of coral mesh
A simple water material
Steps to Set Up the Environment:
a. Create a new level or use an existing one.
b. Place the coral mesh in the level.
c. Apply the water material on a plane or any appropriate geometry to represent water.
Fish Blueprint:
Create a new Blueprint class based on Actor called BP_Fish.
Inside the BP_Fish:

a. Variables:
- TargetLocation: Vector, the point in the world the fish is currently swimming towards.

b. Components:
- Add the fish mesh or skeletal mesh.
- If using a skeletal mesh, play the swim animation loop.

c. Logic:
- On Begin Play:
1. Find a random location around the coral within a specific radius to swim towards. Set this as TargetLocation.
2. Rotate the fish to face the TargetLocation and begin moving towards it.
- On Tick:
1. Continue moving towards TargetLocation.
2. If the fish is close enough to TargetLocation, find a new random location around the coral and set it as the new TargetLocation. Repeat the process.

This is a very basic AI behavior. For more complex behaviors, you might consider using UE5's AI and navigation systems.

Here's a simplified BP_Fish Blueprint script:

blueprint
Copy code
Event BeginPlay:
Set TargetLocation to a random location around the coral within a specified radius
Rotate fish to face TargetLocation

Event Tick:
Move fish towards TargetLocation at a specified speed

If distance between fish and TargetLocation is less than a threshold:
Set TargetLocation to a new random location around the coral within the specified radius
Rotate fish to face TargetLocation
This is a high-level representation. Actual implementation would require you to use specific Blueprint nodes like "Find Random Point in Navigable Radius", "Set Actor Rotation", "VInterp To" for smooth movement, etc.

Lastly, ensure you have a nav mesh in the level to allow the fish to navigate, and the fish's movement bounds are confined to the water volume or area where you want it to swim.
Sincerely,

S. Justin Gengo
"Out of chaos comes order."
Nietzsche
philosopher is offline   Reply With Quote